#!/usr/bin/sh # file: save_machine_setup # # Usage: save_machine_setup # # $Date: $ # $Source: $ # $Revision: $ # $State: $ # # purpose: # called by: sh # externals: Standard UNIX System V Environment, # bugs: # system: sh: hp,sun,linux/ix86 # # Author: Gerhard Grygiel, Olaf Hensler # Copyright 1999 Gerhard Grygiel, Olaf Hensler # # 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. # # $Log: save_machine_setup,v $ # # # 02-Mar-2000 S. Schreiber uses setup_standard.sr as initial file # setup.sr is used to restore settings, but if this # file happens to be corrupted, all further # savings will fail as well. # # 19-Dec-2001 B. Schoeneich edited for PITZ DESY Zeuthen usage() { echo echo "save_machine_setup example " echo "usage:" echo echo "save_machine_setup -h displays this description " echo echo echo "example: save_machine_setup " echo " # This script read the save&retore file machine_setup " echo " # from /net/corvus/doocs/gun/setup/sr/setup_standard.sr." echo " # to get the standard values and stores them into a new file called" echo " # /net/corvus/doocs/gun/setup/sr/setup_"date".sr." echo " # Then this file is copied to setup.sr from which the settings may be restored." echo exit 2 } while getopts h? i do case $i in ? | h) usage ;; esac done datum=`date +%d.%m.%y_%H:%M:%S` doocsget -f /net/corvus/doocs/gun/setup/sr/setup_standard.sr -b /net/corvus/doocs/gun/setup/sr/setup_${datum}.sr > /dev/null cp -p /net/corvus/doocs/gun/setup/sr/setup_${datum}.sr /net/corvus/doocs/gun/setup/sr/setup.sr