Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2237 - (show annotations) (download)
Sat Jan 11 00:21:51 2014 UTC (10 years, 3 months ago) by niro
File size: 1071 byte(s)
-renamed run-mcored.sh -> run-mcore.sh.in
1 #!/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 ]
4 then
5 if getargbool 1 rd.mcored
6 then
7 . /lib/dracut-lib.sh
8 . /lib/net-lib.sh
9 . /etc/conf.d/network
10
11 # sane defaults
12 [[ -z ${DEFAULT_DHCP_START} ]] && DEFAULT_DHCP_START="-T10 -t3 -n -x hostname:$(hostname) -i"
13
14 _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 /usr/sbin/udhcpc ${DEFAULT_DHCP_START} "${_myiface}"
21 # 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 fi
39 fi