Browse Source

runit: fixed integration when runit is init

early
Nagy Karoly Gabriel 16 years ago
parent
commit
449d2b4d11
  1. 4
      base/runit/djb-config
  2. 21
      base/runit/parse-config

4
base/runit/djb-config

@ -23,7 +23,9 @@ pkg_djb_hierarchy=$1
#
# prepare root links for DJB filesystem hierarchy inside chrooted env.
#
if [ "$SDECFG_PKG_DJB_LAYOUT" == "1" ]; then
if [ -n "$pkg_djb_servicedir" ]; then
:
elif [ "$SDECFG_PKG_DJB_LAYOUT" == "1" ]; then
for x in package command service; do
eval "pkg_djb_${x}dir='$root/$x'"
var_append flistroot ' ' $x

21
base/runit/parse-config

@ -77,6 +77,27 @@ if pkginstalled runit; then
done
if [ "$SDECFG_INIT" == "runit" ]; then
if [ "$SDECFG_PKG_DJB_LAYOUT" == "1" ]; then
for x in package command service; do
eval "pkg_djb_${x}dir='$root/$x'"
var_append flistroot ' ' $x
done
elif [ "$SDECFG_PKG_DJB_LAYOUT" == "0" ]; then
pkg_djb_packagedir=
pkg_djb_commanddir="$root${2:-$bindir}"
pkg_djb_servicedir="$root/var/service"
fi
# create them if it doesn't exist
for x in package command service; do
y=$( eval echo \$pkg_djb_${x}dir )
if [ -n "$y" ]; then
mkdir -p "$y"
# TODO: research where 1755 comes from
[ "$x" = command ] || chmod 1755 "$y"
fi
done
if [ $runit_has_script -eq 1 ]; then
install_init() {
# i have already installed the script

Loading…
Cancel
Save