summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-06-18 06:56:14 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-01 09:31:09 +0000
commitf61044a70d65cb3e6080cd03f77c2a4b821011f4 (patch)
treece2388d09bf2cf3ebaef7182526ec425fe70b1a9 /lib
parentCorrecting bind mount directory removal in container remove command to work w... (diff)
downloadcompute-tools-f61044a70d65cb3e6080cd03f77c2a4b821011f4.tar.xz
compute-tools-f61044a70d65cb3e6080cd03f77c2a4b821011f4.zip
Using global path definition in container create command for consistency.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/container/create11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/container/create b/lib/container/create
index f5d005c..8080ffa 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -22,6 +22,7 @@ COMMAND="$(basename ${0})"
CONFIG="/etc/container-tools/config"
MACHINES="/var/lib/machines"
+SCRIPTS="/usr/share/container-tools/scripts"
Parameters ()
{
@@ -105,9 +106,9 @@ fi
if [ -z "${SCRIPT}" ]
then
- if [ -e /usr/share/container-tools/scripts/default ]
+ if [ -e "${SCRIPTS}/default" ]
then
- TARGET="$(basename $(readlink /usr/share/container-tools/scripts/default))"
+ TARGET="$(basename $(readlink ${SCRIPTS}/default))"
case "${TARGET}" in
container-tools_script)
@@ -115,7 +116,7 @@ then
;;
esac
- if [ -e "/usr/share/container-tools/scripts/${TARGET}" ]
+ if [ -e "${SCRIPTS}/${TARGET}" ]
then
SCRIPT="${TARGET}"
else
@@ -126,7 +127,7 @@ then
SCRIPT="debian"
fi
else
- if [ ! -e "/usr/share/container-tools/scripts/${SCRIPT}" ]
+ if [ ! -e "${SCRIPTS}/${SCRIPT}" ]
then
echo "'${SCRIPT}': no such script" >&2
exit 1
@@ -166,4 +167,4 @@ sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
/usr/share/container-tools/config/container.conf.in > "${CONFIG}/${NAME}.conf"
# Run
-"/usr/share/container-tools/scripts/${SCRIPT}" $(echo "${@}" | sed -e 's| -- | |')
+"${SCRIPTS}/${SCRIPT}" $(echo "${@}" | sed -e 's| -- | |')