Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122154 - catalyst creates default runlevel for each rcadd
Summary: catalyst creates default runlevel for each rcadd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-02-08 10:29 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2006-04-25 08:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-08 10:29:32 UTC
running catalyst 2.0rc33

from my stage4 spec file:

stage4/rcadd:
        coldplug|default
        syslog-ng|default
        net.eth2|default
        ntp-client|default
        ntpd|default
        sshd|default

and the output during the build:

...
Running action sequence: rcupdate
copying rc-update.sh to /brontes/installer/catalyst/tmp/foo/stage4-amd64-20060207.1/tmp/
copying chroot-functions.sh to /brontes/installer/catalyst/tmp/foo/stage4-amd64-20060207.1/tmp/
Running rc-update.sh in chroot /brontes/installer/catalyst/tmp/foo/stage4-amd64-20060207.1/
Adding coldplug to default
Runlevel default doesn't exist .... creating it
 * coldplug added to runlevel default
 * rc-update complete.
Adding syslog-ng to default
Runlevel default doesn't exist .... creating it
 * syslog-ng added to runlevel default
 * rc-update complete.
Adding net.eth2 to default
Runlevel default doesn't exist .... creating it
 * /sbin/rc-update: /etc/init.d/net.eth2 not found; aborting.
Adding ntp-client to default
Runlevel default doesn't exist .... creating it
 * ntp-client added to runlevel default
 * rc-update complete.
Adding ntpd to default
Runlevel default doesn't exist .... creating it
 * ntpd added to runlevel default
 * rc-update complete.
Adding sshd to default
Runlevel default doesn't exist .... creating it
 * sshd added to runlevel default
 * rc-update complete.
removing /brontes/installer/catalyst/tmp/foo/stage4-amd64-20060207.1/tmp/chroot-functions.sh from the chroot
Running action sequence: unmerge
Running action sequence: unbind
...

build completes and the init scripts are added to the proper runlevel.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-08 12:28:15 UTC
So what exactly is it doing wrong?  Simply throwing extra output?
Comment 2 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-08 12:58:30 UTC
yes, functionally it is just extra output. if catalyst is actually creating runlevel 'default' each time, it is not harming anything.
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-10 07:52:38 UTC
Fixed in 2.0_rc36
Comment 4 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-14 15:06:27 UTC
still happening with Gentoo Catalyst, version 2.0_rc38
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-14 15:19:17 UTC
Please paste some output.  I modified the code here, so I'm really wondering how you could possibly be still getting the error.
Comment 6 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-14 15:43:41 UTC
output with Gentoo Catalyst, version 2.0_rc38 looks the same:

...
Running action sequence: root_overlay
Running action sequence: fsscript
Running action sequence: preclean
copying stage4-preclean-chroot.sh to /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/
copying chroot-functions.sh to /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/
Running stage4-preclean-chroot.sh in chroot /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/
removing /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/chroot-functions.sh from the chroot
Running action sequence: rcupdate
copying rc-update.sh to /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/
copying chroot-functions.sh to /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/
Running rc-update.sh in chroot /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/
Adding coldplug to default
Runlevel default doesn't exist .... creating it
 * coldplug added to runlevel default
 * rc-update complete.
Adding syslog-ng to default
Runlevel default doesn't exist .... creating it
 * syslog-ng added to runlevel default
 * rc-update complete.
Adding ntp-client to default
Runlevel default doesn't exist .... creating it
 * ntp-client added to runlevel default
 * rc-update complete.
Adding ntpd to default
Runlevel default doesn't exist .... creating it
 * ntpd added to runlevel default
 * rc-update complete.
Adding sshd to default
Runlevel default doesn't exist .... creating it
 * sshd added to runlevel default
 * rc-update complete.
removing /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/tmp/chroot-functions.sh from the chroot
Running action sequence: unmerge
Running action sequence: unbind
umount: /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/dev: device is busy
umount: /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2/dev: device is busy
!!! catalyst: First attempt to unmount: /brontes/installer/catalyst/tmp/trident/stage4-amd64-20060207.2//dev failed.
!!! catalyst: Killing any pids still running in the chroot
Checking for processes running in chroot and killing them.
...

in my spec (lines are indented with tabs):

stage4/rcadd:
        coldplug|default
        syslog-ng|default
        ntp-client|default
        ntpd|default
        sshd|default


could this be the problem. in /usr/lib/catalyst2/targets/support/rc-update.sh:


                        echo "Adding ${x%%|*} to ${x##*|}"
                        if [ ! -d /etc/runlevels/${x##|*} ]
                        then
                                echo "Runlevel ${x##*|} doesn't exist .... creating it"
                                mkdir -p "/etc/runlevels/${x##*|}"
                        fi
                        rc-update add "${x%%|*}" "${x##*|}"


if [ ! -d /etc/runlevels/${x##|*} ]
should really be
if [ ! -d /etc/runlevels/${x##*|} ]


Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-14 16:31:51 UTC
Could you post lines 52 though 58 of targets/support/rc-update.sh here?

Thanks
Comment 8 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-15 07:49:41 UTC
50:             for x in ${clst_rcadd}
51:             do
52:                     echo "Adding ${x%%|*} to ${x##*|}"
53:                     if [ ! -d /etc/runlevels/${x##|*} ]
54:                     then
55:                             echo "Runlevel ${x##*|} doesn't exist .... creating it"
56:                             mkdir -p "/etc/runlevels/${x##*|}"
57:                     fi
58:                     rc-update add "${x%%|*}" "${x##*|}"
59:             done
Comment 9 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-02-15 08:03:20 UTC
this patch fixes the problem:

--- rc-update.sh.orig   2006-02-15 10:50:31.000000000 -0500
+++ rc-update.sh        2006-02-15 10:53:44.000000000 -0500
@@ -50,7 +50,7 @@
                for x in ${clst_rcadd}
                do
                        echo "Adding ${x%%|*} to ${x##*|}"
-                       if [ ! -d /etc/runlevels/${x##|*} ]
+                       if [ ! -d /etc/runlevels/${x##*|} ]
                        then
                                echo "Runlevel ${x##*|} doesn't exist .... creating it"
                                mkdir -p "/etc/runlevels/${x##*|}"
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2006-02-15 08:58:37 UTC
I've fixed this in CVS... thanks for the bug report and the patch... =]
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2006-04-25 08:04:47 UTC
This is fixed in catalyst for a bit now.