#! /bin/sh #---------------------------------------------------------------------------- # template-restore-dconf - restore config file from /etc/default.d # # Copyright (c) 2001-2003 Ansgar Püster # # Creation: 24.12.2003 ap # Last Update: $Id$ # # 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. #---------------------------------------------------------------------------- header() { clrhome colecho "Restore configuration file from $defaultd" gn echo } footer() { echo echo /var/install/bin/anykey } gotoyx () { echo -e "\033[$1;$2H\c"; } echoyx () { echo -e "\033[$1;$2H\c"; shift; shift; echo -e "$*\c"; } # include function library . /var/install/bin/config_shlib #---------------------------------------------------------------------------- # get package name from filename PACKAGE-restore-dconf # filename=`basename $0` package=`echo $filename | sed "s|-restore-dconf$||"` header if [ ! -f $defaultd/$package ]; then /usr/local/bin/colecho "Error: Configuration file $defaultd/$package does not exist" rd else /usr/local/bin/colecho "Default configuration file $defaultd/$package found" echo /usr/local/bin/colecho "Attention: this will overwrite your current configuration" br b br /usr/local/bin/colecho " file for package $package with the default" br b br /usr/local/bin/colecho " configuation delivered with the package." br b br /usr/local/bin/colecho "" if /var/install/bin/ask "Continue"; then cp -p $defaultd/$package $configd/$package echo activate_hint else /usr/local/bin/colecho "Configuration file $configd/$package was not changed." fi fi footer