Commit 5be56973 by Serge Hallyn

templates: require running as root

Up to now lxc-create ensured that you were running as root. Now the templates which require root need to do it for themselves. Templates which do mknod definately require root. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 4165b2c6
...@@ -250,6 +250,12 @@ default_path=@LXCPATH@ ...@@ -250,6 +250,12 @@ default_path=@LXCPATH@
release= release=
arch=$(uname -m) arch=$(uname -m)
# template mknods, requires root
if [ $(id -u) -ne 0 ]; then
echo "$(basename $0): must be run as root" >&2
exit 1
fi
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
opt="$1" opt="$1"
shift shift
......
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