#!/bin/sh need_remount=0 if [ -x @@SBINDIR@@/sslsvd -a -x @@SBINDIR@@/mcored -a -f @@CONFDDIR@@/mcored ] then if getargbool 1 rd.mcored && getargbool 0 rd.neednet && NEEDNET=1 then # print ip config echo "Current ip settings:" info "Current ip settings:" echo "$(ip addr)" info "$(ip addr)" [ -w / ] || need_remount=1 if [[ ${need_remount} = 1 ]] then # remount /sysroot writeable echo "Remount /sysroot writeable" info "Remount /sysroot writeable" mount -oremount,rw /sysroot else echo "Already a rw filesystem, remount not required" info "Already a rw filesystem, remount not required" fi # start mcored echo "Starting mcore daemon" 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 if [[ ${need_remount} = 1 ]] then # remount sysroot read-only echo "Remount /sysroot read-only" info "Remount /sysroot read-only" mount -oremount,ro /sysroot fi fi fi