Browse Source

* introduced sheba/vcd extender to add the init.d scripts needed if you use vcd

legacy/0.1-legacy
Alejandro Mery 18 years ago
parent
commit
4917947204
1 changed files with 40 additions and 0 deletions
  1. +40
    -0
      pkg_vcd.conf

+ 40
- 0
pkg_vcd.conf

@ -0,0 +1,40 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: target/sheba/pkg_vserver.conf
# Copyright (C) 2004 - 2006 Alejandro Mery
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
sheba_activate_vserver() {
local runitdir=$root/etc/runit/
local initddir=/etc/init.d
cat <<EOT > $root/$initddir/vserver
#!/bin/sh
VPROCUNHIDECONF=$sysconfdir/vprocunhide.conf
case "\$1" in
start) if [ -r "\$VPROCUNHIDECONFC" ]; then
$sbindir/vprocunhide < $sysconfdir/vprocunhide.conf
else
echo "vserver: '$sysconfdir/vprocunhide.conf' is missing" 1>&2
exit 1
fi
;;
esac
EOT
chmod +x $root/$initddir/vserver
ln -snfv $initddir/vserver $runitdir/1.d/20vserver
# ln -snfv $initddir/vservers-default $runitdir/1.d/98vservers-default
}
. $confdir/$pkg.conf
hook_add postmake 5 'sheba_activate_vserver'

Loading…
Cancel
Save