Changeset 2937 in MondoRescue for branches/3.1/mindi/rootfs/sbin
- Timestamp:
- Jan 28, 2012, 1:51:28 AM (12 years ago)
- Location:
- branches/3.1/mindi/rootfs/sbin
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mindi/rootfs/sbin/find-and-mount-cdrom
r2816 r2937 33 33 fi 34 34 LogIt "$device has a CD-ROM in it" 35 umount /mnt/cdrom35 umount -d /mnt/cdrom 36 36 ln -sf $device /dev/cdrom 37 37 if [ "$?" -ne "0" ]; then -
branches/3.1/mindi/rootfs/sbin/install-additional-tools
r2594 r2937 4 4 # 5 5 ######################################################################## 6 7 8 Die() {9 echo "Fatal error! $1" >> /dev/stderr10 exit 111 }12 13 6 14 7 … … 60 53 cd $old_pwd 61 54 echo -e -n "\r" 62 [ ! -e "$MINDI_CACHE/CDROM-LIVES-HERE" ] && [ -e "$tarball" ] && umount $mountpoint55 [ ! -e "$MINDI_CACHE/CDROM-LIVES-HERE" ] && [ -e "$tarball" ] && umount -d $mountpoint 63 56 sleep 1 64 57 fi -
branches/3.1/mindi/rootfs/sbin/post-init
r2591 r2937 26 26 else 27 27 if [ "$iso$nuke$compare$interactive$pxe" != "" ] ; then 28 LogIt "FYI, this CD was made by Mindi, not Mondo." 1 28 LogIt "The mondorestore command was not found on your backup media" 1 29 LogIt "It may mean your device is not seen correctly." 1 30 LogIt "Check driver list and error messages." 1 29 31 exit 0 30 32 else -
branches/3.1/mindi/rootfs/sbin/start-netfs
r2709 r2937 10 10 ipcount=3 11 11 12 ipconf="" 13 pre="" 14 post="" 12 # Get info from config file 15 13 ipdev="" 14 hwaddr="" 16 15 ipaddress="" 17 16 ipnetmask="" … … 19 18 ipgateway="" 20 19 proto="" 20 ipconf="" 21 pre="" 22 post="" 21 23 netfsmount="" 22 24 imgname="" … … 26 28 if [ -f $MINDI_CACHE/mondorestore.cfg ]; then 27 29 ipdev=`grep netfs-dev $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 30 hwaddr=`grep netfs-client-hwaddr $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 28 31 ipaddress=`grep netfs-client-ipaddr $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 29 32 ipnetmask=`grep netfs-client-netmask $MINDI_CACHE/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` … … 46 49 for i in `cat $CMDLINE` ; do 47 50 echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2` 51 echo $i | grep -qi hwaddr= && hwaddr=`echo $i | cut -d= -f2` 48 52 echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2` 49 53 echo $i | grep -qi netfsmount= && export netfsmount=`echo $i | cut -d= -f2` … … 93 97 ipgateway=`echo $ipconf | cut -d: -f5` 94 98 fi 99 100 # If same system, map to the right MAC address 101 hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'` 102 if [ "$hwaddr" != "$hwaddr_found" ]; then 103 ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'` 104 if [ "$ipdev_new" != "" ]; then 105 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 106 ipdev=$ipdev_new 107 else 108 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 109 fi 110 fi 111 95 112 LogIt "Configuring $ipdev statically ($ipaddress/$ipnetmask)" 96 113 ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast 97 114 route add default gw $ipgateway 115 98 116 fi 117 118 # Leave time to the satck to wake up (reported by some users) 119 sleep 5 99 120 100 121 # ping server helps waking interface up
Note:
See TracChangeset
for help on using the changeset viewer.