mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
samba_backup: check that directory really exists
This commit is contained in:
committed by
Andrew Tridgell
parent
fa194c33b2
commit
9117a2fa3c
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (C) Matthieu Patou <mat@matws.net> 2010
|
# Copyright (C) Matthieu Patou <mat@matws.net> 2010-2011
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -34,6 +34,16 @@ DIRS="private etc sysvol"
|
|||||||
DAYS=90
|
DAYS=90
|
||||||
WHEN=`date +%d%m%y`
|
WHEN=`date +%d%m%y`
|
||||||
|
|
||||||
|
if [ ! -d $WHERE ]; then
|
||||||
|
echo "Missing backup directorty $WHERE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $FROMWHERE ]; then
|
||||||
|
echo "Missing or wrong provision directorty $FROMWHERE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cd $FROMWHERE
|
cd $FROMWHERE
|
||||||
for d in $DIRS;do
|
for d in $DIRS;do
|
||||||
relativedirname=`find . -type d -name "$d" -prune`
|
relativedirname=`find . -type d -name "$d" -prune`
|
||||||
|
Reference in New Issue
Block a user