Message ID | 20191206234649.3972927-5-aduskett@gmail.com |
---|---|
State | Rejected, archived |
Headers | show |
Series | [v6,1/6] package/polkit: bump to version 0.116 | expand |
Hello, +Carlos in Cc for the review of the init script. On Fri, 6 Dec 2019 15:46:48 -0800 aduskett@gmail.com wrote: > diff --git a/package/polkit/S50polkit b/package/polkit/S50polkit > new file mode 100644 > index 0000000000..55c10e99ae > --- /dev/null > +++ b/package/polkit/S50polkit > @@ -0,0 +1,15 @@ > +#!/bin/sh > +# > +# start polkitd > +# > + > +case "$1" in > + start) > + start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug & Why is the & necessary at this end ? I think this init script deserves a comment that explains why it doesn't follow the traditional pattern for init scripts. Thanks! Thomas
On Sun, Dec 8, 2019 at 12:08 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > > Hello, > > +Carlos in Cc for the review of the init script. > > On Fri, 6 Dec 2019 15:46:48 -0800 > aduskett@gmail.com wrote: > > > diff --git a/package/polkit/S50polkit b/package/polkit/S50polkit > > new file mode 100644 > > index 0000000000..55c10e99ae > > --- /dev/null > > +++ b/package/polkit/S50polkit > > @@ -0,0 +1,15 @@ > > +#!/bin/sh > > +# > > +# start polkitd > > +# > > + > > +case "$1" in > > + start) > > + start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug & > > Why is the & necessary at this end ? > > I think this init script deserves a comment that explains why it > doesn't follow the traditional pattern for init scripts. > > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Why is a polkitd init script requited if, according to the man page DESCRIPTION polkitd provides the org.freedesktop.PolicyKit1 D-Bus service on the system message bus. Users or administrators should never need to start this daemon as it will be automatically started by dbus-daemon(1) or systemd(1) whenever an application calls into the service.
diff --git a/package/polkit/S50polkit b/package/polkit/S50polkit new file mode 100644 index 0000000000..55c10e99ae --- /dev/null +++ b/package/polkit/S50polkit @@ -0,0 +1,15 @@ +#!/bin/sh +# +# start polkitd +# + +case "$1" in + start) + start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug & + ;; + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? diff --git a/package/polkit/polkit.mk b/package/polkit/polkit.mk index b440cd2f1c..8bb4512aee 100644 --- a/package/polkit/polkit.mk +++ b/package/polkit/polkit.mk @@ -44,4 +44,9 @@ define POLKIT_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/polkit.service endef +define POLKIT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/polkit/S50polkit \ + $(TARGET_DIR)/etc/init.d/S50polkit +endef + $(eval $(autotools-package))