git.samba.org
/
obnox
/
vagrant
/
vagrant-samba-ad-dc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c2725e
)
Improve backup of files when they don't exist previously.
author
Michael Adam
<obnox@samba.org>
Wed, 18 Feb 2015 23:28:40 +0000
(
00:28
+0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 18 Feb 2015 23:28:40 +0000
(
00:28
+0100)
Vagrantfile
patch
|
blob
|
history
diff --git
a/Vagrantfile
b/Vagrantfile
index 6fe2e38d31256be5ac8e6a5861d6d780e700a137..07134abef43a124c5f7f0a5a8949ec648821099b 100644
(file)
--- a/
Vagrantfile
+++ b/
Vagrantfile
@@
-105,6
+105,7
@@
stop samba-ad-dc || true
BACKUP_SUFFIX=".orig.$(date +%Y%m%d-%H%M%S)"
FILE=/etc/samba/smb.conf
+test -f ${FILE} || touch ${FILE}
mv -f ${FILE} ${FILE}${BACKUP_SUFFIX}
samba-tool domain provision \
@@
-116,6
+117,7
@@
samba-tool domain provision \
--use-rfc2307
FILE=/etc/resolv.conf
+test -f ${FILE} || touch ${FILE}
mv -f ${FILE} ${FILE}${BACKUP_SUFFIX}
cat <<EOF > ${FILE}
nameserver 127.0.0.1