Mailinglist Archive: opensuse (3627 mails)

< Previous Next >
Re: [SLE] Kernel & boot question....
  • From: dieter <dieter@xxxxxxxxxxxxxxxx>
  • Date: Sat, 9 Jun 2001 16:39:42 +0200 (CEST)
  • Message-id: <Pine.BSF.4.31.0106091630210.2870-100000@xxxxxxxxxxxxx>


You could grep on the output of uname -a

uname -a
Linux caliban 2.4.4 #7 Fri Jun 8 15:26:26 CEST 2001 i686 unknown

for example:
if echo `uname -a` |grep "#7" >/dev/null
then\
run X
elif echo `uname a` |grep "#8" >/dev/null
then\
run Y
else run Z
fi

(hope there are no syntax errors in here)

But this is kinda ugly. If you rcompile a kernel, the number changes and
you have to change the script. There might be a better way.

hth,

>From James Jim Hatridge to SuSE Mailing List about [SLE] Kernel & boot...:

>
> Hi all....
>
> I've got 3 kernels on my system, "A B C". I want to start different programs
> running according to which kernel I boot. What I whould like to happen is in
> boot.local (or where-ever) it say "if kernal A run X, if kernel B run Y". Is
> there anyway to do this?
>
> BTW I'm running SuSE 7.1......
>
> TIA!
>
>

--
dieter



< Previous Next >
References