Phil Huang
Committed by Gerrit Code Review

Adding init-functions file for enviroment of LSB-compliant init scripts

In Ubuntu 14.04 and 16.04, the file of init-functions is placed in /lib/lsb/.

Change-Id: I101ee08a7b7795c41d9ec3eb8833bee0e2f38e1c
...@@ -41,7 +41,12 @@ startonos () { ...@@ -41,7 +41,12 @@ startonos () {
41 cmd=$1 41 cmd=$1
42 shift 42 shift
43 # Start ONOS as a daemon 43 # Start ONOS as a daemon
44 - . /etc/init.d/functions && true 44 + if test -f /lib/lsb/init-functions; then
45 + . /lib/lsb/init-functions
46 + else
47 + . /etc/init.d/functions && true
48 + fi
49 +
45 if type daemon | grep -i function >/dev/null 2>&1; then 50 if type daemon | grep -i function >/dev/null 2>&1; then
46 # Use 'daemon' function if available 51 # Use 'daemon' function if available
47 # Shell metacharacters are passed as arguments to daemon 52 # Shell metacharacters are passed as arguments to daemon
......