Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2240 - (hide annotations) (download)
Sat Jan 11 00:40:11 2014 UTC (10 years, 4 months ago) by niro
File size: 1088 byte(s)
-use variable pathes
1 niro 2042 #!/bin/sh
2    
3 niro 2240 if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -x @@SBINDIR@@/udhcpc -a -f @@CONFDDIR@@/mcored -a -f @@CONFDDIR@/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 2240 . @@CONFDDIR@@/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 2121 _myiface="$(find_iface_with_link)"
15 niro 2094 if [[ -n ${_myiface} ]]
16     then
17     # setup networking
18     info "Setup networking"
19 niro 2240 @@BINDIR@@/ip link set "${_myiface}" up
20     @@SBINDIR@@/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 niro 2240 . @@CONFDDIR@@/mcored
31     @@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \
32 niro 2094 -Z ${SSL_CERT} -K ${SSL_KEY} \
33 niro 2240 0 6666 @@SBINDIR@@/mcored
34 niro 2094 # 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