From f61044a70d65cb3e6080cd03f77c2a4b821011f4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 Jun 2016 08:56:14 +0200 Subject: Using global path definition in container create command for consistency. Signed-off-by: Daniel Baumann --- lib/container/create | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/container/create') 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| -- | |') -- cgit v1.2.3