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