archlinux: update install script based on spec file
This commit is contained in:
parent
9ea49e3f83
commit
973c688c10
@ -97,16 +97,25 @@ done
|
|||||||
|
|
||||||
update_systemd() {
|
update_systemd() {
|
||||||
|
|
||||||
for srv in qubes-dvm qubes-meminfo-writer qubes-sysinit qubes-misc-post qubes-netwatcher qubes-network qubes-firewall qubes-yum-proxy qubes-qrexec-agent; do
|
for srv in qubes-dvm qubes-misc-post qubes-netwatcher qubes-network qubes-firewall qubes-yum-proxy qubes-qrexec-agent; do
|
||||||
systemctl enable $srv.service 2> /dev/null
|
systemctl enable $srv.service 2> /dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
systemctl enable qubes-update-check.timer 2> /dev/null
|
systemctl enable qubes-update-check.timer 2> /dev/null
|
||||||
|
|
||||||
|
UNITDIR=/lib/systemd/system
|
||||||
|
OVERRIDEDIR=/usr/lib/qubes/init
|
||||||
|
|
||||||
# Install overriden services only when original exists
|
# Install overriden services only when original exists
|
||||||
for srv in cups NetworkManager NetworkManager-wait-online ntpd; do
|
for srv in cups NetworkManager NetworkManager-wait-online ntpd chronyd; do
|
||||||
if [ -f /lib/systemd/system/$srv.service ]; then
|
if [ -f $UNITDIR/$srv.service ]; then
|
||||||
cp /usr/lib/qubes/init/$srv.service /etc/systemd/system/$srv.service
|
cp $OVERRIDEDIR/$srv.service /etc/systemd/system/
|
||||||
|
fi
|
||||||
|
if [ -f $UNITDIR/$srv.socket -a -f $OVERRIDEDIR/$srv.socket ]; then
|
||||||
|
cp $OVERRIDEDIR/$srv.socket /etc/systemd/system/
|
||||||
|
fi
|
||||||
|
if [ -f $UNITDIR/$srv.path -a -f $OVERRIDEDIR/$srv.path ]; then
|
||||||
|
cp $OVERRIDEDIR/$srv.service /etc/systemd/system/
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -119,6 +128,7 @@ DISABLE_SERVICES="$DISABLE_SERVICES fedora-autorelabel fedora-autorelabel-mark i
|
|||||||
DISABLE_SERVICES="$DISABLE_SERVICES mdmonitor multipathd openct rpcbind mcelog fedora-storage-init fedora-storage-init-late"
|
DISABLE_SERVICES="$DISABLE_SERVICES mdmonitor multipathd openct rpcbind mcelog fedora-storage-init fedora-storage-init-late"
|
||||||
DISABLE_SERVICES="$DISABLE_SERVICES plymouth-start plymouth-read-write plymouth-quit plymouth-quit-wait"
|
DISABLE_SERVICES="$DISABLE_SERVICES plymouth-start plymouth-read-write plymouth-quit plymouth-quit-wait"
|
||||||
DISABLE_SERVICES="$DISABLE_SERVICES sshd tcsd sm-client sendmail mdmonitor-takeover"
|
DISABLE_SERVICES="$DISABLE_SERVICES sshd tcsd sm-client sendmail mdmonitor-takeover"
|
||||||
|
DISABLE_SERVICES="$DISABLE_SERVICES rngd smartd upower irqbalance colord"
|
||||||
for srv in $DISABLE_SERVICES; do
|
for srv in $DISABLE_SERVICES; do
|
||||||
if [ -f /lib/systemd/system/$srv.service ]; then
|
if [ -f /lib/systemd/system/$srv.service ]; then
|
||||||
if fgrep -q '[Install]' /lib/systemd/system/$srv.service; then
|
if fgrep -q '[Install]' /lib/systemd/system/$srv.service; then
|
||||||
@ -142,6 +152,8 @@ systemctl disable NetworkManager.service 2> /dev/null
|
|||||||
# Disable D-BUS activation of NetworkManager - in AppVm it causes problems (eg PackageKit timeouts)
|
# Disable D-BUS activation of NetworkManager - in AppVm it causes problems (eg PackageKit timeouts)
|
||||||
systemctl mask dbus-org.freedesktop.NetworkManager.service 2> /dev/null
|
systemctl mask dbus-org.freedesktop.NetworkManager.service 2> /dev/null
|
||||||
systemctl enable NetworkManager.service 2> /dev/null
|
systemctl enable NetworkManager.service 2> /dev/null
|
||||||
|
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=974811
|
||||||
|
systemctl enable NetworkManager-dispatcher.service 2> /dev/null
|
||||||
|
|
||||||
# Enable cups only when it is real SystemD service
|
# Enable cups only when it is real SystemD service
|
||||||
[ -e /lib/systemd/system/cups.service ] && systemctl enable cups.service 2> /dev/null
|
[ -e /lib/systemd/system/cups.service ] && systemctl enable cups.service 2> /dev/null
|
||||||
@ -211,15 +223,15 @@ pre_upgrade() {
|
|||||||
|
|
||||||
|
|
||||||
## arg 1: the old package version
|
## arg 1: the old package version
|
||||||
pre_remove() {
|
#pre_remove() {
|
||||||
|
#
|
||||||
systemctl disable qubes-qrexec-agent.service
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
## arg 1: the old package version
|
|
||||||
#post_remove() {
|
|
||||||
# do something here
|
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
## arg 1: the old package version
|
||||||
|
post_remove() {
|
||||||
|
for srv in qubes-dvm qubes-sysinit qubes-misc-post qubes-netwatcher qubes-network qubes-qrexec-agent; do
|
||||||
|
systemctl disable $srv.service
|
||||||
|
do
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user