-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodule-setup.sh
More file actions
executable file
·59 lines (56 loc) · 2.24 KB
/
module-setup.sh
File metadata and controls
executable file
·59 lines (56 loc) · 2.24 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
check() {
require_binaries blogd blogctl || return 1
}
depends() {
echo systemd-initrd systemd-udevd
}
install() {
inst_multiple blogd blogctl
inst_multiple -o \
$systemdsystemunitdir/blog.service \
$systemdsystemunitdir/blog-halt.service \
$systemdsystemunitdir/blog-kexec.service \
$systemdsystemunitdir/blog-poweroff.service \
$systemdsystemunitdir/blog-reboot.service \
$systemdsystemunitdir/blog-quit.service \
$systemdsystemunitdir/blog-store-messages.service \
$systemdsystemunitdir/blog-switch-initramfs.service \
$systemdsystemunitdir/blog-switch-root.service \
$systemdsystemunitdir/blog-umount.service \
$systemdsystemunitdir/systemd-ask-password-blog.path \
$systemdsystemunitdir/systemd-ask-password-blog.service \
$systemdsystemunitdir/systemd-vconsole-setup.service
for t in sysinit rescue shutdown emergency initrd-switch-root halt kexec poweroff reboot
do
test -d "${initdir}${systemdsystemunitdir}/${t}.target.wants" && continue
mkdir -p "${initdir}${systemdsystemunitdir}/${t}.target.wants"
done
for s in blog-quit.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/rescue.target.wants/${s}"
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/emergency.target.wants/${s}"
done
for s in blog.service blog-store-messages.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/sysinit.target.wants/${s}"
done
for u in reboot poweroff kexec halt
do
ln_r "${systemdsystemunitdir}/blog-${u}.service" "${systemdsystemunitdir}/${u}.target.wants/blog-${u}.service"
ln_r "${systemdsystemunitdir}/blog-switch-initramfs.service" "${systemdsystemunitdir}/${u}.target.wants/blog-switch-initramfs.service"
done
for t in systemd-ask-password-blog.service
do
test -d "${initdir}${systemdsystemunitdir}/${t}.wants" && continue
mkdir -p "${initdir}${systemdsystemunitdir}/${t}.wants"
done
for s in blog.service blog-switch-root.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/initrd-switch-root.target.wants/${s}"
done
for s in systemd-vconsole-setup.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/systemd-ask-password-blog.service.wants/${s}"
done
}