From: Eric Edgar Date: Mon, 11 Jul 2005 13:43:45 +0000 (+0000) Subject: Fix to let the /mnt/cdrom/cdupdate.sh script run just before the chroot X-Git-Tag: v3.4.10.902~508 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f0f4568d8e8632be5f60865cbe8b85a1f4cfa2c;p=genkernel.git Fix to let the /mnt/cdrom/cdupdate.sh script run just before the chroot git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@244 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- 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"