disable the firewall ipv6
authorHeiko Schlittermann <hs@schlittermann.de>
Tue, 12 Jun 2012 11:34:10 +0200
branchipv6
changeset 7 13183092a453
parent 6 371a2568bc2e
child 8 f1e2fbfb530c
disable the firewall
setup
--- a/setup	Tue Jun 12 09:53:56 2012 +0200
+++ b/setup	Tue Jun 12 11:34:10 2012 +0200
@@ -1,8 +1,11 @@
 #! /bin/bash
 
-tmp=$(getopt -n setup -o n -l nothing -- "$@") \
+opt_n=
+opt_u=
+
+tmp=$(getopt -n setup -o nu -l nothing,update -- "$@") \
 	|| cat >&2 <<_
-Usage: $0 [-n|--nothing] [directories]
+Usage: $0 [-n|--nothing] [-u|--update] [directories]
 _
 
 set -- $tmp
@@ -12,18 +15,26 @@
 	opt="$1"; shift
 	case "$opt" in
 		-n|--nothing)	opt_n=-n;;
+		-u|--update)	opt_u=1;;
 		--)		break;;
 	esac
 done
 
-zypper install rsync tcpdump
+if test -n $opt_u; then
+	hg pull -u
+fi
+
+# install some packages we need for this script
+zypper install rsync
 
 getent group sudoers >/dev/null || groupadd --system sudoers
 for u in hans teilnehmer; do
 	getent passwd $u >/dev/null && usermod -A sudoers $u
 done
 
+# disable and switch off the firewall
 chkconfig SuSEfirewall2_setup off
 chkconfig SuSEfirewall2_init off
+rcSuSEfirewall2 stop
 
 rsync  $opt_n -iav --exclude setup --exclude .hg ${@-*} /