summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-10-09 00:33:04 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:31:05 +0100
commitb9f1a7fdf6528f3af7ed94af70cdd2567351ca2d (patch)
treebaa2c3660c2e638ac7be584194fd8bd872c7aa4a /scripts
parente10059ad3f5f97ae43d46eb5ef6386e3f561f14f (diff)
downloadlive-boot-b9f1a7fdf6528f3af7ed94af70cdd2567351ca2d.tar.gz
live-boot-b9f1a7fdf6528f3af7ed94af70cdd2567351ca2d.zip
Merging casper 1.109.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live-premount/10driver_updates15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/live-premount/10driver_updates b/scripts/live-premount/10driver_updates
index 22d64d2..3ad9ef6 100755
--- a/scripts/live-premount/10driver_updates
+++ b/scripts/live-premount/10driver_updates
@@ -41,18 +41,19 @@ is_updates_path ()
# kernel flavour.
path=${1}
- kbase=$(uname -r | sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\)-.*/\1/')
- update_dir="${path}/ubuntu-drivers/${kbase}"
-
- if [ -d "${update_dir}" ]
- then
+ abi="$(uname -r)"
+ kver="$(echo "$abi" | cut -d- -f1,2)"
+ kbase="$(echo "$abi" | cut -d- -f1)"
+ for leaf in "$abi" "$kver" "$kbase"; do
+ update_dir="$path/ubuntu-drivers/$leaf"
+ [ -d "$update_dir" ] || continue
if [ "$(echo ${update_dir}/*_${DPKG_ARCH}.deb)" != \
"${update_dir}/*_${DPKG_ARCH}.deb" ]
then
echo "${update_dir}"
- return 0;
+ return 0
fi
- fi
+ done
return 1;
}