diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk index 70d1258d1e..48e708515d 100644 --- a/package/skeleton/skeleton.mk +++ b/package/skeleton/skeleton.mk @@ -95,19 +95,19 @@ ifeq ($(BR2_TARGET_ENABLE_ROOT_LOGIN),y) ifeq ($(SKELETON_TARGET_GENERIC_ROOT_PASSWD),) SYSTEM_ROOT_PASSWORD = else ifneq ($(filter $$1$$% $$5$$% $$6$$%,$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)),) -SYSTEM_ROOT_PASSWORD = $(SKELETON_TARGET_GENERIC_ROOT_PASSWD) +SYSTEM_ROOT_PASSWORD = '$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)' else SKELETON_DEPENDENCIES += host-mkpasswd # This variable will only be evaluated in the finalize stage, so we can # be sure that host-mkpasswd will have already been built by that time. -SYSTEM_ROOT_PASSWORD = $(shell $(MKPASSWD) -m "$(SKELETON_TARGET_GENERIC_PASSWD_METHOD)" "$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)") +SYSTEM_ROOT_PASSWORD = "`$(MKPASSWD) -m "$(SKELETON_TARGET_GENERIC_PASSWD_METHOD)" "$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)"`" endif else # !BR2_TARGET_ENABLE_ROOT_LOGIN -SYSTEM_ROOT_PASSWORD = * +SYSTEM_ROOT_PASSWORD = "*" endif define SKELETON_SYSTEM_SET_ROOT_PASSWD - $(SED) 's,^root:[^:]*:,root:$(SYSTEM_ROOT_PASSWORD):,' $(TARGET_DIR)/etc/shadow + $(SED) s,^root:[^:]*:,root:$(SYSTEM_ROOT_PASSWORD):, $(TARGET_DIR)/etc/shadow endef TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_SET_ROOT_PASSWD