From b9f1a7fdf6528f3af7ed94af70cdd2567351ca2d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Oct 2007 00:33:04 +0200 Subject: Merging casper 1.109. --- scripts/live-premount/10driver_updates | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'scripts') 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; } -- cgit v1.2.3