Magellan Linux

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

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

mcore-src/trunk/mcore-tools/dracut/run-mcored.sh revision 2121 by niro, Thu Jan 9 12:37:37 2014 UTC mcore-src/trunk/mcore-tools/dracut/run-mcored.sh.in revision 2326 by niro, Fri Jul 11 13:09:42 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   echo "$(ip addr)"
12     [ -w / ] || need_remount=1
13   # sane defaults   if [[ ${need_remount} = 1 ]]
  [[ -z ${DEFAULT_DHCP_START} ]] && DEFAULT_DHCP_START="-T10 -t3 -n -x hostname:$(hostname) -i"  
   
  _myiface="$(find_iface_with_link)"  
  if [[ -n ${_myiface} ]]  
14   then   then
  # setup networking  
  info "Setup networking"  
  /usr/bin/ip link set "${_myiface}" up  
  /usr/sbin/udhcpc ${DEFAULT_DHCP_START} "${_myiface}"  
  # print ip config  
  info "Current ip settings:"  
  info "$(ip addr)"  
15   # remont /sysroot writeable   # remont /sysroot writeable
16   info "Remount /sysroot writeable"   echo "Remount /sysroot writeable"
17   mount -oremount,rw /sysroot   mount -oremount,rw /sysroot
18   # start mcored   fi
19   info "Starting mcore daemon"   # start mcored
20   export MROOT=/sysroot   echo "Starting mcore daemon"
21   . /etc/conf.d/mcored   export MROOT=/sysroot
22   /usr/sbin/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \   . @@CONFDDIR@@/mcored
23   -Z ${SSL_CERT} -K ${SSL_KEY} \   @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
24   0 6666 /usr/sbin/mcored   -Z ${SSL_CERT} -K ${SSL_KEY} \
25     0 6666 @@SBINDIR@@/mcored
26     if [[ ${need_remount} = 1 ]]
27     then
28   # remount sysroot read-only   # remount sysroot read-only
29   info "Remount /sysroot read-only"   echo "Remount /sysroot read-only"
30   mount -oremount,ro /sysroot   mount -oremount,ro /sysroot
31   fi   fi
32   fi   fi

Legend:
Removed from v.2121  
changed lines
  Added in v.2326