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
|
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" |
---|
[1261] | 15 | PARENTPACKAGE=xend |
---|
[1452] | 16 | GEN_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 | ) |
---|
[1257] | 22 | |
---|
[1261] | 23 | dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 |
---|
| 24 | |
---|
| 25 | . /lib/init/gen-files.sh |
---|
| 26 | . /lib/init/std-init.sh |
---|
| 27 | |
---|
[1275] | 28 | do_startup() { |
---|
[1261] | 29 | gen_files |
---|
| 30 | |
---|
[1257] | 31 | echo 1 >/proc/sys/net/ipv4/ip_forward |
---|
[1261] | 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 |
---|
[1257] | 35 | done |
---|
[1261] | 36 | |
---|
| 37 | invoke-rc.d "$PARENTPACKAGE" "$1" |
---|
| 38 | } |
---|
| 39 | |
---|
[1275] | 40 | do_start() { |
---|
| 41 | do_startup "start" |
---|
| 42 | } |
---|
| 43 | |
---|
[1261] | 44 | do_reload() { |
---|
[1275] | 45 | do_startup "reload" |
---|
[1261] | 46 | } |
---|
| 47 | |
---|
| 48 | do_stop() { |
---|
[1277] | 49 | invoke-rc.d "$PARENTPACKAGE" stop |
---|
[1261] | 50 | } |
---|
| 51 | |
---|
| 52 | std_init "$1" |
---|
Note: See
TracBrowser
for help on using the repository browser.