source: package_branches/invirt-xen-config/hvirt/debian/invirt-xen-config.init @ 2993

Last change on this file since 2993 was 2971, checked in by gdb, 15 years ago

Merged invirt-xen-config into hvirt branch

  • Property svn:executable set to *
File size: 989 bytes
RevLine 
[1275]1#!/bin/bash
[1257]2### BEGIN INIT INFO
3# Provides:          invirt-xen-config
4# Required-Start:    $local_fs $remote_fs
5# Required-Stop:     $local_fs $remote_fs
6# Default-Start:     2 3 4 5
7# Default-Stop:      0 1 6
8# Short-Description: Startup script for the Invirt Xen host
9# Description:       
10### END INIT INFO
11
[1261]12PACKAGE=invirt-xen-config
[1275]13NAME="$PACKAGE"
[1280]14DESC="Invirt Xen host"
[1261]15PARENTPACKAGE=xend
[2087]16GEN_FILES=(/etc/xen/xend-config.sxp.invirt)
[1257]17
[1261]18dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0
19
20. /lib/init/gen-files.sh
21. /lib/init/std-init.sh
22
[1275]23do_startup() {
[1261]24    gen_files
25   
[1257]26    echo 1 >/proc/sys/net/ipv4/ip_forward
[1261]27    for i in all default; do
28        echo 1 >/proc/sys/net/ipv4/conf/$i/rp_filter
29        echo 1 >/proc/sys/net/ipv4/conf/$i/proxy_arp
[1257]30    done
[1261]31   
32    invoke-rc.d "$PARENTPACKAGE" "$1"
33}
34
[1275]35do_start() {
36    do_startup "start"
[2971]37    xm sched-credit -d 0 -w 512
[1275]38}
39
[1261]40do_reload() {
[1275]41    do_startup "reload"
[1261]42}
43
44do_stop() {
[1277]45    invoke-rc.d "$PARENTPACKAGE" stop
[1261]46}
47
48std_init "$1"
Note: See TracBrowser for help on using the repository browser.