|
|
@ -76,6 +76,7 @@ if pkgcheck runit X; then |
|
|
|
} |
|
|
|
|
|
|
|
runitconfdir=$base/package/mnemoc/runit |
|
|
|
runit_has_script=0 |
|
|
|
for x in $( cd $runitconfdir/packages; ls -1 $pkg-*.txt 2> /dev/null ); do |
|
|
|
y=${x#$pkg-}; y=${y%.txt}; y=${y//_/\/} |
|
|
|
if [ "${y#runit-}" != "$y" ]; then |
|
|
@ -84,6 +85,7 @@ if pkgcheck runit X; then |
|
|
|
y=\$sysconfdir/$y |
|
|
|
fi |
|
|
|
echo_status "runit: Setting conf to install $y" |
|
|
|
runit_has_script=1 |
|
|
|
case "${y##*/}" in |
|
|
|
run|finish) runitxmode=1 ;; |
|
|
|
*) runitxmode= ;; |
|
|
@ -94,7 +96,34 @@ if pkgcheck runit X; then |
|
|
|
runit_substitute $y; \ |
|
|
|
${runitxmode:+chmod 755 $y;}" |
|
|
|
done |
|
|
|
unset runitconfdir runitxmode |
|
|
|
|
|
|
|
# fake ROCK' standard install_init if sysvinit will not be built |
|
|
|
if ! pkgcheck sysvinit X; then |
|
|
|
if [ $runit_has_script -eq 1 ]; then |
|
|
|
install_init() { |
|
|
|
# i have already installed the script |
|
|
|
true |
|
|
|
} |
|
|
|
else |
|
|
|
install_init() { |
|
|
|
name=$1 ; file=$2 ; initdir="$root/etc/rc.d" |
|
|
|
|
|
|
|
echo -n "Install SysV Init script '$name' (xx/xx): " |
|
|
|
m4 -Dinitstyle=$ROCKCFG_PKG_SYSVINIT_INITSTYLE \ |
|
|
|
-D"D_prefix=/$prefix" -D"D_sysconfdir=$sysconfdir" \ |
|
|
|
-D"D_docdir=$docdir" -D"D_localstatedir=$localstatedir" \ |
|
|
|
-D"D_datadir=$datadir" -D"D_infodir=$infodir" \ |
|
|
|
-D"D_bindir=$bindir" -D"D_sbindir=$sbindir" \ |
|
|
|
-D"D_libdir=$libdir" -D"D_mandir=$mandir" \ |
|
|
|
$base/package/base/sysvinit/init_macros.m4 \ |
|
|
|
$file > $initdir/init.d/$name |
|
|
|
chmod +x $initdir/init.d/$name |
|
|
|
echo " done." |
|
|
|
} |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
unset runitconfdir runitxmode runit_has_script |
|
|
|
|
|
|
|
# minimal services |
|
|
|
case "$pkg" in |
|
|
|