From f1bf83a13c260aeed9db3e4ea8cbb7aef554303c Mon Sep 17 00:00:00 2001 From: Barabazs <31799121+Barabazs@users.noreply.github.com> Date: Sat, 12 Mar 2022 14:47:55 +0100 Subject: [PATCH] Add support for release 5.5 * Update max supported kernel * Update regex for new version notation * Update patch for new reboot logic --- displaylink-debian.sh | 8 +++---- resources/displaylink-installer.patch | 34 +++++++++++++++------------ 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/displaylink-debian.sh b/displaylink-debian.sh index d3cded1..65f725b 100755 --- a/displaylink-debian.sh +++ b/displaylink-debian.sh @@ -18,7 +18,7 @@ IFS=$'\n\t' # Latest regular release only support kernel version <= 5.13 kernel_check="$(uname -r | egrep -o '[0-9]+\.[0-9]+')" -max_kernel_version_supported="5.13" +max_kernel_version_supported="5.16" function ver2int { echo "$@" | awk -F "." '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; @@ -461,9 +461,9 @@ separator echo -e "\nPreparing for install\n" test -d $driver_dir && /bin/rm -Rf $driver_dir unzip -d $driver_dir DisplayLink_Ubuntu_${version}.zip -chmod +x $driver_dir/displaylink-driver-${version}-[0-9]*.run -./$driver_dir/displaylink-driver-${version}-[0-9]*.run --keep --noexec -mv displaylink-driver-${version}-[0-9]*/ $driver_dir/displaylink-driver-${version} +chmod +x $driver_dir/displaylink-driver-${version}.*[0-9]*-[0-9]*.run +./$driver_dir/displaylink-driver-${version}.*[0-9]*-[0-9]*.run --keep --noexec +mv displaylink-driver-${version}.*[0-9]*-[0-9]*/ $driver_dir/displaylink-driver-${version} # get sysinitdaemon sysinitdaemon=$(sysinitdaemon_get) diff --git a/resources/displaylink-installer.patch b/resources/displaylink-installer.patch index 7da9fdd..216c368 100644 --- a/resources/displaylink-installer.patch +++ b/resources/displaylink-installer.patch @@ -1,19 +1,23 @@ --- /opt/displaylink/displaylink-installer.sh +++ /opt/displaylink/displaylink-installer.sh -@@ -457,11 +457,11 @@ - echo "http://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu" +@@ -502,13 +502,13 @@ + printf '\n%s\n%s\n' "Please read the FAQ" \ + "http://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu" - echo -e "\nInstallation complete!" -- echo -e "\nPlease reboot your computer if intending to use Xorg." -- $XORG_RUNNING || exit 0 -- read -rp 'Xorg is running. Do you want to reboot now? (Y/n)' CHOICE -- [[ ${CHOICE:-Y} =~ ^[Nn]$ ]] && exit 0 -- reboot -+ #echo -e "\nPlease reboot your computer if intending to use Xorg." -+ #$XORG_RUNNING || exit 0 -+ #read -rp 'Xorg is running. Do you want to reboot now? (Y/n)' CHOICE -+ #[[ ${CHOICE:-Y} =~ ^[Nn]$ ]] && exit 0 -+ #reboot +- printf '\n%s\n\n%s\n' "Installation complete!" \ +- "Please reboot your computer if you're intending to use Xorg." +- +- "$NOREBOOT" && exit 0 +- +- xorg_running || exit 0 +- prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot ++# printf '\n%s\n\n%s\n' "Installation complete!" \ ++# "Please reboot your computer if you're intending to use Xorg." ++# ++# "$NOREBOOT" && exit 0 ++# ++# xorg_running || exit 0 ++# prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot + exit 0 } - - uninstall() + \ No newline at end of file