forked from vianney/arch-luks-suspend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
29 lines (26 loc) · 835 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
post_install() {
echo -e'\e[31m'
echo 'To finish installing arch-luks-suspend you must:'
echo ''
echo '1) Enable the udev, encrypt, shutdown, and suspend hooks'
echo ' in /etc/mkinitcpio.conf and run `mkinitcpio -p linux`'
echo '2) Enable the arch-luks-suspend service with:'
echo ' `systemctl enable arch-luks-suspend.service`'
echo '3) Reboot'
echo -e '\e[39m'
}
post_upgrade() {
local newver="$1" oldver="$2"
if [[ "$newver" != "$oldver" ]]; then
local src='/usr/lib/arch-luks-suspend/initramfs-suspend'
local dst='/run/initramfs/suspend'
if [[ -e "$src" && -e "$dst" ]]; then
install -m755 "$src" "$dst"
else
echo -e '\e[31m'
echo '[ATTENTION] Reboot required to complete upgrade of arch-luk-suspend'
echo -e '\e[39m'
fi
fi
}
# vim:set ft=sh ts=2 sw=2 et: