Changeset 3368 in MondoRescue
- Timestamp:
- Apr 18, 2015, 5:25:42 PM (10 years ago)
- Location:
- branches/3.2/mindi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/mindi
r3364 r3368 123 123 # Function to log on screen only 124 124 LogScreen() { 125 126 127 128 129 125 if [ -e /dev/stderr ] ; then 126 echo -e "$1" >> /dev/stderr 127 elif [ -e /usr/bin/logger ] ; then 128 /usr/bin/logger -s $1 129 fi 130 130 } 131 131 … … 133 133 LogFile() { 134 134 135 136 137 138 139 135 echo -e "$1" >> $LOGFILE 136 if [ _"$2" != _"" ]; then 137 grep -Ev "tar: Removing \`/\'" "$2" >> $LOGFILE 138 fi 139 rm -f "$2" 140 140 } 141 141 142 142 # Function to log in both screen and logfile 143 143 LogAll() { 144 145 144 LogScreen "$1" 145 LogFile "$1" "$2" 146 146 } 147 147 … … 983 983 # Get PV's for an LV 984 984 GetPVsForLV() { 985 986 987 988 989 990 991 985 if [ -n "$1" ]; then 986 vg=`$LVMCMD lvdisplay $1 2>/dev/null |awk '/VG Name/{print $NF;exit}'` 987 if [ -z "$vg" ]; then 988 return 989 fi 990 $LVMCMD vgdisplay -v $vg 2>/dev/null | awk '/PV Name/{print $NF}' 991 fi 992 992 } 993 993 … … 1302 1302 partition_size=`grep -Fv "Priority" /proc/swaps | tr -s '\t' ' ' | grep -F "$current_partition " | $AWK '{print $3}'` 1303 1303 [ "$partition_mountpt" != "swap" ] && partition_mountpt="swap" 1304 1304 [ "$partition_format" != "swap" ] && partition_format="swap" 1305 1305 if [ "$partition_size" = "" ] ; then 1306 1307 1308 1306 totalsize=0 1307 items=0 1308 for i in `tr -s ' ' '\t' < /proc/swaps | grep -Fv "Filename" | cut -f3` ; do 1309 1309 totalsize=$(($totalsize+$i)) 1310 1310 items=$(($items+1)) 1311 1312 1313 1314 1311 done 1312 [ "$items" -gt "0" ] && partition_size=$(($totalsize/$items)) || partition_size=0 1313 [ "$partition_size" -lt "125000" ] && partition_size=125000 1314 LogFile "INFO: I'm guessing $c_p is $(($partition_size/1024))MB" 1315 1315 fi 1316 1316 else … … 1596 1596 # Some distro have a dmsetup conf at that point so removing it Cf: http://trac.mondorescue.org/ticket/651 1597 1597 if [ "`which dmsetup`" != "" ]; then 1598 1599 1600 1601 1602 1603 1604 1598 block_id="`echo $USBPART | sed 's/\/dev\///g'`" 1599 if [[ "`dmsetup ls | awk '{print $1}' | grep $block_id`" != "" ]]; then 1600 LogFile "INFO: Removing $block_id from device mapper." 1601 sleep 1 1602 dmsetup remove $block_id 1603 fi 1604 fi 1605 1605 echo -en "." 1606 1606 LogFile "INFO: Creating a vfat filesystem on $USBPART" … … 1969 1969 dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null 1970 1970 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4` 1971 1971 1972 1972 retval=0 1973 1973 cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null … … 2269 2269 duff_kernels="" 2270 2270 output="" 2271 2271 2272 2272 if [ "$ARCH" = "ia64" ] ; then 2273 2273 root="/boot/efi/efi" … … 2793 2793 umount $mountpoint || Die "Cannot unmount $tempfile" 2794 2794 # log that we are done 2795 2795 LogFile " ...done." 2796 2796 else 2797 2797 Die "Filesystem $gvFileSystem not supported for initrd image. Terminating." … … 2890 2890 2891 2891 if ! which mkfs.vfat 1> /dev/null 2> /dev/null ; then 2892 2892 Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?" 2893 2893 fi 2894 2894 -
branches/3.2/mindi/rootfs/etc/init.d/rcS
r3328 r3368 371 371 372 372 CreateDevMakedev() { 373 374 375 376 377 373 if [ -e /sbin/MAKEDEV ]; then 374 ln -sf /sbin/MAKEDEV /dev/MAKEDEV 375 else 376 ln -sf /bin/true /dev/MAKEDEV 377 fi 378 378 } 379 379
Note:
See TracChangeset
for help on using the changeset viewer.