summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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| -- | |')