#---------------------------------------------------------------------------- # /etc/boot.d/rc100.hdboot # # Creation: 2004-06-26 hs # Last Update: $Id$ #---------------------------------------------------------------------------- fli4l_path=/opt/files integrate_opt () { for i in $fli4l_path/* do case $i in "$fli4l_path/lost+found") ;; *) /etc/mklinks.sh $i /`basename $i` ;; esac done } scandevices () { lastdev='' for dev in `sed -n '/ 1 [a-z]/d;s/^[ 0-9]\+\([^ 0-9#]\+[0-9]\{0,1\}\)$/\1/p' /proc/partitions` do basedev=`echo $dev | sed 's/[0-9]\+//'` if [ "$lastdev" != "$basedev" ] then if [ -n "$lastdev" ] then echo $lastdev fi fi lastdev=$dev done if [ -n "$lastdev" ] then echo $lastdev fi } # search for boot-partition if no boot=... was found in append-line begin_script BOOT "mounting boot device ..." boot_fs=vfat boot_dev='' boot_dev1='' boot_timeout=0 if [ "$boot" = "" ] then while [ $boot_timeout -lt 10 ] do rcmd5=`md5sum /tmp/blkid.tmp fi # find swap-partition created with opt_hdinstall typ a or b if [ "$hd_swap" ] then if [ -n "$hd_swap_uuid" ] then # swapon doesn't know about -U Parameter tv=`sed -n "s#/dev/\([sh]d[a-h][1-9]\):.*UUID=\"${hd_swap_uuid}\".*#\1#p" > /etc/fstab swapon -a || log_error "can't activate swapspace" fi fi # Re-Map hd_data if hd_data_uuid is set if [ -n "$hd_data" -a -n "$hd_data_uuid" ] then tv=`sed -n "s#/dev/\([sh]d[a-h][1-9]\):.*UUID=\"${hd_data_uuid}\".*#\1#p" >/etc/fstab e2fsck -p /dev/"$hd_opt" mount /opt || stop "can't mount opt-partition, check drivers" mount -w -o remount /opt # remove old files first rm -rf $fli4l_path mkdir -p $fli4l_path extract_opt /boot/$opt_archive "$unzip_method" "you seem to be out of ram" $fli4l_path mount -r -o remount /opt mount -w -o remount $boot /boot mv /boot/$opt_archive /boot/opt.old end_script else # typ B, optfile already unpacked begin_script BOOT "mounting opt partition ..." rm -rf /opt mkdir /opt if [ -n "$hd_opt_uuid" ] then tv=`sed -n "s#/dev/\([sh]d[a-h][1-9]\):.*UUID=\"${hd_opt_uuid}\".*#\1#p" >/etc/fstab mount /opt || stop "can't mount opt-partition, check drivers" end_script fi if [ -f /tmp/blkid.tmp ] then rm /tmp/blkid.tmp fi if [ "$hd_opt" -a "$fli4l_ramdisk" != "yes" ] then begin_script BOOT "integrating mounted opt partition ..." integrate_opt end_script fi