I am trying to get a custom init script to start up at boot time on a
livecd I am spinning, but for some reason it isn't getting picked up.
Here is the recount of what I've done:

I created a custom init script (/etc/init.d/custombinary) as follows
and put it in an rpm with my binary:

#!/bin/bash
#
# custombinary          Start up the custombinary utility
#
# chkconfig: 2345 55 25
# description: This service starts up a custombinary
#
# processname: custombinary

### BEGIN INIT INFO
# Provides: custombinary
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: run custom binary
# Description:      Custom binary init script script to be used with liveCD
### END INIT INFO

# source function library
. /etc/rc.d/init.d/functions


start()
{
        echo "Starting custom binary"
        /opt/custom/bin/custombinary
}

stop()
{
        echo "Shutdown"
        killall -9 custombinary
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        *)
                echo "Usage: start | stop"
                exit 1
                ;;
esac
exit $?

I package the rpm and init script, both of those get pushed out to the
liveCD with no problem.

In my spin-kickstart file I have the following line:
%post --log=/tmp/my-post.log

/sbin/chkconfig --add custombinary
/sbin/chkconfig --level 35 custombinary on




When I run livecd-creator, I don't get any errors.
When I run a chkconfig --list custombinary I get an error saying

service custombinary supports chkconfig, but is not referenced in any
runlevel (run 'chkconfig --add custombinary'


What is super-confusing is that my init script works with chkconfig if I run
/sbin/chkconfig --add custombinary
/sbin/chkconfig --level 35 custombinary on

once my livecd is booted up, but for some reason it isn't getting
turned on by default during the livecd creation.
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to