From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1DuqPB-0007us-5m for garchives@archives.gentoo.org; Tue, 19 Jul 2005 11:36:57 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j6JBZ8ZG016248; Tue, 19 Jul 2005 11:35:08 GMT Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.198]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j6JBTpxx002423 for ; Tue, 19 Jul 2005 11:29:52 GMT Received: by nproxy.gmail.com with SMTP id a4so316496nfc for ; Tue, 19 Jul 2005 04:30:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=K6t7fN8oF8sjMYhhXaIxzeoikFCQyWr12F2nGcgfnIMZSCM6G45FNtGVg28kxbFYObSQBIdbHRJXpDP6NYzS1Yg8QyqxMdf4UFkJppsCnxZGRO0yo1xfVzxxUD9FPlRbsPWOTasXNr6hzBBfMxTWGHoIHwEyJe0f2SqllNII/Io= Received: by 10.48.3.11 with SMTP id 11mr223013nfc; Tue, 19 Jul 2005 04:30:49 -0700 (PDT) Received: by 10.48.237.10 with HTTP; Tue, 19 Jul 2005 04:30:47 -0700 (PDT) Message-ID: Date: Tue, 19 Jul 2005 12:30:47 +0100 From: Richard Brown To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Determining the current runlevel In-Reply-To: <20050719120915.54ee8fa0@hactar.digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <20050719103229.59118b4a@hactar.digimed.co.uk> <1121767433.31991.62.camel@neuromancer.home.net> <20050719120915.54ee8fa0@hactar.digimed.co.uk> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j6JBTpxx002423 X-Archives-Salt: b6e2deb7-e210-44b4-817c-d4e3ca7e91d3 X-Archives-Hash: 9d687351c668d3545af9a2d28e215ffa On 19/07/05, Neil Bothwick wrote: > On Tue, 19 Jul 2005 18:03:53 +0800, Ow Mun Heng wrote: > > > > I'm sure I've seen this mentioned before, but can't find it. I need a > > > way to find the current Gentoo runlevel (not the numeric one) in a > > > script. I can check the level booted by grepping /proc/cmdline, but > > > that fails if the runlevel was subsequently changed with rc. rc-status -nc | head -n 1 | cut -c11- HTH -- Richard Brown -- gentoo-user@gentoo.org mailing list