Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2240 - (show annotations) (download)
Sat Jan 11 00:40:11 2014 UTC (10 years, 3 months ago) by niro
File size: 1088 byte(s)
-use variable pathes
1 #!/bin/sh
2
3 if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -x @@SBINDIR@@/udhcpc -a -f @@CONFDDIR@@/mcored -a -f @@CONFDDIR@/network ]
4 then
5 if getargbool 1 rd.mcored
6 then
7 . /lib/dracut-lib.sh
8 . /lib/net-lib.sh
9 . @@CONFDDIR@@/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 @@BINDIR@@/ip link set "${_myiface}" up
20 @@SBINDIR@@/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 . @@CONFDDIR@@/mcored
31 @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
32 -Z ${SSL_CERT} -K ${SSL_KEY} \
33 0 6666 @@SBINDIR@@/mcored
34 # remount sysroot read-only
35 info "Remount /sysroot read-only"
36 mount -oremount,ro /sysroot
37 fi
38 fi
39 fi