It was, but for some reason it still wasn't taking. I noticed a
warning message complaining about an %end directive being missing,
although it was just a deprecation warning. When I included this
directive at the end of my kickstart file, it seemed to get into line.
On Fri, Nov 19, 2010 at 12:57 PM, Tom Atkinson <tom_atkinson(a)fsfe.org> wrote:
On Fri, 2010-11-19 at 11:25 -0800, msacks wrote:
> 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
> livecd(a)lists.fedoraproject.org
>
https://admin.fedoraproject.org/mailman/listinfo/livecd
>
Put it in the spec file's %post section instead of the kickstart.
--
livecd mailing list
livecd(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/livecd