source:
trunk/packages/invirt-xen-config/debian/invirt-xen-config.init
@
2935
Last change on this file since 2935 was 2935, checked in by broder, 15 years ago | |
---|---|
|
|
File size: 970 bytes |
Rev | Line | |
---|---|---|
[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] | 12 | PACKAGE=invirt-xen-config |
[1275] | 13 | NAME="$PACKAGE" |
[1280] | 14 | DESC="Invirt Xen host" |
[2087] | 15 | GEN_FILES=(/etc/xen/xend-config.sxp.invirt) |
[1257] | 16 | |
[1261] | 17 | dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 |
18 | ||
19 | . /lib/init/gen-files.sh | |
20 | . /lib/init/std-init.sh | |
21 | ||
[1275] | 22 | do_startup() { |
[1261] | 23 | gen_files |
24 | ||
[1257] | 25 | echo 1 >/proc/sys/net/ipv4/ip_forward |
[1261] | 26 | for i in all default; do |
27 | echo 1 >/proc/sys/net/ipv4/conf/$i/rp_filter | |
28 | echo 1 >/proc/sys/net/ipv4/conf/$i/proxy_arp | |
[1257] | 29 | done |
[1261] | 30 | |
31 | invoke-rc.d "$PARENTPACKAGE" "$1" | |
32 | } | |
33 | ||
[1275] | 34 | do_start() { |
35 | do_startup "start" | |
[2857] | 36 | xm sched-credit -d 0 -w 512 |
[1275] | 37 | } |
38 | ||
[1261] | 39 | do_reload() { |
[1275] | 40 | do_startup "reload" |
[1261] | 41 | } |
42 | ||
43 | do_stop() { | |
[1277] | 44 | invoke-rc.d "$PARENTPACKAGE" stop |
[1261] | 45 | } |
46 | ||
47 | std_init "$1" |
Note: See TracBrowser
for help on using the repository browser.