|
From: Serge L. <sma...@us...> - 2009-01-07 06:37:19
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6698/initrd Modified Files: linuxrc mount_cdrom Log Message: - cleanups and workaround for "Run from RAM" mode Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- linuxrc 9 Sep 2008 21:03:35 -0000 1.102 +++ linuxrc 7 Jan 2009 06:37:14 -0000 1.103 @@ -166,11 +166,11 @@ } mod_config() { - [ ! -e /etc/sysconfig/config.org ] && cp /etc/sysconfig/config /etc/sysconfig/config.org - rm -f /etc/sysconfig/config.tmp - cp /etc/sysconfig/config /etc/sysconfig/config.tmp - sed s/"$1"/"$2"/ /etc/sysconfig/config.tmp > /etc/sysconfig/config - rm -f /etc/sysconfig/config.tmp + [ ! -e /etc-mods/sysconfig/config.org ] && cp /etc-mods/sysconfig/config /etc-mods/sysconfig/config.org + rm -f /etc-mods/sysconfig/config.tmp + cp /etc-mods/sysconfig/config /etc-mods/sysconfig/config.tmp + sed s/"$1"/"$2"/ /etc-mods/sysconfig/config.tmp > /etc-mods/sysconfig/config + rm -f /etc-mods/sysconfig/config.tmp } ask_yes_no() Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- mount_cdrom 3 Jun 2008 16:33:58 -0000 1.45 +++ mount_cdrom 7 Jan 2009 06:37:14 -0000 1.46 @@ -158,10 +158,10 @@ CDROM ) # don't keep it mounted while copying /sbin/umount -n ${mountpoint} # it's a CDROM drive therefore we use a blocksize of 2k - dd if=$disk of=${RAMDISK}/${ISOFILE} bs=2048 >/dev/null 2>&1 + dd if=$disk of=${RAMDISK}/${ISOFILE} bs=2048 >/dev/null 2>&1 || COPY2RAM='fail' ;; FILE ) # it's a file so copy will do - cp ${FILEMOUNT}/${ISOFILE} ${RAMDISK}/${ISOFILE} >/dev/null 2>&1 + cp ${FILEMOUNT}/${ISOFILE} ${RAMDISK}/${ISOFILE} >/dev/null 2>&1 || COPY2RAM='fail' ;; esac busy_stop @@ -179,7 +179,8 @@ # check if ramdisk is full, then this is an indication that the image was to big during # copying - this should never happen, but better save than sorry - if [ "$(df ${RAMDISK} | grep "${RAMDISK}" | awk '{print $(NF-2)}')" -eq 0 ]; then +# if [ "$(df ${RAMDISK} | grep "${RAMDISK}" | awk '{print $(NF-2)}')" -eq 0 ]; then + if [ x"$COPY2RAM" = "xfail" ]; then $RED; echo "ERROR: ramdisk size calculation error" echo " the image to copy was bigger than expected" |