Changeset 2098 in MondoRescue
- Timestamp:
- Dec 23, 2008, 10:09:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mindi/rootfs/sbin/post-init
r1989 r2098 6 6 7 7 8 call_multifunc_cd() {9 echo "Hooray! I'm a multi-function CD. Oo! Oo!"10 mount | grep cdrom > /dev/null 2> /dev/null || mount /dev/cdrom /mnt/cdrom >> $LOGFILE 2>> $LOGFILE11 for i in bin lib usr sbin ; do12 echo -en "\rNormalizing $i ... "13 if [ -d "/mnt/cdrom/$i" ] ; then14 for j in `find /mnt/cdrom/$i` ; do15 k=`echo "$j" | awk -F '/' '{for(i=4; i<=NF;i++) {printf("/%s",$i);};printf "\n"; }'`16 mkdir -p $k17 rmdir $k 2> /dev/null18 ln -sf $j $k19 done20 fi21 done22 echo -en "\rNormalized softlinks OK.\n"23 echo -en "Shall I run a CPU burn-in test in the background (y/n) ?"24 read line25 if [ "$line" = "y" ] || [ "$line" = "Y" ] || [ "$line" = "yes" ] || [ "$line" = "YES" ] ; then26 for i in `find /usr/local/sbin/burn*` ; do basename $i ; done27 echo -en "...Which one ?"28 read line29 $i || echo $? &30 fi31 for i in lucifer mprime ; do32 # tiobench ide-smart33 if which $i > /dev/null > /dev/null ; then34 echo -en "Shall I run $i (y/n) ?"35 read line36 if [ "$line" = "y" ] || [ "$line" = "Y" ] || [ "$line" = "yes" ] || [ "$line" = "YES" ] ; then37 echo "Running $i ..."38 $i || echo "Warning - $i returned an error"39 fi40 fi41 done42 43 # echo "Running bash."44 # busybox sh45 echo "Exiting multi-function CD thingy. Please reboot immediately."46 exit 047 }48 49 50 # ---------------------------- main ----------------------------51 52 8 sleep 1 53 9 54 if [ -e "/MULTIFUNC" ] ; then 55 LogIt "I think this is a multifunc CD but I'm not going there today." 56 # call_multifunc_cd 57 fi 58 10 echo "Here is my /tmp/mountlist.txt" >> $LOGFILE 59 11 cat /tmp/mountlist.txt >> $LOGFILE 60 12 … … 67 19 compare=`grep compare /proc/cmdline` 68 20 interactive=`grep interactive /proc/cmdline` 21 pxe=`grep pxe /proc/cmdline` 69 22 [ "$interactive" ] && expert=""; # in case 'expert' crops up somewhere 70 23 if which mondorestore > /dev/null 2> /dev/null ; then 71 24 LogIt "mondorestore found; cool..." 72 25 else 73 if [ "$iso$nuke$compare$interactive " != "" ] ; then26 if [ "$iso$nuke$compare$interactive$pxe" != "" ] ; then 74 27 LogIt "FYI, this CD was made by Mindi, not Mondo." 1 75 28 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.