Revert "xbps-triggers: systemd-service: use --root option."

This reverts commit 14648e5507.
This commit is contained in:
Juan RP 2013-02-25 23:20:53 +01:00
parent 14648e5507
commit 4f9d0e3630
2 changed files with 9 additions and 9 deletions

View File

@ -58,13 +58,13 @@ run)
# package is being removed. # package is being removed.
# stop and disable the unit. # stop and disable the unit.
echo "Stopping systemd service ${_srv}..." echo "Stopping systemd service ${_srv}..."
systemctl --root=. stop ${_srv} >/dev/null 2>&1 || : systemctl stop ${_srv} >/dev/null 2>&1 || :
echo "Disabling systemd service ${_srv}..." echo "Disabling systemd service ${_srv}..."
systemctl --root=. --no-reload disable ${_srv} >/dev/null 2>&1 || : systemctl --no-reload disable ${_srv} >/dev/null 2>&1 || :
else else
# Package update, just disable the unit. # Package update, just disable the unit.
echo "Disabling systemd service ${_srv}..." echo "Disabling systemd service ${_srv}..."
systemctl --root=. --no-reload disable ${_srv} >/dev/null 2>&1 || : systemctl --no-reload disable ${_srv} >/dev/null 2>&1 || :
fi fi
else else
@ -72,10 +72,10 @@ run)
# package is being installed. # package is being installed.
# enable (but don't start) the unit by default. # enable (but don't start) the unit by default.
echo "Enabling systemd service ${_srv}..." echo "Enabling systemd service ${_srv}..."
systemctl --root=. enable ${_srv} >/dev/null 2>&1 || : systemctl enable ${_srv} >/dev/null 2>&1 || :
if [ -n "$systemd_booted" ]; then if [ -n "$systemd_booted" ]; then
# reload systemd if running. # reload systemd if running.
systemctl --root=. daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
cat <<_EOF cat <<_EOF
========================================================================== ==========================================================================
@ -96,16 +96,16 @@ Refer to the systemd documentation if more information is required.
_EOF _EOF
else else
# Enable the unit in case it wasn't added. # Enable the unit in case it wasn't added.
systemctl --root=. enable ${_srv} >/dev/null 2>&1 || : systemctl enable ${_srv} >/dev/null 2>&1 || :
# package is being updated. # package is being updated.
if [ -n "$system_booted" ]; then if [ -n "$system_booted" ]; then
# reload systemd if running. # reload systemd if running.
systemctl --root=. daemon-reload >/dev/null 2>&1 || : systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
if [ -n "$restart" ]; then if [ -n "$restart" ]; then
# try restarting package service. # try restarting package service.
systemctl --root=. try-restart ${_srv} >/dev/null 2>&1 || : systemctl try-restart ${_srv} >/dev/null 2>&1 || :
else else
echo "systemd ${_srv} service must be restarted manually!" echo "systemd ${_srv} service must be restarted manually!"
fi fi

View File

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers' # Template file for 'xbps-triggers'
pkgname=xbps-triggers pkgname=xbps-triggers
version=0.60 version=0.59
revision=1 revision=1
short_desc="The XBPS triggers for Void Linux" short_desc="The XBPS triggers for Void Linux"
maintainer="Juan RP <xtraeme@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"