[Buildroot] [PATCH] system: only set the root password if it's not empty
Wade Berrier
wberrier at gmail.com
Tue Jul 2 08:52:26 UTC 2013
No need to replace the password in etc/shadow with a blank password.
This also helps alleviate the situation when etc/shadow contains a password
which isn't meant to be blown away with a blank root password because mkpasswd
is non-functioning (rhel6).
This is somewhat of a workaround for distros (rhel6, and maybe fedora?) that
don't have a compatible mkpasswd. They have grub-crypt, but it doesn't appear
to be as script friendly.
Signed-off-by: Wade Berrier <wberrier at gmail.com>
---
system/system.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/system/system.mk b/system/system.mk
index 50c86ad..fa98532 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -57,7 +57,9 @@ TARGETS += target-generic-issue
endif
ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
+ifneq ($(TARGET_GENERIC_ROOT_PASSWD),)
TARGETS += target-root-passwd
+endif
ifneq ($(TARGET_GENERIC_GETTY),)
TARGETS += target-generic-getty-$(if $(BR2_PACKAGE_SYSVINIT),sysvinit,busybox)
--
1.7.9.5
More information about the buildroot
mailing list