Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2326 - (show annotations) (download)
Fri Jul 11 13:09:42 2014 UTC (9 years, 10 months ago) by niro
File size: 789 byte(s)
-only remount if the filesystem is ro and be more verbose
1 #!/bin/sh
2
3 need_remount=0
4
5 if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ]
6 then
7 if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1
8 then
9 # print ip config
10 echo "Current ip settings:"
11 echo "$(ip addr)"
12 [ -w / ] || need_remount=1
13 if [[ ${need_remount} = 1 ]]
14 then
15 # remont /sysroot writeable
16 echo "Remount /sysroot writeable"
17 mount -oremount,rw /sysroot
18 fi
19 # start mcored
20 echo "Starting mcore daemon"
21 export MROOT=/sysroot
22 . @@CONFDDIR@@/mcored
23 @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
24 -Z ${SSL_CERT} -K ${SSL_KEY} \
25 0 6666 @@SBINDIR@@/mcored
26 if [[ ${need_remount} = 1 ]]
27 then
28 # remount sysroot read-only
29 echo "Remount /sysroot read-only"
30 mount -oremount,ro /sysroot
31 fi
32 fi
33 fi