From patchwork Wed Oct 30 22:55:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 287363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7CFE52C037D for ; Thu, 31 Oct 2013 09:56:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 95B658B90C; Wed, 30 Oct 2013 22:56:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u1y_AwcZQN9j; Wed, 30 Oct 2013 22:56:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 085CB8B993; Wed, 30 Oct 2013 22:56:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2FF511C2ADC for ; Wed, 30 Oct 2013 22:56:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 26C7182809 for ; Wed, 30 Oct 2013 22:56:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HlLEVHT6hB9M for ; Wed, 30 Oct 2013 22:56:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com [205.175.225.240]) by whitealder.osuosl.org (Postfix) with ESMTPS id D795C8C249 for ; Wed, 30 Oct 2013 22:55:36 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp01.rockwellcollins.com) ([131.198.63.132]) by mail-virt.rockwellcollins.com with ESMTP; 30 Oct 2013 17:55:35 -0500 Received: from ares ([131.198.63.11]) by collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013103017553518-8454987 ; Wed, 30 Oct 2013 17:55:35 -0500 From: Ryan Barnett To: buildroot@busybox.net Date: Wed, 30 Oct 2013 17:55:32 -0500 Message-Id: <1383173732-19980-1-git-send-email-rjbarnet@rockwellcollins.com> X-Mailer: git-send-email 1.7.1 X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 10/30/2013 05:55:35 PM, Serialize by Router on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 10/30/2013 05:55:35 PM, Serialize complete at 10/30/2013 05:55:35 PM X-TNEFEvaluated: 1 Subject: [Buildroot] [PATCH v2 1/1] sysvinit: install new cmds and fix inittab X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Adding support for sysvinit to install reboot, poweroff, and pidof commands available in /sbin. Fixes bug #6620 Removed uninstall commands since they aren't used. There is an error with sysvinit that will prevent the system from booting if "dshm::sysinit:/bin/mkdir -p /dev/shm" is not present in the inittab. Signed-off-by: Ryan Barnett --- package/sysvinit/inittab | 1 + package/sysvinit/sysvinit.mk | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab index afa0dc3..c85e75a 100644 --- a/package/sysvinit/inittab +++ b/package/sysvinit/inittab @@ -7,6 +7,7 @@ id:1:initdefault: proc::sysinit:/bin/mount -t proc proc /proc rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW dpts::sysinit:/bin/mkdir -p /dev/pts +dshm::sysinit:/bin/mkdir -p /dev/shm moun::sysinit:/bin/mount -a host::sysinit:/bin/hostname -F /etc/hostname init::sysinit:/etc/init.d/rcS diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk index 131c63f..07bfc6f 100644 --- a/package/sysvinit/sysvinit.mk +++ b/package/sysvinit/sysvinit.mk @@ -31,18 +31,15 @@ define SYSVINIT_BUILD_CMDS endef define SYSVINIT_INSTALL_TARGET_CMDS - for x in halt init shutdown; do \ + for x in halt init shutdown killall5; do \ install -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ done # Override Busybox's inittab with an inittab compatible with # sysvinit install -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab -endef - -define SYSVINIT_UNINSTALL_TARGET_CMDS - for x in halt init shutdown; do \ - rm -f $(TARGET_DIR)/sbin/$$x || exit 1; \ - done + ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot + ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff + ln -sf killall5 $(TARGET_DIR)/sbin/pidof endef define SYSVINIT_CLEAN_CMDS