Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d0800999
Commit
d0800999
authored
Dec 12, 2013
by
John Lane
Committed by
Stéphane Graber
Jan 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-archlinux: optional --root_passwd argument
Signed-off-by:
John Lane
<
john@lane.uk.net
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
012f591a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
lxc-archlinux.in
templates/lxc-archlinux.in
+8
-1
No files found.
templates/lxc-archlinux.in
View file @
d0800999
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
# Authors:
# Authors:
# Alexander Vladimirov <idkfa@vlan1.ru>
# Alexander Vladimirov <idkfa@vlan1.ru>
# John Lane <lxc@jelmail.com>
# This library is free software; you can redistribute it and/or
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# modify it under the terms of the GNU Lesser General Public
...
@@ -211,12 +212,13 @@ Optional args:
...
@@ -211,12 +212,13 @@ Optional args:
-a,--arch use specified architecture instead of host's architecture
-a,--arch use specified architecture instead of host's architecture
-t,--network_type set container network interface type (
${
lxc_network_type
}
)
-t,--network_type set container network interface type (
${
lxc_network_type
}
)
-l,--network_link set network link device (
${
lxc_network_link
}
)
-l,--network_link set network link device (
${
lxc_network_link
}
)
-r,--root_passwd set container root password
-h,--help print this help
-h,--help print this help
EOF
EOF
return
0
return
0
}
}
options
=
$(
getopt
-o
hp:P:e:n:c:a:l:t:
-l
help
,rootfs:,path:,packages:,enable_units:,name:,config:,arch:,network_type:,network_link
:
--
"
${
@
}
"
)
options
=
$(
getopt
-o
hp:P:e:n:c:a:l:t:
r:
-l
help
,rootfs:,path:,packages:,enable_units:,name:,config:,arch:,network_type:,network_link:,root_passwd
:
--
"
${
@
}
"
)
if
[
${
?
}
-ne
0
]
;
then
if
[
${
?
}
-ne
0
]
;
then
usage
$(
basename
${
0
})
usage
$(
basename
${
0
})
exit
1
exit
1
...
@@ -236,6 +238,7 @@ do
...
@@ -236,6 +238,7 @@ do
-a
|
--arch
)
arch
=
${
2
}
;
shift
2
;;
-a
|
--arch
)
arch
=
${
2
}
;
shift
2
;;
-t
|
--network_type
)
lxc_network_type
=
${
2
}
;
shift
2
;;
-t
|
--network_type
)
lxc_network_type
=
${
2
}
;
shift
2
;;
-l
|
--network_link
)
lxc_network_link
=
${
2
}
;
shift
2
;;
-l
|
--network_link
)
lxc_network_link
=
${
2
}
;
shift
2
;;
-r
|
--root_passwd
)
root_passwd
=
${
2
}
;
shift
2
;;
--
)
shift
1
;
break
;;
--
)
shift
1
;
break
;;
*
)
break
;;
*
)
break
;;
esac
esac
...
@@ -317,4 +320,8 @@ if [ ${#enable_units[@]} -gt 0 ]; then
...
@@ -317,4 +320,8 @@ if [ ${#enable_units[@]} -gt 0 ]; then
done
done
fi
fi
if
[
-n
"
${
root_passwd
}
"
]
;
then
echo
"root:
${
root_passwd
}
"
|
chroot
"
${
rootfs_path
}
"
chpasswd
fi
echo
"container config is
${
config_path
}
/config"
echo
"container config is
${
config_path
}
/config"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment