Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Sukneet Basuta (6ce0e03ddb5a844fb50fbf7dd1b07c90016ce325)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: flux <flux AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Sukneet Basuta (6ce0e03ddb5a844fb50fbf7dd1b07c90016ce325)
  • Date: Thu, 7 Jun 2012 15:38:54 +0900

Sukneet Basuta (scm AT sourcemage.org) wrote [12.06.07 13:48]:
> GIT changes to master grimoire by Sukneet Basuta <sukneet AT sourcemage.org>:
>
> smgl/init.d/DEPENDS | 3 ++-
> smgl/init.d/HISTORY | 3 +++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> New commits:
> commit 6ce0e03ddb5a844fb50fbf7dd1b07c90016ce325
> Author: Sukneet Basuta <sukneet AT sourcemage.org>
> Commit: Sukneet Basuta <sukneet AT sourcemage.org>
>
> init.d: make udev check for linux 3.x more robust
>
> diff --git a/smgl/init.d/DEPENDS b/smgl/init.d/DEPENDS
> index 34d7ecc..305bdcc 100755
> --- a/smgl/init.d/DEPENDS
> +++ b/smgl/init.d/DEPENDS
> @@ -10,11 +10,12 @@ the old static /dev"
> elif [[ $DEVICES == udev ]]
> then
> local KVER=$(get_kernel_version) &&
> + local VER1=${KVER/.*} &&
> local VER2=$(echo $KVER | cut -d. -f2) &&
> local VER3=$(echo $KVER | cut -d. -f3) &&
> VER3=${VER3%%[^0-9]*} &&
>
> - if [[ $KVER/.* >=3 ]] ||
> + if (( VER1 > 2 )) ||
> (( VER2 > 6 )) ||
> (( VER2 == 6 && VER3 > 14 )) ||
> spell_ok udev

I didn't have a chance to review the earlier commits for version checks,
so I'm pointing this out now but not blaming Sukneet for earlier code.
;)

With the version 2 checks, it could *technically* pass for a 1.7 kernel
as well, which of course would be erroneous. Now, I doubt very much that
there is anyone running a SMGL system on anything lower than 2.4, but if
we're going to make a check robus, how robust should we make it? This
may not be an issue now, but if 4.0 suddenly comes out and is radically
different from 2.x and 3.x, ideally our checks should be tightened more.

Something like:
if (( VER1 == 3 )) ||
(( VER1 == 2 )) &&
[[ (( VER2 > 6 )) || (( VER2 == 6 && VER3 > 14 )) ]] ||
spell_ok udev

The VER1 == 3 check can be changed to VER1 > 2 later if later versions
are verfied to work the same as 2 and 3. Or we could leave it at VER1 >
2 for now and change it if needed later. Just my 2 cents.

--
Justin "flux_control" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org

Attachment: pgpDA5m7oEajC.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page