From: Trevor Woerner <twoerner@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] rootfs: clean up /etc/inittab
Date: Wed, 23 Nov 2011 17:24:06 -0500 [thread overview]
Message-ID: <1322087046-5473-1-git-send-email-twoerner@gmail.com> (raw)
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
next reply other threads:[~2011-11-23 22:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 22:24 Trevor Woerner [this message]
2011-11-26 13:54 ` [Buildroot] [PATCH] rootfs: clean up /etc/inittab Trevor Woerner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322087046-5473-1-git-send-email-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox