Changeset 1734


Ignore:
Timestamp:
Oct 29, 2007, 2:24:06 PM (12 years ago)
Author:
bruno
Message:
  • untar-and-softlink => untar (+ interface change)
  • suppress useless softlinks creation/removal in boot process
  • avoids udevd messages on groups
  • Increase # of disks to 99 as in mindi at restore time (should be a conf file parameter)
  • skip existing big file creation
  • seems to work correctly for USB mindi boot
Location:
branches/2.2.5/mindi/rootfs/sbin
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/rootfs/sbin/init

    r1729 r1734  
    278278    mount -n -t devpts -o mode=620 none /dev/pts
    279279    mount -n -t tmpfs  none /dev/shm
     280    PKLVL=`cut -f1 /proc/sys/kernel/printk`
     281    echo 0 > /proc/sys/kernel/printk
    280282    /sbin/udevd --daemon
     283    echo $PKLVL > /proc/sys/kernel/printk
    281284}
    282285
  • branches/2.2.5/mindi/rootfs/sbin/install-additional-tools

    r1315 r1734  
    1919LogIt "Starting install-additional-tools"
    2020mountdir=$GROOVY
     21# Should be the same as in mindi => conf param
     22MAX_DISKS=99
    2123mkdir -p $mountdir
    2224diskno=1
     
    2527    LogIt "I am assuming the data disks' contents are already in $mountdir."
    2628else
    27     while [ "$diskno" -lt "20" ] ; do
    28         LogIt "PLEASE WAIT. Untarring and softlinking disk #$diskno" 2
    29         untar-and-softlink $diskno $mountdir /
     29    while [ "$diskno" -lt "$MAX_DISKS" ] ; do
     30        LogIt "PLEASE WAIT. Untarring disk #$diskno" 2
     31        untar $diskno $mountdir
    3032        res=$(($res+$?))
    3133        [ -e "/LAST-DISK" ] && diskno=999
     
    3638rm -f /LAST-DISK
    3739
    38 echo -e -n "Recombining large files..."
     40LogIt "Recombining large files..." 1
    3941biggienumber=0
    4042while [ -e "$mountdir/slice-$biggienumber.name" ] ; do
    4143    stub=$mountdir/slice-$biggienumber
    4244    biggiefname=`cat $stub.name`
     45    if [ -f $biggiefname ]; then
     46        LogIt "$biggiefname already exists - skipped" 1
     47        biggienumber=$(($biggienumber+1))
     48        continue
     49    fi
    4350    biggiefsize=`cat $stub.size`
    4451    rm -f $stub.name $stub.size
     
    5663        done
    5764
    58     echo "$biggiefname ($biggiefsize KB) restored. $sliceno slices." >> $LOGFILE
     65    LogIt "$biggiefname ($biggiefsize KB) restored. $sliceno slices." 1
    5966
    6067    mkdir -p $biggiefname
     
    6471    rm -f /tmp/out.dat
    6572    biggienumber=$(($biggienumber+1))
    66     echo -e -n "."
    6773done
    68 echo -en "Done.                                                              \r"
    6974rm -f /slice*
    7075
    71 LogIt "Resolving softlinks"
    72 echo -en "Finalizing softlinks..."
     76LogIt "Populating / with tar file content..." 1
    7377
    7478cd $mountdir
    75 for path in `find | grep -v /etc/fstab` ; do
    76     if [ -d "$path" ] ; then
    77         mkdir /$path 2> /dev/null
    78     else
    79 # Patch from Andrew Bulhak
    80         if [ -h "/$path" ] ; then
    81             # echo "removing symlink /$path"
    82             rm -f /$path
    83         fi
    84 # end patch
    85         mv -f $path /$path
    86     fi
    87 done
    88 cp -f etc/fstab /tmp/fstab
    89 tar cf - sbin bin usr/bin usr/sbin lib usr/lib lib64 usr/lib64 | (cd / ; tar xf -)
     79mv etc/fstab etc/raidtab /tmp
    9080
     81liste=`ls`
     82if [ "$liste" ]; then
     83    tar cf - $liste | (cd / ; tar xf -)
     84    rm -fr $liste
     85fi
    9186cd /
    92 
    93 for i in modprobe lsmod depmod rmmod ; do
    94     [ -e "$mountdir/sbin/$i" ] && ln -sf $mountdir/sbin/$i /sbin/$i
    95 done
    9687
    9788sync;sync;sync
    9889
    99 echo "Done."
    100 
    101 for j in io.sys msdos.sys embleer.B.bz2 embleer.C.bz2 ; do
    102     [ -e "$mountdir/$j" ] && ln -sf $mountdir/$j /$j
    103 done
    104 [ -e "$mountdir/etc/fstab" ] && ln -sf $mountdir/etc/fstab /tmp/fstab
    105 [ -e "$mountdir/etc/raidtab" ] && ln -sf $mountdir/etc/raidtab /tmp/raidtab
     90LogIt "Done." 1
    10691
    10792which gawk 2> /dev/null > /dev/null
  • branches/2.2.5/mindi/rootfs/sbin/untar

    r1731 r1734  
    1616mountpoint=/mnt/floppy
    1717[ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images
    18 [ "$#" -eq "3" ] || Die "untar-and-softlink <tarball> <untar_to> <softlink_to>"
     18[ "$#" -eq "2" ] || Die "untar <tarball> <untar_to>"
    1919diskno=$1
    2020untar_path=$2
    21 #softlink_path=$3
    2221tarball=$mountpoint/$diskno.tar.gz
    2322if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then
Note: See TracChangeset for help on using the changeset viewer.