Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2327 - (show annotations) (download)
Fri Jul 11 13:15:12 2014 UTC (9 years, 9 months ago) by niro
File size: 853 byte(s)
-tell the user that a remount is not required if the fs is already mounted rw
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 # remount /sysroot writeable
16 echo "Remount /sysroot writeable"
17 mount -oremount,rw /sysroot
18 else
19 echo "Already a rw filesystem, remount not required"
20 fi
21 # start mcored
22 echo "Starting mcore daemon"
23 export MROOT=/sysroot
24 . @@CONFDDIR@@/mcored
25 @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
26 -Z ${SSL_CERT} -K ${SSL_KEY} \
27 0 6666 @@SBINDIR@@/mcored
28 if [[ ${need_remount} = 1 ]]
29 then
30 # remount sysroot read-only
31 echo "Remount /sysroot read-only"
32 mount -oremount,ro /sysroot
33 fi
34 fi
35 fi