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

View file

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