From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OioUa-0005Ma-Ta for garchives@archives.gentoo.org; Tue, 10 Aug 2010 13:03:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 293C5E08EF for ; Tue, 10 Aug 2010 13:03:44 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id BE682E08BD for ; Tue, 10 Aug 2010 12:58:55 +0000 (UTC) Received: from weird.localnet (p4FF058C0.dip.t-dialin.net [79.240.88.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id 699F04A8290 for ; Tue, 10 Aug 2010 14:58:55 +0200 (CEST) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] finding out current softlevel Date: Tue, 10 Aug 2010 14:58:53 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34-tuxonice-r1; KDE/4.4.5; x86_64; ; ) References: <20100810144202.GA3540@laptop.gs> In-Reply-To: <20100810144202.GA3540@laptop.gs> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008101458.53669.wonko@wonkology.org> X-Archives-Salt: 67602bc2-72e2-4675-b5e0-7364a632aae5 X-Archives-Hash: 9b7f4829fbc229894e8af1a6f2bc07d5 linux@gabriel-striewe.de writes: > I was wondering whether there is some way to find out the current > running softlevel (which I gave to the kernel line in grub's > menu.lst), for example to start another window manager depending on > the softlevel or whatever other possible solutions? Maybe in a > variable like $SOFTLEVEL ? At least you can get the complete kernel line from /proc/cmdline. If you like, put something like this into your .bashrc: # get boot parameters: SOFTLEVEL=$( < /proc/cmdline ) # strip from left all up to and including 'softlevel=': SOFTLEVEL=${SOFTLEVEL##*softlevel=} # strip from the right all from the first blank on: SOFTLEVEL=${SOFTLEVEL%% *} # strip all Oh, or forget about all this, as I just see that there is the rc-status -r command. Wonko