Sheba, the realm of Tux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
1.2 KiB

# --- 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/rc.d/init.d
cat <<EOT > $root/$initddir/vserver
#!/bin/sh
case "\$1" in
start) mkdir -p /var/run/vservers{,.rev}
mkdir -p /var/run/vshelper
sysctl kernel.vshelper=$libdir/util-vserver/vshelper
;;
esac
EOT
chmod +x $root/$initddir/vserver
ln -snfv $initddir/vserver $runitdir/1.d/20vserver
ln -snfv $initddir/vprocunhide $runitdir/1.d/26vprocunhide
ln -snfv $initddir/vprocunhide $runitdir/3.d/74vprocunhide
ln -snfv $initddir/vservers-default $runitdir/1.d/98vservers-default
}
. $confdir/$pkg.conf
hook_add postmake 5 'sheba_activate_vserver'