diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 4a1043d..83b3c04 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -473,16 +473,22 @@ verbose_kmsg() { cdupdate() { - if [ -x /${NEW_ROOT}/mnt/cdrom/cdupdate.sh ] - then - ${NEW_ROOT}/mnt/cdrom/cdupdate.sh - if [ "$?" != '0' ] + if [ "${CDROOT}" -eq '1' ] then - splash 'verbose' - bad_msg "FAILED TO EXECUTE cdupdate.sh" - run_shell - fi - fi + if [ -x /${NEW_ROOT}/mnt/cdrom/cdupdate.sh ] + then + good_msg "Running cdupdate.sh" + ${NEW_ROOT}/mnt/cdrom/cdupdate.sh + if [ "$?" != '0' ] + then + splash 'verbose' + bad_msg "FAILED TO EXECUTE cdupdate.sh" + run_shell + fi + else + good_msg "no cdupdate.sh script found .... skipping" + fi + fi } rundebugshell(){ diff --git a/generic/linuxrc b/generic/linuxrc index c6ab10e..1cd0c91 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -486,6 +486,9 @@ else mkdir -p ${NEW_ROOT}/tmp/.initrd fi +# Execute script on the cdrom just before boot to update things if necessary +cdupdate + if [ "${SUBDIR}" != '' -a -e "${CHROOT}/${SUBDIR}" ] then good_msg"Entering ${SUBDIR} to boot"