Commit 10f73bfa by Serge Hallyn Committed by Stéphane Graber

lxc-ubuntu-cloud: get full pathname to userdata file

When passing '--userdata somefile' to the ubuntu-cloud template, a user may pass a relative pathname. The template uses the filename after changing current directory, so store the full pathname for the userdata file instead of a potential relative pathname. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent e7f40d8a
...@@ -221,9 +221,13 @@ if [ "$stream" != "daily" -a "$stream" != "released" ]; then ...@@ -221,9 +221,13 @@ if [ "$stream" != "daily" -a "$stream" != "released" ]; then
exit 1 exit 1
fi fi
if [ -n "$userdata" -a ! -f "$userdata" ]; then if [ -n "$userdata" ]; then
echo "Userdata does not exist" if [ ! -f "$userdata" ]; then
exit 1 echo "Userdata ($userdata) does not exist"
exit 1
else
userdata=`readlink -f $userdata`
fi
fi fi
if [ -z "$path" ]; then if [ -z "$path" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment