]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/patches/00git-start-statd-systemd.patch
Merge branch 'sid'
[nfs-utils.git] / debian / patches / 00git-start-statd-systemd.patch
1 Description: Latest start-statd script from 1.3.2 to start rpc-statd.service under systemd
2 Origin: upstream, from 1.3.2
3
4 Index: nfs-utils-1.2.8/utils/statd/start-statd
5 ===================================================================
6 --- nfs-utils-1.2.8.orig/utils/statd/start-statd
7 +++ nfs-utils-1.2.8/utils/statd/start-statd
8 @@ -1,9 +1,16 @@
9 -#!/bin/bash -p
10 +#!/bin/sh
11  # nfsmount calls this script when mounting a filesystem with locking
12  # enabled, but when statd does not seem to be running (based on
13  # /var/run/rpc.statd.pid).
14  # It should run statd with whatever flags are apropriate for this
15  # site.
16 -PATH=/sbin:/usr/sbin
17 -exec rpc.statd --no-notify
18 +PATH="/sbin:/usr/sbin:/bin:/usr/bin"
19 +
20 +# First try systemd if it's installed.
21 +if [ -d /run/systemd/system ]; then
22 +    # Quit only if the call worked.
23 +    systemctl start rpc-statd.service && exit
24 +fi
25  
26 +# Fall back to launching it ourselves.
27 +exec rpc.statd --no-notify