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 ] |
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 |
then |
5 |
if getargbool 1 rd.mcored |
if getargbool 1 rd.mcored |
6 |
then |
then |
7 |
# setup networking |
. /lib/dracut-lib.sh |
8 |
info "Setup networking" |
. /lib/net-lib.sh |
9 |
/usr/sbin/udhcpc eth0 |
. /etc/conf.d/network |
10 |
# print ip config |
|
11 |
info "Current ip settings:" |
# sane defaults |
12 |
info "$(ip addr)" |
[[ -z ${DEFAULT_DHCP_START} ]] && DEFAULT_DHCP_START="-T10 -t3 -n -x hostname:$(hostname) -i" |
13 |
# start mcored |
|
14 |
info "Starting mcore daemon" |
_myiface="$(find_iface_with_link)" |
15 |
export MROOT=/sysroot |
if [[ -n ${_myiface} ]] |
16 |
. /etc/conf.d/mcored |
then |
17 |
/usr/sbin/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \ |
# setup networking |
18 |
-Z ${SSL_CERT} -K ${SSL_KEY} \ |
info "Setup networking" |
19 |
0 6666 /usr/sbin/mcored |
/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 |
fi |
39 |
fi |
fi |