Annotation of /mcore-src/trunk/mcore-tools/dracut/mcored/module-setup.sh.in
Parent Directory | Revision Log
Revision 2297 -
(hide annotations)
(download)
Mon Jan 20 10:11:41 2014 UTC (10 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/dracut/module-setup.sh.in
File size: 1560 byte(s)
Mon Jan 20 10:11:41 2014 UTC (10 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/dracut/module-setup.sh.in
File size: 1560 byte(s)
-use network module instead of brewing our own stuff here
1 | niro | 2042 | #!/bin/sh |
2 | |||
3 | check() { | ||
4 | local _program | ||
5 | . $dracutfunctions | ||
6 | |||
7 | niro | 2297 | for _program in iwconfig wpa_supplicant \ |
8 | niro | 2114 | chroot systemd-nspawn vncpasswd hostname mcored; do |
9 | niro | 2042 | if ! type -P $_program >/dev/null; then |
10 | niro | 2066 | derror "Could not find program \"$_program\" required by mcored." |
11 | niro | 2042 | return 1 |
12 | fi | ||
13 | done | ||
14 | |||
15 | return 255 | ||
16 | } | ||
17 | |||
18 | depends() { | ||
19 | niro | 2297 | echo network |
20 | niro | 2042 | } |
21 | |||
22 | install() { | ||
23 | local __file | ||
24 | |||
25 | # add lp usr/group | ||
26 | niro | 2239 | egrep '^lp:' @@SYSCONFDIR@@/passwd >> "$initdir@@SYSCONFDIR@@/passwd" |
27 | niro | 2042 | # group file is fully included atm |
28 | niro | 2239 | #egrep '^lp:' @@SYSCONFDIR@@/group >> "$initdir@@SYSCONFDIR@@/group" |
29 | niro | 2042 | |
30 | niro | 2297 | # other stuff required by mcored |
31 | dracut_install iwconfig wpa_supplicant chroot systemd-nspawn | ||
32 | niro | 2042 | |
33 | niro | 2066 | # mcored config stuff |
34 | niro | 2069 | dracut_install hwinfo vncpasswd |
35 | niro | 2042 | |
36 | # mcored | ||
37 | # install all busybox modules | ||
38 | dracut_install busybox | ||
39 | niro | 2239 | for __file in $(cat @@DATADIR@@/busybox/busybox.links) |
40 | niro | 2042 | do |
41 | inst_symlink ${__file} | ||
42 | done | ||
43 | # install things which are needed but not provided by our busybox | ||
44 | dracut_install find install sslsvd touch | ||
45 | niro | 2239 | inst @@SYSCONFDIR@@/mageversion |
46 | inst @@SSLDIR@@/certs/mcored.pem | ||
47 | inst @@SSLDIR@@/private/mcored.key | ||
48 | inst_dir @@MCORE_CHROOTDIR@@ | ||
49 | inst @@CONFDDIR@@/mcored | ||
50 | inst @@SYSCONFDIR@@/mcore/mcore.conf | ||
51 | inst @@SYSCONFDIR@@/mcoredpasswd | ||
52 | for __file in $(find @@MCORE_LIBDIR@@/include -type f) | ||
53 | niro | 2042 | do |
54 | niro | 2080 | inst ${__file} |
55 | niro | 2042 | done |
56 | niro | 2239 | inst @@MCORE_LIBDIR@@/mcored |
57 | inst @@MCORE_LIBDIR@@/mcore-generate-certificate | ||
58 | inst @@MCORE_LIBDIR@@/mcorepasswd | ||
59 | inst @@MCORE_LIBDIR@@/VERSION | ||
60 | inst_symlink @@SBINDIR@@/mcored | ||
61 | inst_symlink @@SBINDIR@@/mcorepasswd | ||
62 | niro | 2042 | |
63 | inst_hook pre-pivot 90 "$moddir"/run-mcored.sh | ||
64 | } |