Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2110 - (hide annotations) (download) (as text)
Thu Jan 2 16:24:33 2014 UTC (10 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 1071 byte(s)
-honor network options from /etc/conf.d/network
1 niro 2042 #!/bin/sh
2    
3 niro 2110 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 ]
4 niro 2042 then
5 niro 2071 if getargbool 1 rd.mcored
6     then
7 niro 2094 . /lib/dracut-lib.sh
8     . /lib/net-lib.sh
9 niro 2110 . /etc/conf.d/network
10 niro 2094
11 niro 2110 # sane defaults
12     [[ -z ${DEFAULT_DHCP_START} ]] && DEFAULT_DHCP_START="-T10 -t3 -n -x hostname:$(hostname) -i"
13    
14 niro 2094 _myiface="${find_iface_with_link}"
15     if [[ -n ${_myiface} ]]
16     then
17     # setup networking
18     info "Setup networking"
19     /usr/bin/ip link set "${_myiface}" up
20 niro 2110 /usr/sbin/udhcpc ${DEFAULT_DHCP_START} "${_myiface}"
21 niro 2094 # print ip config
22     info "Current ip settings:"
23     info "$(ip addr)"
24     # remont /sysroot writeable
25     info "Remount /sysroot writeable"
26     mount -oremount,rw /sysroot
27     # start mcored
28     info "Starting mcore daemon"
29     export MROOT=/sysroot
30     . /etc/conf.d/mcored
31     /usr/sbin/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
32     -Z ${SSL_CERT} -K ${SSL_KEY} \
33     0 6666 /usr/sbin/mcored
34     # remount sysroot read-only
35     info "Remount /sysroot read-only"
36     mount -oremount,ro /sysroot
37     fi
38 niro 2071 fi
39 niro 2042 fi