forked from bitstreamout/showconsole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
module-setup.sh
executable file
·61 lines (58 loc) · 2.27 KB
/
module-setup.sh
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
60
61
#!/bin/bash
check() {
require_binaries blogd blogctl || return 1
}
depends() {
return 0
}
install() {
inst_multiple blogd blogctl
inst_multiple -o \
$systemdsystemunitdir/blog.service \
$systemdsystemunitdir/blog-final.service \
$systemdsystemunitdir/blog-quit.service \
$systemdsystemunitdir/blog-store-messages.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 basic emergency halt initrd-switch-root kexec multi-user poweroff reboot rescue shutdown sysinit
do
test -d "${initdir}${systemdsystemunitdir}/${t}.target.wants" && continue
mkdir -p "${initdir}${systemdsystemunitdir}/${t}.target.wants"
done
for t in systemd-ask-password-plymouth.service
do
test -d "${initdir}${systemdsystemunitdir}/${t}.wants" && continue
mkdir -p "${initdir}${systemdsystemunitdir}/${t}.wants"
done
for s in blog.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/basic.target.wants/${s}"
done
for s in blog-final.service blog-umount.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/halt.target.wants/${s}"
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/kexec.target.wants/${s}"
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/poweroff.target.wants/${s}"
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/reboot.target.wants/${s}"
done
for s in blog-quit.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/emergency.target.wants/${s}"
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/rescue.target.wants/${s}"
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 blog-store-messages.service
do
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/sysinit.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
}