From: Romain Naour Date: Sun, 3 Jul 2016 11:11:41 +0200 Subject: [Buildroot] [PATCH 11/24 v2] system: do not set hostname and issue for custom skeleton In-Reply-To: <4fb0c79b53f137cd3f1362b3f3ebab44f8b1d782.1466622379.git.yann.morin.1998@free.fr> References: <4fb0c79b53f137cd3f1362b3f3ebab44f8b1d782.1466622379.git.yann.morin.1998@free.fr> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hi Yann, Le 22/06/2016 ? 21:07, Yann E. MORIN a ?crit : > We expect the custom skeleton to be fully filled with the necessary > files, now. There is definitely no reason we should handle setting the > hostname and the issue file in there. A user using a custom skeleton > should be fully responsible for providing a functional skeleton. > > Signed-off-by: "Yann E. MORIN" Reviewed-by: Romain Naour Best regards, Romain > > --- > Note: beside the skeleton, the only other user of the hostname was the > perl package, and it was just previously changed not to use it anymore. > --- > package/skeleton/skeleton.mk | 8 ++++---- > system/Config.in | 4 ++++ > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk > index 144b759..e67a477 100644 > --- a/package/skeleton/skeleton.mk > +++ b/package/skeleton/skeleton.mk > @@ -110,6 +110,10 @@ define SKELETON_INSTALL_STAGING_CMDS > ln -snf lib $(STAGING_DIR)/usr/$(SKELETON_LIB_SYMLINK) > endef > > +# The TARGET_FINALIZE_HOOKS must be sourced only if the users choose to use the > +# default skeleton. > +ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) > + > SKELETON_TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) > SKELETON_TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE)) > SKELETON_TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD)) > @@ -138,10 +142,6 @@ endef > TARGET_FINALIZE_HOOKS += SKELETON_SET_ISSUE > endif > > -# The TARGET_FINALIZE_HOOKS must be sourced only if the users choose to use the > -# default skeleton. > -ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) > - > define SKELETON_SET_NETWORK_LOCALHOST > ( \ > echo "# interface file auto-generated by buildroot"; \ > diff --git a/system/Config.in b/system/Config.in > index c02f394..3a38bd4 100644 > --- a/system/Config.in > +++ b/system/Config.in > @@ -28,6 +28,8 @@ config BR2_ROOTFS_MERGED_USR > > endif > > +if BR2_ROOTFS_SKELETON_DEFAULT > + > config BR2_TARGET_GENERIC_HOSTNAME > string "System hostname" > default "buildroot" > @@ -46,6 +48,8 @@ config BR2_TARGET_GENERIC_ISSUE > Leave empty to not create /etc/issue, or to keep the > one from a custom skeleton. > > +endif > + > choice > bool "Passwords encoding" > default BR2_TARGET_GENERIC_PASSWD_MD5 >