projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support --nopassword option to not prompt for the root password
[grml-debootstrap.git]
/
chroot-script
diff --git
a/chroot-script
b/chroot-script
index
294b749
..
84086cc
100755
(executable)
--- a/
chroot-script
+++ b/
chroot-script
@@
-241,6
+241,11
@@
reconfigure() {
# set password of user root {{{
passwords()
{
# set password of user root {{{
passwords()
{
+ if [ -n "$NOPASSWORD" ] ; then
+ echo "Skip setting root password as requested."
+ return 0
+ fi
+
echo "Activating shadow passwords."
shadowconfig on
echo "Activating shadow passwords."
shadowconfig on
@@
-249,7
+254,6
@@
passwords()
CHPASSWD_OPTION='-m'
fi
CHPASSWD_OPTION='-m'
fi
-
if [ -n "$ROOTPASSWORD" ] ; then
echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION
export ROOTPASSWORD=''
if [ -n "$ROOTPASSWORD" ] ; then
echo root:"$ROOTPASSWORD" | chpasswd $CHPASSWD_OPTION
export ROOTPASSWORD=''