X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-premount%2F10driver_updates;h=3ad9ef6f545bc7b0402d52982a2e8395804eec5c;hb=b9f1a7fdf6528f3af7ed94af70cdd2567351ca2d;hp=22d64d26998c8622a81d55ce34a639abb662e5f2;hpb=e10059ad3f5f97ae43d46eb5ef6386e3f561f14f;p=live-boot-grml.git 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; }