[Debian-eeepc-devel] How to deal with the freeze?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sun Nov 7 15:32:01 UTC 2010
On Sun, 7 Nov 2010, Ben Armstrong wrote:
> On 19/10/10 08:21 AM, Luca Niccoli wrote:
> > I pushed a branch to the main repository, it's called acpi-support-integration.
> > I think it could be ready to be released.
>
> Testing it today I found a bashism:
>
> LINUX_FULL_VER=`uname -r`
> LINUX_MINOR_REV=${LINUX_FULL_VER:4:5}
That would be the 'Substring Expansion', not a posix 'Parameter
Expansion'.
> This causes a "bad substitution" error when /bin/sh points at /bin/dash.
> Handling of all hotkeys fails. Changing #!/bin/sh to #!/bin/bash works
> around the issue. Can you please fix this? Either the bashism must be
> eliminated or else the script must use /bin/bash instead of /bin/sh.
Executing the two commands on my box, yields:
LINUX_FULL_VER='2.6.32-5-686'
LINUX_MINOR_REV='32-5-'
That will break scripts for kernel versions >= 2.10.
Would also break scripts running kernels which do not follow the debian
package naming schema, wouldn't it?
I guess you should get the MINOR and the REV as different parts. To get
the MINOR you could:
LINUX_MINOR=${LINUX_FULL_VER%%-*}
LINUX_MINOR=${LINUX_MINOR##*.}
or
IFS='.-'
set -- $LINUX_FULL_VER
echo "LINUX_MINOR='$3'"
Cheers,
--
Cristian
More information about the Debian-eeepc-devel
mailing list