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 @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ] |
4 |
then |
then |
5 |
if getargbool 1 rd.mcored |
if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1 |
6 |
then |
then |
7 |
. /lib/dracut-lib.sh |
# print ip config |
8 |
. /lib/net-lib.sh |
info "Current ip settings:" |
9 |
|
info "$(ip addr)" |
10 |
_myiface="${find_iface_with_link}" |
# remont /sysroot writeable |
11 |
if [[ -n ${_myiface} ]] |
info "Remount /sysroot writeable" |
12 |
then |
mount -oremount,rw /sysroot |
13 |
# setup networking |
# start mcored |
14 |
info "Setup networking" |
info "Starting mcore daemon" |
15 |
/usr/bin/ip link set "${_myiface}" up |
export MROOT=/sysroot |
16 |
/usr/sbin/udhcpc -i "${_myiface}" |
. @@CONFDDIR@@/mcored |
17 |
# print ip config |
@@SBINDIR@@/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \ |
18 |
info "Current ip settings:" |
-Z ${SSL_CERT} -K ${SSL_KEY} \ |
19 |
info "$(ip addr)" |
0 6666 @@SBINDIR@@/mcored |
20 |
# remont /sysroot writeable |
# remount sysroot read-only |
21 |
info "Remount /sysroot writeable" |
info "Remount /sysroot read-only" |
22 |
mount -oremount,rw /sysroot |
mount -oremount,ro /sysroot |
|
# start mcored |
|
|
info "Starting mcore daemon" |
|
|
export MROOT=/sysroot |
|
|
. /etc/conf.d/mcored |
|
|
/usr/sbin/sslsvd -U ${SSL_USER} -/ ${CHROOT_DIR} \ |
|
|
-Z ${SSL_CERT} -K ${SSL_KEY} \ |
|
|
0 6666 /usr/sbin/mcored |
|
|
# remount sysroot read-only |
|
|
info "Remount /sysroot read-only" |
|
|
mount -oremount,ro /sysroot |
|
|
fi |
|
23 |
fi |
fi |
24 |
fi |
fi |