--- genkernel.orig 2004-05-30 22:07:59.000000000 +0100 +++ genkernel.orig 2004-05-31 15:58:14.843367131 +0100 @@ -56,6 +56,18 @@ NORMAL=${BOLD} print_info 1 "Compiling Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." echo +isBootRO() +{ + for mo in `grep "/boot" /proc/mounts |awk '{print $4}'|sed -e 's/,/ /'` + do + if [ "x${mo}x" == "xrox" ] + then + return 0 + fi + done + return 1 +} + if ! has_loop then modprobe loop 2>/dev/null @@ -86,6 +98,19 @@ print_warning 1 ' Run ``mount /boot`` to mount it!' echo fi +elif isBootRO +then + if isTrue ${MOUNTBOOT} + then + if ! mount -o remount,rw /boot + then + print_warning 1 "${BOLD}WARNING${NORMAL}: Failed to remount /boot rw!" + echo + else + print_info 1 "mount: /boot remounted readwrite successfully!" + BOOTRW=1 + fi + fi fi # Check whether another Genkernel is running @@ -187,6 +212,11 @@ gen_minkernpackage fi +if [ "${BOOTRW}" != "" ] +then + mount -o remount,ro /boot +fi + print_info 1 '' print_info 1 "Kernel compiled successfully!" print_info 1 ''