#! /bin/sh #---------------------------------------------------------------------------- # template-backup-config - backup config file to /etc/backup.d # # Creation: 2003-12-24 ap # Last Update: $Id$ # # Copyright (c) 2001-2003 Ansgar Puester, Ansgar.Puester(at)T-Online(dot)de # Copyright (c) 2008-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib header() { clrhome mecho --info "Backup configuration file from $configd to $backupd" mecho } footer() { mecho mecho anykey } # include function library . /var/install/bin/config_shlib # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- # get package name from filename PACKAGE-backup-config filename=`basename $0` package=`echo $filename | sed "s|-backup-config$||"` # if package is template # take package from $PACKAGE [ "$package" = 'template' ] && package="$PACKAGE" #debug echo "+++ TEST filename: $filename" #debug echo " PACKAGE: $PACKAGE" #debug echo " package: $package" #debug read answ < /dev/tty header if [ ! -f $configd/$package ] then mecho --error "Error: Configuration file $configd/$package does not exist" else backup_config $package $configd/$package fi footer # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------