Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Possible sane approach? (was: enable/disable flags in /etc/default) (http://www.linux-archive.org/debian-development/496532-possible-sane-approach-enable-disable-flags-etc-default.html)

Gerfried Fuchs 03-03-2011 05:58 AM

Possible sane approach? (was: enable/disable flags in /etc/default)
 
Hi!

Some things usually spin in my head for days and I come up with an idea
that looks sane at first sight. This might be such a moment, and I
wonder wether there might be something that I overlooked here:

* Gerfried Fuchs <rhonda@deb.at> [2011-03-02 14:47:22 CET]:
> Actually I explicitly chose to not go down that path for
> wesnoth-server. I settled for this approach:
>
> dh_installinit -u 'stop 20 0 1 2 3 4 5 6 .'

While this might look good at first sight, it has several deficits,
like the rc.d links aren't set for the regular runlevels (for whatever
reason) and update-rc.d foo enable doesn't work because that looks at
the LSB headers.

So I came up with this thought for a postinst snippet:

#v+

# only on new install
if [ "$1" = "configure" ] && [ "x$2" = "x" ]; then
update-rc.d foo defaults >/dev/null
update-rc.d disable foo
fi

#v-

Shouldn't that be a sensible approach with what options we currently
have? If there is some fault in my thinking, please point it out.

Thanks,
Rhonda
--
"What are the differences between Mark Zuckerberg and me? I give private
information on corporations to you for free, and I'm a villain.
Zuckerberg gives your private information to corporations for money and
he's Man of the Year." -- Julian Assange


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110303065859.GA20501@anguilla.debian.or.at">http ://lists.debian.org/20110303065859.GA20501@anguilla.debian.or.at

Gerfried Fuchs 03-03-2011 06:02 AM

Possible sane approach? (was: enable/disable flags in /etc/default)
 
...

Before someone starts to nitpick it and distract from the real content:

* Gerfried Fuchs <rhonda@deb.at> [2011-03-03 07:58:59 CET]:
> #v+
>
> # only on new install
> if [ "$1" = "configure" ] && [ "x$2" = "x" ]; then
> update-rc.d foo defaults >/dev/null
> update-rc.d foo disable
> fi
>
> #v-

Of course foo disable, not disable foo.
Rhonda
--
"What are the differences between Mark Zuckerberg and me? I give private
information on corporations to you for free, and I'm a villain.
Zuckerberg gives your private information to corporations for money and
he's Man of the Year." -- Julian Assange


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110303070250.GA25207@anguilla.debian.or.at">http ://lists.debian.org/20110303070250.GA25207@anguilla.debian.or.at


All times are GMT. The time now is 09:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.