# Extract block device information from /etc/fstab
local GRUB_ROOTFS=$(awk '/[[:space:]]\/[[:space:]]/ { print $1 }' /etc/fstab)
- local GRUB_BOOTFS=$(awk '/[[:space:]]\/boot[[:space:]]/ { print $1 }' /etc/fstab)
+ local GRUB_BOOTFS=$(awk '/^[^#].+[[:space:]]\/boot[[:space:]]/ { print $1 }' /etc/fstab)
# If /boot is not defined in /etc/fstab, it must be the same as /
[ "x$GRUB_BOOTFS" == 'x' ] && GRUB_BOOTFS=$GRUB_ROOTFS
MODS=`cat /etc/modules/${1}`
for x in ${MODS}
do
- echo -ne "${BOLD} ::${NORMAL} Scanning for ${x}..."
- modprobe ${x} -n
- backup
- echo -ne "${NORMAL}"
+ MLOAD=`echo ${MLIST} | sed -e "s/.*${x}.*/${x}/"`
+ if [ "${MLIST}" = "${x}" ] # Only module to no-load
+ then
+ echo -e "${BOLD} ::${NORMAL} Skipping ${x}..."
+ elif [ "${MLOAD}" = "${MLIST}" ] # == No change == No specified no-load
+ then
+ echo -ne "${BOLD} ::${NORMAL} Scanning for ${x}..."
+ modprobe ${x} -n
+ backup
+ echo -ne "${NORMAL}"
+ else
+ echo -e "${BOLD} ::${NORMAL} Skipping ${x}..."
+ fi
done
}
}
runUdev() {
-
mount -t tmpfs -o size=100k udev /dev
mkdir /dev/pts
mkdir /dev/shm
ln -snf /proc/self/fd/1 /dev/stdout
ln -snf /proc/self/fd/2 /dev/stderr
ln -snf /proc/kcore /dev/core
-
}
real_init\=*)
REAL_INIT=`parse_opt "${x}"`
;;
+ scandelay=\*)
+ SDELAY=`parse_opt "${x}"`
+ ;;
scandelay)
SDELAY=10
;;
- *)
+ noload\=*)
+ MLIST=`parse_opt "${x}"`
+ MLIST="`echo ${MLIST} | sed -e \"s/,/ /\"`"
+ export MLIST
;;
esac
done
fi
fi
+bootstrapCD() {
if [ "${CDROOT_DEV}" = '' ]
then
findcdmount /newroot/dev/cdroms/*
# Device specified on command line
findcdmount /newroot/${CDROOT_DEV}
fi
+}
+
+ bootstrapCD
+ if [ "${REAL_ROOT}" = '' ]
+ then
+ echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices"
+ sleep 3
+ echo -n '.'
+ sleep 3
+ echo -n '.'
+ sleep 3
+ echo -n '.'
+ sleep 1
+ echo -e "${NORMAL}"
+ bootstrapCD
+ fi
if [ "${REAL_ROOT}" = '' ]
then
then
umount /tmp/.initrd/proc || echo '*: Failed to unmount the initrd /proc!'
mount -n --move /tmp/.initrd/dev dev || echo '*: Failed to move over the /dev tree!'
- rm /tmp/.initrd/dev -rf || '*: Failed to remove the initrd /dev!'
+ rm -rf /tmp/.initrd/dev || '*: Failed to remove the initrd /dev!'
elif [ "${USE_UDEV_NORMAL}" -eq '1' ]
then
rm /tmp/.initrd/dev/fd || echo '*: Failed to rm the initrd fd!'
umount /tmp/.initrd/proc || echo "*: Failed to unmount the initrd /proc!"
umount /dev 2>/dev/null
mount -n --move /tmp/.initrd/dev dev 2>/dev/null
- rm /tmp/.initrd/dev -rf || '*: Failed to remove the initrd /dev!'
+ rm -rf /tmp/.initrd/dev || '*: Failed to remove the initrd /dev!'
umount /sys 2>/dev/null
umount /tmp/.initrd/sys 2>/dev/null
#!/bin/bash
# Genkernel v3
-GK_V='3.1.0d'
+GK_V='3.1.0e'
TEMP='/var/tmp/genkernel'
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.
echo
echo
eval ${CMD_POSTCONF} | tee -a ${DEBUGFILE}
+ CMD_STATUS="${PIPESTATUS[0]}"
echo
- print_info 1 "<<< Postconf callback exit status: ${PIPESTATUS[0]}"
+ print_info 1 "<<< Postconf callback exit status: ${CMD_STATUS}"
+ [ "${CMD_STATUS}" -ne 0 ] && gen_die '--postconf failed!'
else
echo
print_info 1 '>>> Postconf cancelled...'
[ -z "${GENSPLASH_THEME}" ] && [ -e /etc/conf.d/splash ] && source /etc/conf.d/splash
[ -z "${GENSPLASH_THEME}" ] && GENSPLASH_THEME=default
print_info 1 " >> Installing gensplash [ using the ${GENSPLASH_THEME} theme ]..."
+ # 2.6.9
sed -i -e 's:$(obj)/gen_init_cpio $(initramfs-y) FORCE:$(if $(shell [ ! -f $(obj)/initramfs_data.cpio ] \&\& echo 1 ), $(obj)/gen_init_cpio $(initramfs-y)):' ${KERNEL_DIR}/usr/Makefile
+ # 2.6.10
+ sed -i -e 's:$(obj)/gen_init_cpio \\:$(if $(shell [ ! -f $(obj)/initramfs_data.cpio ] \&\& echo 1 ), $(obj)/gen_init_cpio $(initramfs-y) $(obj)/initramfs_list):' -e 's:$(initramfs-y) $(obj)/initramfs_list FORCE::' ${KERNEL_DIR}/usr/Makefile
splash_geninitramfs -g ${KERNEL_DIR}/usr/initramfs_data.cpio.gz ${GENSPLASH_THEME}
gunzip ${KERNEL_DIR}/usr/initramfs_data.cpio.gz
else
echo
echo
eval ${CMD_CALLBACK} | tee -a ${DEBUGFILE}
+ CMD_STATUS="${PIPESTATUS[0]}"
echo
- print_info 1 "<<< Callback exit status: ${PIPESTATUS[0]}"
+ print_info 1 "<<< Callback exit status: ${CMD_STATUS}"
+ [ "${CMD_STATUS}" -ne 0 ] && gen_die '--callback failed!'
else
echo
print_info 1 ">>> Callback cancelled..."