source: trunk/packages/invirt-xen-config/debian/invirt-xen-config.init @ 1454

Last change on this file since 1454 was 1452, checked in by broder, 16 years ago

Generate config files for sysvms in invirt-xen-config

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#!/bin/bash
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
12PACKAGE=invirt-xen-config
13NAME="$PACKAGE"
14DESC="Invirt Xen host"
15PARENTPACKAGE=xend
16GEN_FILES=(
17    /etc/xen/xend-config.sxp.invirt
18    /etc/xen/sysvms/s_master
19    /etc/xen/sysvms/s_remote
20    /etc/xen/sysvms/s_console
21    )
22
23dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0
24
25. /lib/init/gen-files.sh
26. /lib/init/std-init.sh
27
28do_startup() {
29    gen_files
30   
31    echo 1 >/proc/sys/net/ipv4/ip_forward
32    for i in all default; do
33        echo 1 >/proc/sys/net/ipv4/conf/$i/rp_filter
34        echo 1 >/proc/sys/net/ipv4/conf/$i/proxy_arp
35    done
36   
37    invoke-rc.d "$PARENTPACKAGE" "$1"
38}
39
40do_start() {
41    do_startup "start"
42}
43
44do_reload() {
45    do_startup "reload"
46}
47
48do_stop() {
49    invoke-rc.d "$PARENTPACKAGE" stop
50}
51
52std_init "$1"
Note: See TracBrowser for help on using the repository browser.