Fix message after {fedora|centos}container creation

If the backingstore is not 'dir', then lxc shouldn't ask the user
to change the password by performing a 'chroot'. Rather, the user
should start, attach, use the passwd command, and then stop the
container.

Fixes #731

Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
This commit is contained in:
Nehal J Wani 2016-01-22 02:36:33 +05:30
parent 6361a0f2dd
commit d510d5224b
2 changed files with 22 additions and 2 deletions

View File

@ -916,6 +916,15 @@ then
else
if [ ${root_expire_password} = "yes" ]
then
if ( mountpoint -q -- "${rootfs_path}" )
then
echo "To reset the root password, you can do:
lxc-start -n ${name}
lxc-attach -n ${name} -- passwd
lxc-stop -n ${name}
"
else
echo "
The root password is set up as "expired" and will require it to be changed
at first login, which you should do as soon as possible. If you lose the
@ -926,4 +935,5 @@ also reset the expired flag):
chroot ${rootfs_path} passwd
"
fi
fi
fi

View File

@ -1468,6 +1468,15 @@ then
else
if [ ${root_expire_password} = "yes" ]
then
if ( mountpoint -q -- "${rootfs_path}" )
then
echo "To reset the root password, you can do:
lxc-start -n ${name}
lxc-attach -n ${name} -- passwd
lxc-stop -n ${name}
"
else
echo "
The root password is set up as "expired" and will require it to be changed
at first login, which you should do as soon as possible. If you lose the
@ -1478,4 +1487,5 @@ also reset the expired flag):
chroot ${rootfs_path} passwd
"
fi
fi
fi