updated on Wed Jan 11 08:01:35 UTC 2012
[aur-mirror.git] / systemd-quiet / systemd.install
blob7f1f9a2650cba6093ac0a89fc4fa29c2b9240e37
1 #!/bin/sh
3 checkgroups() {
4 if ! usr/bin/getent group lock >/dev/null; then
5 usr/sbin/groupadd -g 54 lock
6 fi
9 sd_booted() {
10 [ -e sys/fs/cgroups/systemd ]
13 post_install() {
14 checkgroups
16 if [ ! -f etc/machine-id ]; then
17 bin/systemd-machine-id-setup
20 echo "systemd has been installed to /bin/systemd. Please ensure you append"
21 echo "init=/bin/systemd to your kernel command line in your bootloader."
22 echo " "
23 echo "For a quiet boot you should skip root filesystem fsck by appending"
24 echo "fastboot parameter to your kernel command line parameters."
25 echo "You should also append quiet and/or loglevel=3"
26 echo ""
27 echo "Please note that a quiet boot makes debugging any boot problems harder"
30 post_upgrade() {
31 checkgroups
33 if [ ! -f etc/machine-id ]; then
34 bin/systemd-machine-id-setup
37 if sd_booted; then
38 bin/systemctl daemon-reexec >/dev/null
41 newpkgver=${1%-*}
42 oldpkgver=${2%-*}
44 # catch v31 need for restarting systemd-logind.service
45 if [ "$newpkgver" -ge 31 ] && [ "$oldpkgver" -lt 31 ]; then
46 # but only if systemd is running
47 if sd_booted; then
48 bin/systemctl try-restart systemd-logind.service
53 post_remove() {
54 if usr/bin/getent group lock >/dev/null; then
55 usr/sbin/groupdel lock
59 # vim:set ts=2 sw=2 et: