On Tue, Jan 25, 2005 at 02:07:24AM -0800, Arnaud Kyheng said: > > Hi Steve, > > Thank you very much for your contribution. > > I just have a question about the patch. Suppose that > you want GNUnet to be launched at startup. Then after > a few days, you don't want GNUnet to autostart > anymore. To do so you invoke dpkg-reconfigure gnunet > to set the value to false. > > Shouldn't I add this line to the patch ? > > cp -f $CONFIG_NEW $CONFIG_FILE > @@ -788,6 +787,17 @@ > # Cleaning > rm -f $CONFIG_NEW > echo "All done." > + if [ "$launch_at_startup" = 'true' ]; then > + if [ -x "/etc/init.d/gnunet" ]; then > + update-rc.d gnunet defaults >/dev/null > + if [ -x /usr/sbin/invoke-rc.d ]; then > + invoke-rc.d gnunet start || exit 0 > + else > + /etc/init.d/gnunet start || exit 0 > + fi > + fi > -> > -> else > -> update-rc.d gnunet remove >/dev/null || > exit 0 > -> > + fi > +
I would drop the exit 0, or change it to 'true', like so: + if [ "$launch_at_startup" = 'true' ]; then + if [ -x "/etc/init.d/gnunet" ]; then + update-rc.d gnunet defaults >/dev/null + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d gnunet start || exit 0 + else + /etc/init.d/gnunet start || exit 0 + fi + fi + else + update-rc.d gnunet remove >/dev/null || true + fi + I think the exit 0 statement would make the script exit prematurely, before anything else is run. I can't remember all the context of the diff now, so it may or may not be what you want. Take care, -- -------------------------------------------------------------------------- | Stephen Gran | It is amazing how complete is the | | [EMAIL PROTECTED] | delusion that beauty is goodness. | | http://www.lobefin.net/~steve | | --------------------------------------------------------------------------
pgpxUzPtmkTPZ.pgp
Description: PGP signature

