Last change
on this file since 2847 was
2829,
checked in by broder, 15 years ago
|
Don't try to start sysvms in the invirt-xen-config init script.
This code just doesn't work. In fact, I've seen it result in 0, 1, or
1 instances of sysvms running simultaneously, which makes it
officially worthless.
|
-
Property svn:executable set to
*
|
File size:
957 bytes
|
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 | |
---|
12 | PACKAGE=invirt-xen-config |
---|
13 | NAME="$PACKAGE" |
---|
14 | DESC="Invirt Xen host" |
---|
15 | PARENTPACKAGE=xend |
---|
16 | GEN_FILES=(/etc/xen/xend-config.sxp.invirt) |
---|
17 | |
---|
18 | dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 |
---|
19 | |
---|
20 | . /lib/init/gen-files.sh |
---|
21 | . /lib/init/std-init.sh |
---|
22 | |
---|
23 | do_startup() { |
---|
24 | gen_files |
---|
25 | |
---|
26 | echo 1 >/proc/sys/net/ipv4/ip_forward |
---|
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 |
---|
30 | done |
---|
31 | |
---|
32 | invoke-rc.d "$PARENTPACKAGE" "$1" |
---|
33 | } |
---|
34 | |
---|
35 | do_start() { |
---|
36 | do_startup "start" |
---|
37 | } |
---|
38 | |
---|
39 | do_reload() { |
---|
40 | do_startup "reload" |
---|
41 | } |
---|
42 | |
---|
43 | do_stop() { |
---|
44 | invoke-rc.d "$PARENTPACKAGE" stop |
---|
45 | } |
---|
46 | |
---|
47 | std_init "$1" |
---|
Note: See
TracBrowser
for help on using the repository browser.