Debian Codegraph @

ipvsadm-save

raw
1 #!/bin/bash
2 # ipvsadm-save - Save IPVS rules
3 #
4 # A very simple wrapper to save IPVS rules
5 # Inspired by ipchains-save.
6 #
7 # Version: $Id$
8 #
9 # Script Author: Horms <[email protected]>
10 #
11 # This file:
12 #
13 # ChangeLog
14 #
15 # Wensong Zhang : Added the "-n" option and the help()
16 #
17
18 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
19 NUMERIC=""
20
21
22 help()
23 {
24 exec 1>&2
25 echo `basename $0`: Script to save the IPVS table to stdout.
26 echo " With the -n option, prints out the table in numeric format."
27
28 exit 1
29 }
30
31
32 for arg
33 do
34 case "$arg"
35 in
36 -n) NUMERIC="-n" ;;
37 -*) help ;;
38 esac
39 done
40
41
42 # All the work is actually done in ipvsadm, horay
43
44 ipvsadm -S $NUMERIC