Changeset 2098 in MondoRescue


Ignore:
Timestamp:
Dec 23, 2008, 10:09:40 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Clean up post-install and do not say it's a mindi disk when used with pxe
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.8/mindi/rootfs/sbin/post-init

    r1989 r2098  
    66
    77
    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>> $LOGFILE
    11     for i in bin lib usr sbin ; do
    12         echo -en "\rNormalizing $i ...    "
    13         if [ -d "/mnt/cdrom/$i" ] ; then
    14             for j in `find /mnt/cdrom/$i` ; do
    15                 k=`echo "$j" | awk -F '/' '{for(i=4; i<=NF;i++) {printf("/%s",$i);};printf "\n"; }'`
    16                 mkdir -p $k
    17                 rmdir $k 2> /dev/null
    18                 ln -sf $j $k
    19             done
    20         fi
    21     done
    22     echo -en "\rNormalized softlinks OK.\n"
    23     echo -en "Shall I run a CPU burn-in test in the background (y/n) ?"
    24     read line
    25     if [ "$line" = "y" ] || [ "$line" = "Y" ] || [ "$line" = "yes" ] || [ "$line" = "YES" ] ; then
    26         for i in `find /usr/local/sbin/burn*` ; do basename $i ; done
    27         echo -en "...Which one ?"
    28         read line
    29         $i || echo $? &
    30     fi
    31     for i in lucifer mprime ; do
    32 # tiobench ide-smart
    33         if which $i > /dev/null > /dev/null ; then
    34         echo -en "Shall I run $i (y/n) ?"
    35         read line
    36         if [ "$line" = "y" ] || [ "$line" = "Y" ] || [ "$line" = "yes" ] || [ "$line" = "YES" ] ; then
    37         echo "Running $i ..."
    38         $i || echo "Warning - $i returned an error"
    39         fi
    40     fi
    41     done
    42 
    43 #    echo "Running bash."
    44 #    busybox sh
    45     echo "Exiting multi-function CD thingy. Please reboot immediately."
    46     exit 0
    47 }
    48 
    49 
    50 # ---------------------------- main ----------------------------
    51 
    528sleep 1
    539
    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 
     10echo "Here is my /tmp/mountlist.txt" >> $LOGFILE
    5911cat /tmp/mountlist.txt >> $LOGFILE
    6012
     
    6719compare=`grep compare /proc/cmdline`
    6820interactive=`grep interactive /proc/cmdline`
     21pxe=`grep pxe /proc/cmdline`
    6922[ "$interactive" ]  && expert=""; # in case 'expert' crops up somewhere
    7023if which mondorestore > /dev/null 2> /dev/null ; then
    7124    LogIt "mondorestore found; cool..."
    7225else
    73     if [ "$iso$nuke$compare$interactive" != "" ] ; then
     26    if [ "$iso$nuke$compare$interactive$pxe" != "" ] ; then
    7427        LogIt "FYI, this CD was made by Mindi, not Mondo." 1
    7528        exit 0
Note: See TracChangeset for help on using the changeset viewer.