Code

- Updated fro new Debian upload
[gosa.git] / update-config
1 #!/bin/sh
3 CONF=/etc/gosa/gosa.conf
4 cat << EOF
6 This script will take your current $CONF and will update the menu and tab tags. It
7 will not touch the parts you have touched between the main tabs.  A backup copy is
8 created.
10 EOF
11 printf "Do you want to continue? (y/n) " "$answer"
12 read answer
14 if [ "$answer" != "y" -a "$answer" != "Y" ]; then
15         echo "Aborted."
16         echo
17         exit 1
18 fi
20 if [ ! -f $CONF ]; then
21         echo "Can't find $CONF Aborted."
22         echo
23         exit 1
24 fi
26 cp $CONF $CONF.orig
28 sed '/<main/,/\/main>/d;/<\/conf>/d' gosa.conf > $CONF
29 sed -n '/<main/,/\/main>/p' $CONF.orig >> $CONF
30 echo '</conf>' >> $CONF