Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/dracut/module-setup.sh.in

Parent Directory Parent Directory | Revision Log Revision Log


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