Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2334 - (hide annotations) (download)
Fri Jul 11 14:17:51 2014 UTC (9 years, 10 months ago) by niro
File size: 1394 byte(s)
-add missing MCORE_UNPRIV_USER to initramfs passwd
1 niro 2042 #!/bin/sh
2    
3     check() {
4     local _program
5     . $dracutfunctions
6    
7 niro 2324 for _program in iwconfig wpa_supplicant localectl \
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 2324 echo busybox systemd 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 2334 # add MCORE_UNPRIV_USER
28     egrep '^@@MCORE_UNPRIV_USER@@:' @@SYSCONFDIR@@/passwd >> "$initdir@@SYSCONFDIR@@/passwd"
29 niro 2042 # group file is fully included atm
30 niro 2239 #egrep '^lp:' @@SYSCONFDIR@@/group >> "$initdir@@SYSCONFDIR@@/group"
31 niro 2042
32 niro 2297 # other stuff required by mcored
33     dracut_install iwconfig wpa_supplicant chroot systemd-nspawn
34 niro 2042
35 niro 2066 # mcored config stuff
36 niro 2324 dracut_install hwinfo vncpasswd localectl
37 niro 2042
38     # mcored
39     # install things which are needed but not provided by our busybox
40     dracut_install find install sslsvd touch
41 niro 2239 inst @@SYSCONFDIR@@/mageversion
42     inst @@SSLDIR@@/certs/mcored.pem
43     inst @@SSLDIR@@/private/mcored.key
44     inst_dir @@MCORE_CHROOTDIR@@
45     inst @@CONFDDIR@@/mcored
46     inst @@SYSCONFDIR@@/mcoredpasswd
47 niro 2324 for __file in $(find @@SYSCONFDIR@@/mcore @@MCORE_LIBDIR@@ -type f)
48 niro 2042 do
49 niro 2080 inst ${__file}
50 niro 2042 done
51 niro 2239 inst_symlink @@SBINDIR@@/mcored
52     inst_symlink @@SBINDIR@@/mcorepasswd
53 niro 2042
54     inst_hook pre-pivot 90 "$moddir"/run-mcored.sh
55     }