Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2330 - (hide annotations) (download)
Fri Jul 11 13:58:30 2014 UTC (9 years, 10 months ago) by niro
File size: 1064 byte(s)
-moved dracut module to dracut/mcored
1 niro 2042 #!/bin/sh
2    
3 niro 2326 need_remount=0
4    
5 niro 2297 if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ]
6 niro 2042 then
7 niro 2298 if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1
8 niro 2071 then
9 niro 2297 # print ip config
10 niro 2326 echo "Current ip settings:"
11 niro 2330 info "Current ip settings:"
12 niro 2326 echo "$(ip addr)"
13 niro 2330 info "$(ip addr)"
14 niro 2326 [ -w / ] || need_remount=1
15     if [[ ${need_remount} = 1 ]]
16     then
17 niro 2327 # remount /sysroot writeable
18 niro 2326 echo "Remount /sysroot writeable"
19 niro 2330 info "Remount /sysroot writeable"
20 niro 2326 mount -oremount,rw /sysroot
21 niro 2327 else
22     echo "Already a rw filesystem, remount not required"
23 niro 2330 info "Already a rw filesystem, remount not required"
24 niro 2326 fi
25 niro 2297 # start mcored
26 niro 2323 echo "Starting mcore daemon"
27 niro 2330 info "Starting mcore daemon"
28 niro 2297 export MROOT=/sysroot
29     . @@CONFDDIR@@/mcored
30     @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
31     -Z ${SSL_CERT} -K ${SSL_KEY} \
32     0 6666 @@SBINDIR@@/mcored
33 niro 2326 if [[ ${need_remount} = 1 ]]
34     then
35     # remount sysroot read-only
36     echo "Remount /sysroot read-only"
37 niro 2330 info "Remount /sysroot read-only"
38 niro 2326 mount -oremount,ro /sysroot
39     fi
40 niro 2071 fi
41 niro 2042 fi