mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 02:46:50 +00:00
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: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
e7f40d8aab
commit
10f73bfa4a
@ -221,9 +221,13 @@ if [ "$stream" != "daily" -a "$stream" != "released" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$userdata" -a ! -f "$userdata" ]; then
|
||||
echo "Userdata does not exist"
|
||||
exit 1
|
||||
if [ -n "$userdata" ]; then
|
||||
if [ ! -f "$userdata" ]; then
|
||||
echo "Userdata ($userdata) does not exist"
|
||||
exit 1
|
||||
else
|
||||
userdata=`readlink -f $userdata`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user