⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 amcheckdb.sh

📁 开源备份软件源码 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that a
💻 SH
字号:
#! @SHELL@## check tapelist against database and vice versa#prefix="@prefix@"exec_prefix="@exec_prefix@"sbindir="@sbindir@"amlibexecdir="@amlibexecdir@". "${amlibexecdir}/amanda-sh-lib.sh"ConfigDir=@CONFIG_DIR@# add sbin and ucb dirsPATH="$PATH:/usr/sbin:/sbin:/usr/ucb"export PATHUSE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@"if test "$USE_VERSION_SUFFIXES" = "yes"; then	SUF="-@VERSION@"else	SUF=fiProgram=`basename $0`log () {	echo 1>&2 "$@"	return 0}Config=$1if [ "$Config" = "" ]; then	log "usage: ${Program} <config>"	exit 1fishift;## Check if the configuration directory exists.  Make sure that the# necessary files can be found, such as amanda.conf and tapelist.#if [ ! -d ${ConfigDir}/${Config} ]; then	log "${Program}: configuration directory ${ConfigDir}/${Config} does not exist."	exit 1fi(cd ${ConfigDir}/${Config} >/dev/null 2>&1) || exit $?cd ${ConfigDir}/${Config}if [ ! -r amanda.conf ]; then	log "${Program}: amanda.conf not found or is not readable in ${ConfigDir}."	exit 1fi# Get the location and name of the tapelist filename.  If tapelist is not# specified in the amanda.conf file, then use tapelist in the config# directory.TapeList=`amgetconf${SUF} $Config tapelist "@$"`if [ ! "$TapeList" ]; then	TapeList="$ConfigDir/$Config/tapelist"fiif [ ! -r $TapeList ]; then	log "${Program}: $TapeList not found or is not readable."	exit 1fiAmadmin=$sbindir/amadmin$SUF[ ! -f $Amadmin ] \	&& echo `_ '%s was not found' $Amadmin` >&2 \	&& exit 1[ ! -x $Amadmin ] \	&& echo `_ '%s is not executable' $Amadmin` >&2 \	&& exit 1$Amadmin $Config export "$@"\	| grep "^stats: " \	| while read LINE; do		[ "$LINE" = "" ] && continue		set $LINE		echo $8	done \	| sort -u \	| while read TAPE; do		[ "$TAPE" = "" ] && continue		grep " $TAPE " $TapeList 2>/dev/null >/dev/null		[ $? != 0 ] \			&& echo `_ 'Tape %s missing in %s' "$TAPE" "$TapeList"`	doneecho `_ 'Ready.'`exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -