Removed unused functionality.
[carnet-upgrade.git] / src / functions.sh
index ac21431..6ef62aa 100644 (file)
@@ -327,7 +327,7 @@ add_group_proc () {
     log "groupadd -g 99 proc"
 
     # update oidentd so it uses the proc group
-    if [ -x /etc/init.d/oidentd -a -f /etc/default/oidentd ];
+    if [ -x /etc/init.d/oidentd -a -f /etc/default/oidentd ]; then
        check_and_sed 'OIDENT_GROUP.*proc' 's/\(OIDENT_GROUP\).*/\1=proc/' \
             /etc/default/oident && /etc/init.d/oidentd restart
     fi
@@ -507,33 +507,6 @@ upgrade_openldap () {
   dpkg --configure -a # try postinst again
 }
 
-# tentatively remove obsolete option in xinetd.conf
-fix_xinetd_conf () {
-  if [ -f /etc/xinetd.conf ]; then
-    check_and_sed 'log_on_failure.*RECORD' \
-                   's/\(log_on_failure.*\)RECORD/\1/g' \
-                   /etc/xinetd.conf || true
-  fi
-}
-
-# temporarily disable mod_ssl.conf in apache so that upgrade works
-fix_mod_ssl_include() {
-  if [ -f /etc/apache/mod_ssl.conf ]; then
-    check_and_sed '^Include /etc/apache/mod_ssl\.conf' \
-                  's,\(^Include[       ][      ]*/etc/apache/mod_ssl\.conf\),#\1,' \
-                  /etc/apache/httpd.conf || true
-  fi
-}
-
-fix_proftpd_conf() {
-  if [ -f /etc/proftpd.conf ]; then
-    check_and_sed '^LsDefaultOptions' \
-                  's,^LsDefaultOptions,ListOptions,' \
-                  /etc/proftpd.conf || true
-  fi
-  [ -x /etc/init.d/proftpd ] && /etc/init.d/proftpd restart || true
-}
-
 # fix /etc/dpkg/dpkg.cfg
 comment_force_overwrite () {
   if [ -f /etc/dpkg/dpkg.cfg ]; then
@@ -545,14 +518,6 @@ comment_force_overwrite () {
   fi
 }
 
-fix_aidexfer_conf() {
-  if [ -f /etc/aide/aidexfer.conf ]; then
-    check_and_sed '/usr/local/lib/aidexfer' \
-                  's,/usr/local/lib/aidexfer,/usr/share/aidexfer,' \
-                  /etc/aide/aidexfer.conf || true
-  fi
-}
-
 fix_issue () {
   cat > /etc/issue <<EOF
 Debian GNU/Linux 4.0 (CARNet Debian 4.0) \\n \\l
@@ -572,79 +537,3 @@ check_disk_space() {
     exit 1
   fi
 }
-
-fix_webalizer_conf () {
-  if [ -f /etc/webalizer.conf ]; then
-    check_and_sed '^/' \
-                  's,^/,#,' \
-                  /etc/webalizer.conf || true
-  fi
-}
-
-# like in sendmail-cn
-fix_smtp_auth() {
-  local tmpl conf tmpldir confdir mv_in_sasl
-
-  # all of these should be installed after dist-upgrade
-  # if we had SMTP AUTH previously
-  if pkg sasl2-bin && pkg sasl-bin && pkg sendmail-cn ge 2:8.13.1-2; then
-    :
-  else
-    return 0
-  fi
-
-  tmpldir=/usr/share/sendmail/examples/sasl
-  tmpl=$tmpldir/Sendmail.conf.2
-  confdir=/etc/mail/sasl
-  conf=$confdir/Sendmail.conf.2
-  if [ "$(sasldblistusers | wc -l)" -gt 0 ]; then
-    if [ "$(sasldblistusers2 | wc -l)" -eq 0 ]; then
-      echo | sasldbconverter2 /etc/sasldb
-      log "Converted /etc/sasldb to /etc/sasldb2."
-    else
-      log "Found users in both /etc/sasldb and /etc/sasldb2, doing nothing!"
-    fi
-  fi
-  if [ -f $conf -a -f $tmpl ] && \
-    ! cmp -s $conf $tmpl; then
-    mv $conf $conf.cn4-upgrade
-    mv_in_sasl=1
-  fi
-  if [ -f $confdir/Sendmail.conf ]; then
-    mv $confdir/Sendmail.conf $confdir/Sendmail.conf.cn4-upgrade
-    mv_in_sasl=1
-  fi
-  if [ -f $confdir/sasl.m4 ] && \
-    ! cmp -s $confdir/sasl.m4 $tmpldir/sasl.m4; then
-    mv -f $confdir/sasl.m4 $confdir/sasl.m4.cn4-upgrade
-    mv_in_sasl=1
-  fi
-  [ "$mv_in_sasl" ] && \
-    log "Renamed old files in $confdir."
-
-  # Regenerate sasl.m4 and friends.
-  /usr/share/sendmail/update_auth | egrep '^(Created template)' || true
-
-  # Hope noone else uses this file. (see doc/sendmail/README.Debian.gz)
-  dpkg-statoverride --remove /etc/sasldb2
-  dpkg-statoverride --update --add smmta smmsp 660 /etc/sasldb2
-  # needed for PLAIN, LOGIN
-  dpkg-statoverride --remove /var/run/saslauthd
-  dpkg-statoverride --update --add root sasl 711 /var/run/saslauthd
-
-  # Enable saslauthd, used by default Debian config
-  if ! egrep -q '^START=yes' /etc/default/saslauthd; then
-    check_and_sed START 's/#\ +START=yes$/START=yes/' /etc/default/saslauthd
-    /etc/init.d/saslauthd restart
-  fi
-
-  /etc/init.d/sendmail reload || true
-}
-
-sources_list() {
-  if [ ! -e /var/lib/carnet-upgrade/stamp-sources_list ]; then
-    install-carnet-sources.list
-    apt-get -y update
-    touch /var/lib/carnet-upgrade/stamp-sources_list
-  fi
-}