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

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

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