Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] rootfs: clean up /etc/inittab
@ 2011-11-23 22:24 Trevor Woerner
  2011-11-26 13:54 ` Trevor Woerner
  0 siblings, 1 reply; 2+ messages in thread
From: Trevor Woerner @ 2011-11-23 22:24 UTC (permalink / raw)
  To: buildroot

If, for example, sysklogd is not selected try to strip out the logging
commands from /etc/inittab.
---
 target/generic/Makefile.in |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in
index 4185202..bd400c3 100644
--- a/target/generic/Makefile.in
+++ b/target/generic/Makefile.in
@@ -31,6 +31,20 @@ target-generic-do-remount-rw:
 target-generic-dont-remount-rw:
 	$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
 
+target-generic-no-util-linux:
+	$(SED) '/\<mount\>/d' $(TARGET_DIR)/etc/inittab
+	$(SED) '/\<umount\>/d' $(TARGET_DIR)/etc/inittab
+	$(SED) '/\<swapoff\>/d' $(TARGET_DIR)/etc/inittab
+
+target-generic-no-coreutils:
+	$(SED) '/\<mkdir\>/d' $(TARGET_DIR)/etc/inittab
+	$(SED) '/\<hostname\>/d' $(TARGET_DIR)/etc/inittab
+	$(SED) '/\<touch\>/d' $(TARGET_DIR)/etc/inittab
+
+target-generic-no-sysklogd:
+	$(SED) '/\<klogd\>/d' $(TARGET_DIR)/etc/inittab
+	$(SED) '/\<syslogd\>/d' $(TARGET_DIR)/etc/inittab
+
 ifneq ($(TARGET_GENERIC_HOSTNAME),)
 TARGETS += target-generic-hostname
 endif
@@ -50,4 +64,15 @@ TARGETS += target-generic-do-remount-rw
 else
 TARGETS += target-generic-dont-remount-rw
 endif
+ifneq ($(BR2_PACKAGE_BUSYBOX),y)
+ifneq ($(BR2_PACKAGE_UTIL_LINUX),y)
+TARGETS += target-generic-no-util-linux
+endif
+ifneq ($(BR2_PACAKGE_COREUTILS),y)
+TARGETS += target-generic-no-coreutils
+endif
+ifneq ($(BR2_PACKAGE_SYSKLOGD),y)
+TARGETS += target-generic-no-sysklogd
+endif
+endif
 endif
-- 
1.7.6.233.gd79bc

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] rootfs: clean up /etc/inittab
  2011-11-23 22:24 [Buildroot] [PATCH] rootfs: clean up /etc/inittab Trevor Woerner
@ 2011-11-26 13:54 ` Trevor Woerner
  0 siblings, 0 replies; 2+ messages in thread
From: Trevor Woerner @ 2011-11-26 13:54 UTC (permalink / raw)
  To: buildroot

ping

On Wed, Nov 23, 2011 at 5:24 PM, Trevor Woerner <twoerner@gmail.com> wrote:
> If, for example, sysklogd is not selected try to strip out the logging
> commands from /etc/inittab.
> ---
> ?target/generic/Makefile.in | ? 25 +++++++++++++++++++++++++
> ?1 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in
> index 4185202..bd400c3 100644
> --- a/target/generic/Makefile.in
> +++ b/target/generic/Makefile.in
> @@ -31,6 +31,20 @@ target-generic-do-remount-rw:
> ?target-generic-dont-remount-rw:
> ? ? ? ?$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
>
> +target-generic-no-util-linux:
> + ? ? ? $(SED) '/\<mount\>/d' $(TARGET_DIR)/etc/inittab
> + ? ? ? $(SED) '/\<umount\>/d' $(TARGET_DIR)/etc/inittab
> + ? ? ? $(SED) '/\<swapoff\>/d' $(TARGET_DIR)/etc/inittab
> +
> +target-generic-no-coreutils:
> + ? ? ? $(SED) '/\<mkdir\>/d' $(TARGET_DIR)/etc/inittab
> + ? ? ? $(SED) '/\<hostname\>/d' $(TARGET_DIR)/etc/inittab
> + ? ? ? $(SED) '/\<touch\>/d' $(TARGET_DIR)/etc/inittab
> +
> +target-generic-no-sysklogd:
> + ? ? ? $(SED) '/\<klogd\>/d' $(TARGET_DIR)/etc/inittab
> + ? ? ? $(SED) '/\<syslogd\>/d' $(TARGET_DIR)/etc/inittab
> +
> ?ifneq ($(TARGET_GENERIC_HOSTNAME),)
> ?TARGETS += target-generic-hostname
> ?endif
> @@ -50,4 +64,15 @@ TARGETS += target-generic-do-remount-rw
> ?else
> ?TARGETS += target-generic-dont-remount-rw
> ?endif
> +ifneq ($(BR2_PACKAGE_BUSYBOX),y)
> +ifneq ($(BR2_PACKAGE_UTIL_LINUX),y)
> +TARGETS += target-generic-no-util-linux
> +endif
> +ifneq ($(BR2_PACAKGE_COREUTILS),y)
> +TARGETS += target-generic-no-coreutils
> +endif
> +ifneq ($(BR2_PACKAGE_SYSKLOGD),y)
> +TARGETS += target-generic-no-sysklogd
> +endif
> +endif
> ?endif
> --
> 1.7.6.233.gd79bc
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-26 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 22:24 [Buildroot] [PATCH] rootfs: clean up /etc/inittab Trevor Woerner
2011-11-26 13:54 ` Trevor Woerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox