--- 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 ${@-*} /