From 04a23330e4a2085ee91980c223c5e4f089ebbe97 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 4 Apr 2018 14:58:01 +0200 Subject: Merge preprocessing of command lines - Common function for splitting string into argument vector - Preprocess & split command lines while parsing the service file - Specify "before" and "after" dependencies in a single line Signed-off-by: David Oberhollenzer --- services/loopback.in | 3 +-- services/reboot.in | 4 +--- services/shutdown.in | 4 +--- services/sigkill.in | 4 +--- services/sigterm.in | 5 +---- services/sync.in | 6 ++---- services/sysctl.in | 3 +-- 7 files changed, 8 insertions(+), 21 deletions(-) (limited to 'services') diff --git a/services/loopback.in b/services/loopback.in index c44306c..a01225a 100644 --- a/services/loopback.in +++ b/services/loopback.in @@ -2,8 +2,7 @@ description configure network loopback device type wait target boot before sysinit -after hwclock -after hostname +after hwclock hostname exec "@SBINPATH@/ip" addr add 127.0.0.1/8 dev lo brd + exec "@SBINPATH@/ip" link set lo up diff --git a/services/reboot.in b/services/reboot.in index 3c3c689..da11e2a 100644 --- a/services/reboot.in +++ b/services/reboot.in @@ -2,6 +2,4 @@ description system reboot exec "@SBINPATH@/shutdown" -nrf type wait target reboot -after sync -after sigkill -after sigterm +after sync sigkill sigterm diff --git a/services/shutdown.in b/services/shutdown.in index c357b36..6c28621 100644 --- a/services/shutdown.in +++ b/services/shutdown.in @@ -2,6 +2,4 @@ description system shutdown exec "@SBINPATH@/shutdown" -npf type wait target shutdown -after sync -after sigkill -after sigterm +after sync sigkill sigterm diff --git a/services/sigkill.in b/services/sigkill.in index 8f09dd5..cddd49d 100644 --- a/services/sigkill.in +++ b/services/sigkill.in @@ -3,6 +3,4 @@ exec "@SCRIPTDIR@/killall5" 9 type wait target %0 after sigterm -before sync -before shutdown -before reboot +before sync shutdown reboot diff --git a/services/sigterm.in b/services/sigterm.in index b00610c..45dda0e 100644 --- a/services/sigterm.in +++ b/services/sigterm.in @@ -3,7 +3,4 @@ exec "@SCRIPTDIR@/killall5" 15 exec "@BINPATH@/sleep" 5 type wait target %0 -before sigkill -before sync -before reboot -before shutdown +before sigkill sync reboot shutdown diff --git a/services/sync.in b/services/sync.in index 0ffb9a5..7f02287 100644 --- a/services/sync.in +++ b/services/sync.in @@ -2,7 +2,5 @@ description sync exec "@BINPATH@/sync" type wait target %0 -after sigkill -after sigterm -before reboot -before shutdown +after sigkill sigterm +before reboot shutdown diff --git a/services/sysctl.in b/services/sysctl.in index 61edaf3..2221480 100755 --- a/services/sysctl.in +++ b/services/sysctl.in @@ -3,5 +3,4 @@ exec "@SBINPATH@/sysctl" --system type wait target boot before sysinit -after hwclock -after hostname +after hwclock hostname -- cgit v1.2.3