summaryrefslogtreecommitdiffstats
path: root/auth/unix/firstAsRoot.sh
diff options
context:
space:
mode:
authorSai Gandham <gandham.saiprasad@gmail.com>2020-04-25 21:29:29 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-25 21:29:29 +0000
commitd7c1a1b6c4218e3f470f86e4ff67fdcdc86f0ea5 (patch)
treedeb33803d25e4a5d11aa7e42131d3490b08dc6ba /auth/unix/firstAsRoot.sh
parente4220946ef3feb864ed45e4fc14682be2016dc1b (diff)
parent475da40b0d58acdf4dd1a3590c490ce7b95a1af8 (diff)
Merge "Add StandAlone Unix Configurations Include scripts, podman starts, minor code changes."
Diffstat (limited to 'auth/unix/firstAsRoot.sh')
-rw-r--r--auth/unix/firstAsRoot.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/auth/unix/firstAsRoot.sh b/auth/unix/firstAsRoot.sh
new file mode 100644
index 00000000..8a66130b
--- /dev/null
+++ b/auth/unix/firstAsRoot.sh
@@ -0,0 +1,20 @@
+#
+. ./l.props
+if [ -z "$1" ]; then
+ echo "Enter 'user:group' for the directory after creation"
+ read CHOWN
+else
+ CHOWN="$1"
+fi
+
+
+for D in $INSTALL_DIR $ORG_DIR; do
+ if [ -e $D ]; then
+ echo "$D already exists"
+ else
+ mkdir -p $D
+ echo "$D created"
+ fi
+ echo "Setting Ownership of $D to $CHOWN"
+ chown $CHOWN $D
+done