From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] finding out current softlevel
Date: Tue, 10 Aug 2010 14:58:53 +0200 [thread overview]
Message-ID: <201008101458.53669.wonko@wonkology.org> (raw)
In-Reply-To: <20100810144202.GA3540@laptop.gs>
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
next prev parent reply other threads:[~2010-08-10 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 14:42 [gentoo-user] finding out current softlevel linux
2010-08-10 12:58 ` Alex Schuster [this message]
2010-08-10 14:01 ` linux
2010-08-10 13:24 ` Neil Bothwick
2010-08-10 13:27 ` Neil Bothwick
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=201008101458.53669.wonko@wonkology.org \
--to=wonko@wonkology.org \
--cc=gentoo-user@lists.gentoo.org \
/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