Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

mcore-src/trunk/mcore-tools/dracut/run-mcored.sh.in revision 2237 by niro, Sat Jan 11 00:21:51 2014 UTC mcore-src/trunk/mcore-tools/dracut/mcored/run-mcored.sh.in revision 2330 by niro, Fri Jul 11 13:58:30 2014 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  if [ -x /usr/sbin/sslsvd -a -x /usr/sbin/mcored -a -x /usr/sbin/udhcpc -a -f /etc/conf.d/mcored -a -f /etc/conf.d/network ]  need_remount=0
4    
5    if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ]
6  then  then
7   if getargbool 1 rd.mcored   if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1
8   then   then
9   . /lib/dracut-lib.sh   # print ip config
10   . /lib/net-lib.sh   echo "Current ip settings:"
11   . /etc/conf.d/network   info "Current ip settings:"
12     echo "$(ip addr)"
13   # sane defaults   info "$(ip addr)"
14   [[ -z ${DEFAULT_DHCP_START} ]] && DEFAULT_DHCP_START="-T10 -t3 -n -x hostname:$(hostname) -i"   [ -w / ] || need_remount=1
15     if [[ ${need_remount} = 1 ]]
  _myiface="$(find_iface_with_link)"  
  if [[ -n ${_myiface} ]]  
16   then   then
17   # setup networking   # remount /sysroot writeable
18   info "Setup networking"   echo "Remount /sysroot writeable"
  /usr/bin/ip link set "${_myiface}" up  
  /usr/sbin/udhcpc ${DEFAULT_DHCP_START} "${_myiface}"  
  # print ip config  
  info "Current ip settings:"  
  info "$(ip addr)"  
  # remont /sysroot writeable  
19   info "Remount /sysroot writeable"   info "Remount /sysroot writeable"
20   mount -oremount,rw /sysroot   mount -oremount,rw /sysroot
21   # start mcored   else
22   info "Starting mcore daemon"   echo "Already a rw filesystem, remount not required"
23   export MROOT=/sysroot   info "Already a rw filesystem, remount not required"
24   . /etc/conf.d/mcored   fi
25   /usr/sbin/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \   # start mcored
26   -Z ${SSL_CERT} -K ${SSL_KEY} \   echo "Starting mcore daemon"
27   0 6666 /usr/sbin/mcored   info "Starting mcore daemon"
28     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     if [[ ${need_remount} = 1 ]]
34     then
35   # remount sysroot read-only   # remount sysroot read-only
36     echo "Remount /sysroot read-only"
37   info "Remount /sysroot read-only"   info "Remount /sysroot read-only"
38   mount -oremount,ro /sysroot   mount -oremount,ro /sysroot
39   fi   fi

Legend:
Removed from v.2237  
changed lines
  Added in v.2330