aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local
diff options
context:
space:
mode:
Diffstat (limited to 'nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local')
-rwxr-xr-xnfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local9
1 files changed, 8 insertions, 1 deletions
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local
index 3311530..4a8e66b 100755
--- a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/03-copy-rc-local
@@ -1,8 +1,15 @@
#!/bin/bash
+if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
+ set -x
+fi
+
+# Stop on error
+set -euo pipefail
+
# set accurate rc.local file corresponding to current image built
if [ $DIB_DEV_IMAGE = "loopvm" ]; then
mv /etc/rc.d/rc.local.loopvm /etc/rc.d/rc.local
else
mv /etc/rc.d/rc.local.generator /etc/rc.d/rc.local
-fi \ No newline at end of file
+fi