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.

25 lines
584 B

  1. #!/bin/sh
  2. sheba_activate_vserver() {
  3. local runitdir=$root/etc/runit/
  4. local initddir=/etc/rc.d/init.d/
  5. cat <<EOT > $root/$initddir/vserver
  6. #!/bin/sh
  7. case "\$1" in
  8. start) mkdir -p /var/run/vservers{,.rev}
  9. mkdir -p /var/run/vshelper
  10. sysctl kernel.vshelper=$libdir/util-vserver/vshelper
  11. ;;
  12. esac
  13. EOT
  14. chmod +x $root/$initddir/vserver
  15. ln -snfv $initddir/vserver $runitdir/1.d/20vserver
  16. ln -snfv $initddir/vprocunhide $runitdir/1.d/26vprocunhide
  17. ln -snfv $initddir/vprocunhide $runitdir/3.d/74vprocunhide
  18. }
  19. . $confdir/$pkg.conf
  20. hook_add postmake 5 'sheba_activate_vserver'