[Pkg-ltsp-devel] Bug#758093: Bug#758093: ltspfsd: quietly fails with systemd as init system
Petter Reinholdtsen
pere at hungry.com
Mon Aug 18 08:16:03 UTC 2014
[Vagrant Cascadian]
> --- a/scripts/ltspfs_entry
> +++ b/scripts/ltspfs_entry
> @@ -101,14 +101,13 @@ remove_device()
>
> start_ltspfsd()
> {
> - if [ ! -e /var/run/ltspfsd.pid ] && [ -z "$(pgrep ltspfsd)" ]; then
> + if [ -z "$(pgrep ltspfsd)" ]; then
> # Make this sessions secret auth cookie for ltspfs
> if [ ! -f /var/run/ltspfs_token ]; then
> mcookie > /var/run/ltspfs_token
> fi
> # start up the ltspfsd daemon
> - /usr/bin/ltspfsd
> - echo $! >/var/run/ltspfsd.pid
> + systemctl start ltspfsd || /usr/bin/ltspfsd
> fi
> }
Perhaps better to use a test like [ -d /run/systemd/system ] around the
call to systemctl to detect a running systemd, and keep using the pid
file for non-systemd environments?
--
Happy hacking
Petter Reinholdtsen
More information about the Pkg-ltsp-devel
mailing list