X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-premount%2F10driver_updates;h=eda8bbf3372b8c33e0ac15e4835a9f5157c9b706;hb=28140b27fe2dc64ad521706352397cb0f2e4d654;hp=22d64d26998c8622a81d55ce34a639abb662e5f2;hpb=1e0a488b895cd6e2bf7141aa730f17da42a490f7;p=live-boot-grml.git diff --git a/scripts/live-premount/10driver_updates b/scripts/live-premount/10driver_updates index 22d64d2..eda8bbf 100755 --- a/scripts/live-premount/10driver_updates +++ b/scripts/live-premount/10driver_updates @@ -41,20 +41,25 @@ 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}" + 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 [ -d "${update_dir}" ] - then 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; + return 1 } is_nice_device ()