View previous topic :: View next topic |
Author |
Message |
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Wed Sep 12, 2012 7:31 pm Post subject: Running scripts based on kernel |
|
|
What's the best way to run local.start scripts based on the current kernel version?
Is there a built-in way to do this?
I have two kernels, 3.0.x and 3.4.x, and the newer kernel needs a different script to run. |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Wed Sep 12, 2012 8:14 pm Post subject: |
|
|
Code: | case $(uname -r) in
$version-x) bla foo here ;;
$version-y) other stuff here ;;
*) anything else, error handling ;;
esac | ? _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Wed Sep 12, 2012 8:22 pm Post subject: |
|
|
I knew I could do that, I was wondering if baselayout had anything that did something similar already. Didn't want to reinvent the wheel. |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Wed Sep 12, 2012 8:36 pm Post subject: |
|
|
May very well be, though neither do I know about it, nor could I find something related quickly in baselayout/openrc. _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
|