* changed sheba/util-vserver to make /dev as tmpfs on the guests (default) and populate it which a good set of devices and symlinkslegacy/0.1-legacy
@ -0,0 +1,8 @@ |
|||
--- ./distrib/misc/fstab.orig 2006-08-25 20:47:20.000000000 +0000
|
|||
+++ ./distrib/misc/fstab 2006-08-25 20:48:00.000000000 +0000
|
|||
@@ -1,3 +1,4 @@
|
|||
+none /dev tmpfs dev,size=1m 0 0
|
|||
none /proc proc defaults 0 0 |
|||
none /tmp tmpfs size=16m,mode=1777 0 0 |
|||
-none /dev/pts devpts gid=5,mode=620 0 0
|
|||
+#none /dev/pts devpts gid=5,mode=620 0 0
|
@ -0,0 +1,73 @@ |
|||
# --- 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=$root/etc/init.d |
|||
local defaults=$root/$sysconfdir/vservers/.defaults |
|||
|
|||
cat <<-EOT > $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 $initddir/vserver |
|||
|
|||
mkdir -p $defaults/scripts |
|||
cat <<-EOT > $defaults/scripts/pre-start |
|||
#!/bin/sh |
|||
|
|||
# interesting nodes from the host |
|||
# |
|||
for x in console full log null ptmx random tty urandom zero; do |
|||
cp -a /dev/$x dev/ |
|||
done |
|||
|
|||
# some friendly symlinks |
|||
# |
|||
ln -s /proc/self/fd dev/fd |
|||
ln -s fd/0 dev/stdin |
|||
ln -s fd/1 dev/stdout |
|||
ln -s fd/2 dev/stderr |
|||
|
|||
# and a place to mount devpts |
|||
# |
|||
mkdir dev/pts |
|||
EOT |
|||
|
|||
cat <<-EOT > $defaults/scripts/post-start |
|||
#!/bin/sh |
|||
|
|||
# mount devpts after /dev was populated |
|||
# |
|||
mount -t devpts -o gid=5,mode=620 none dev/pts |
|||
EOT |
|||
|
|||
chmod +x $defaults/scripts/{pre,post}-start |
|||
|
|||
ln -snfv ${initddir#$root}/vserver $runitdir/1.d/20vserver |
|||
ln -snfv ${initddir#$root}/vprocunhide $runitdir/1.d/26vprocunhide |
|||
ln -snfv ${initddir#$root}/vservers-default $runitdir/1.d/98vservers-default |
|||
} |
|||
|
|||
. $confdir/$pkg.conf |
|||
|
|||
hook_add postmake 5 'sheba_activate_vserver' |
|||
|
|||
var_append patchfile ' ' $base/target/$target/patches/$pkg.patch |
@ -1,38 +0,0 @@ |
|||
# --- 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' |