diff options
author | B. Stack <bgstack15@gmail.com> | 2022-07-15 08:16:03 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-07-15 08:16:03 -0400 |
commit | 9119a233dc67fea8abea0156a653a508a0a3e082 (patch) | |
tree | 09081f2beada632db3bb28b5f02e4d6c808a62ce | |
parent | v0.0.3 closes #688 (diff) | |
download | systemctl-service-shim-9119a233dc67fea8abea0156a653a508a0a3e082.tar.gz systemctl-service-shim-9119a233dc67fea8abea0156a653a508a0a3e082.tar.bz2 systemctl-service-shim-9119a233dc67fea8abea0156a653a508a0a3e082.zip |
v0.0.4 add action presetupstream/0.0.4devuan/0.0.4
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | systemctl | 16 |
3 files changed, 26 insertions, 3 deletions
@@ -1,5 +1,10 @@ +systemctl-service-shim 0.0.4 +============================ +2022-07-14 +* Add action `preset` + systemctl-service-shim 0.0.3 -=========================== +============================ 2022-07-12 * Package now provides the /bin/systemctl symlink needed by freeipa-client. * Action `try-restart` is now converted down to `restart`. diff --git a/debian/changelog b/debian/changelog index c19065f..17e25c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +systemctl-service-shim (0.0.4-1) unstable; urgency=low + + * Add action 'preset' + + -- B. Stack <bgstack15@gmail.com> Thu, 14 Jul 2022 19:54:37 -0400 + systemctl-service-shim (0.0.3-1) unstable; urgency=low * Add /bin/systemctl symlink directly to package (Closes: #688) @@ -14,12 +14,12 @@ # 2021-01-10 adapted for inclusion in devuan-sanity # 2021-10-20 add /bin/systemctl symlink control logic # 2022-07-12 Convert try-restart to restart +# 2022-07-14 Add preset, which runs update-rc.d ${service} defaults # Usage: # Should be mostly like systemctl from systemd. # Reference: ftemplate.sh 2019-05-02a ; framework.sh 2018-05-02a # man 1 systemctl # Improve: -# add preset command # Return 1 if status output is failed # Dependencies: # req-devuan: moreutils @@ -29,7 +29,7 @@ # in some service scripts that look for /bin/systemctl # vim: set sw=3 sts=3 ts=3 et: fiversion="2019-05-02a" -systemctlversion="2022-07-12a" +systemctlversion="2022-07-14a" usage() { ${PAGER:-/usr/bin/less -F} >&2 <<ENDUSAGE @@ -423,6 +423,18 @@ case "${action}" in done ;; + preset) + x=1 + while test ${x:-${thiscount}} -le $(( thiscount - 1 )) && test ${thiscount} -gt 1 ; + do + eval thisopt="\${opt${x}}" + thisopt="$( echo "${thisopt}" | sed -r -e 's/\.service$//;' )" + actionstatement="$( printf "%s" "update-rc.d ${thisopt} defaults;" )" + actionlist="${actionlist:+${actionlist} }${actionstatement}" + x=$(( x + 1 )) + done + ;; + enable|disable|mask|unmask) case "${action}" in mask) action=disable ;; |