updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / initscripts-systemd-git / initscripts-systemd.install
blobdbc8cca6e4edbf4d84694897715e293241b52798
1 #!/bin/bash
3 declare -l USELVM
5 . /etc/rc.conf
7 units=('arch-persistent-settings.service'
8 'arch-daemons.target'
9 'rc-local.service')
11 post_install() {
12 [[ "$USELVM" = yes ]] && units+=("lvm.service")
14 /bin/systemctl enable "${units[@]}"
16 post_upgrade
18 # we do this here explicitly so that there isn't a lagtime of an extra reboot
19 # before the gluework to /etc/rc.conf goes into effect
20 /lib/systemd/arch-persistent-settings
23 post_upgrade() {
24 if ps -C systemd >/dev/null 2>&1; then
25 /bin/systemctl daemon-reload
26 else
27 return 0
31 pre_remove() {
32 if ps -C systemd >/dev/null 2>&1; then
33 /bin/systemctl disable "${units[@]}"
34 /bin/systemctl daemon-reload
35 else
36 return 0
39 post_upgrade
42 post_remove() {
43 rm -f /etc/{modprobe,modules-load}.d/rc.conf