Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Thomas Orgis (3d2487065dc4a07ebb494f566b494b2b91031bbc)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Thomas Orgis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Thomas Orgis (3d2487065dc4a07ebb494f566b494b2b91031bbc)
  • Date: Sat, 21 May 2016 17:36:44 +0000

GIT changes to master grimoire by Thomas Orgis <sobukus AT sourcemage.org>:

smgl/init.d/DETAILS | 2 +-
smgl/init.d/HISTORY | 7 +++++++
smgl/init.d/init.d/devices | 20 ++++----------------
3 files changed, 12 insertions(+), 17 deletions(-)

New commits:
commit 3d2487065dc4a07ebb494f566b494b2b91031bbc
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

init.d: version 2.2.14, fixing devices script for proper version logic

It tried to activate hotplug for kernel 4.x!

diff --git a/smgl/init.d/DETAILS b/smgl/init.d/DETAILS
index 5cfabb3..342a3f3 100755
--- a/smgl/init.d/DETAILS
+++ b/smgl/init.d/DETAILS
@@ -1,5 +1,5 @@
SPELL=init.d
- VERSION=2.2.13
+ VERSION=2.2.14
LICENSE[0]=GPL
GATHER_DOCS=off
PATCHLEVEL=1
diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY
index ecef973..a662109 100644
--- a/smgl/init.d/HISTORY
+++ b/smgl/init.d/HISTORY
@@ -1,3 +1,10 @@
+2016-05-21 Thomas Orgis <sobukus AT sourcemage.org>
+ * init.d/devices: fix version logic to use future-proof `sort -V`
+ This broke boot on a box with eudev and non-root LVM without initrd,
+ as the version check did not know kernel 4.x .
+ We might just drop the hotplug check, though.
+ * DETAILS: version 2.2.14
+
2016-04-19 Eric Sandall <sandalle AT sourcemage.org>
* init.d/devices.conf: Fix RUN_SIZE comment to match reality

diff --git a/smgl/init.d/init.d/devices b/smgl/init.d/init.d/devices
index 61a2660..aab20a5 100755
--- a/smgl/init.d/init.d/devices
+++ b/smgl/init.d/init.d/devices
@@ -52,15 +52,9 @@ start_udev()
# create some needed stuff
udev_mknodes

-# strip out kernel sublevel and patchlevel so we can check against them
-# since we don't support 1.x linux kernels then we don't have to check that
- PATCHLEVEL=`uname -r | cut -d. -f2`
- SUBLEVEL=`uname -r | cut -d. -f3`
- tmp=`uname -r | cut -d. -f3 | sed 's/^[0-9]*//g'`
- SUBLEVEL=${SUBLEVEL/$tmp/}
-
# kernel 2.6.15-rc1 and higher don't use hotplug
- if [[ $(uname -r) = 3.* ]] || [ $SUBLEVEL -ge 15 -a $PATCHLEVEL -ge 6
]; then
+ if [[ $(printf "%s\n%s\n" "$(uname -r)" "2.6.15" | sort -V | head -n 1) \
+ = 2.6.15 ]]; then
echo "don't need hotplug for this kernel"
builtin echo > /proc/sys/kernel/hotplug
else
@@ -100,15 +94,9 @@ start_static_udev()
# create some needed stuff - and insist on it
udev_mknodes

- # strip out kernel sublevel and patchlevel so we can check against them
- # since we don't support 1.x linux kernels then we don't have to check that
- PATCHLEVEL=$(uname -r | cut -d. -f2)
- SUBLEVEL=$(uname -r | cut -d. -f3)
- tmp=$(uname -r | cut -d. -f3 | sed 's/^[0-9]*//g')
- SUBLEVEL=${SUBLEVEL/$tmp/}
-
# kernel 2.6.15-rc1 and higher don't use hotplug
- if [[ $(uname -r) = 3.* ]] || [ $SUBLEVEL -ge 15 -a $PATCHLEVEL -ge 6
]; then
+ if [[ $(printf "%s\n%s\n" "$(uname -r)" "2.6.15" | sort -V | head -n 1) \
+ = 2.6.15 ]]; then
echo "don't need hotplug for this kernel"
builtin echo > /proc/sys/kernel/hotplug
else



  • [SM-Commit] GIT changes to master grimoire by Thomas Orgis (3d2487065dc4a07ebb494f566b494b2b91031bbc), Thomas Orgis, 05/21/2016

Archive powered by MHonArc 2.6.24.

Top of Page