Skip to content

Commit

Permalink
feat: update displaylink-debian for latest v6 release (#929)
Browse files Browse the repository at this point in the history
* feat: update displaylink-installer.patch with lastest changes

* refactor: simplify regex

* feat: drop oboslete kernel check
  • Loading branch information
Barabazs authored May 3, 2024
1 parent ed8f9c4 commit 7ac076c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
14 changes: 3 additions & 11 deletions displaylink-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,12 @@ 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}[.\d]*-[0-9]*.[0-9]*.run
./$driver_dir/displaylink-driver-${version}[.\d]*-[0-9]*.[0-9]*.run --keep --noexec
mv displaylink-driver-${version}[.\d]*-*[0-9]*.[0-9]*/ $driver_dir/displaylink-driver-${version}
chmod +x $driver_dir/displaylink-driver-${version}*.run
./$driver_dir/displaylink-driver-${version}*.run --keep --noexec
mv displaylink-driver-${version}*/ $driver_dir/displaylink-driver-${version}
# get sysinitdaemon
sysinitdaemon=$(sysinitdaemon_get)

if [ 1 -eq "$(echo "$kernel_check > 6.1" | bc)" ]
then
echo "deleting old evdi archive"
rm $driver_dir/displaylink-driver-${version}/evdi.tar.gz
echo "downloading evdi compatible with kernel > 6.1"
curl -L https://github.com/DisplayLink/evdi/archive/refs/tags/v1.14.2.tar.gz -o $driver_dir/displaylink-driver-${version}/evdi.tar.gz
sed -i 's#if ! tar xf "$TARGZ" -C "$EVDI"; then#if ! tar xf "$TARGZ" -C "$EVDI" --strip-components=1; then#g' $driver_dir/displaylink-driver-${version}/displaylink-installer.sh
fi

# modify displaylink-installer.sh
sed -i "s/SYSTEMINITDAEMON=unknown/SYSTEMINITDAEMON=$sysinitdaemon/g" $driver_dir/displaylink-driver-${version}/displaylink-installer.sh
Expand Down
28 changes: 9 additions & 19 deletions resources/displaylink-installer.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
--- displaylink-installer.sh
+++ displaylink-installer.sh
@@ -237,15 +237,15 @@
printf '\n%s\n%s\n' "Please read the FAQ" \
"http://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu"
@@ -212,9 +212,9 @@
evdi_success_message
printf '%s\n\n' "DisplayLink driver installed successfully."

- printf "\n\n%s\n%s\n%s\n\n\n" "Reboot required" "DisplayLink driver installed successfully." \
- "Please reboot your computer to ensure the proper functioning of the software." \
- && prompt_yes_no "Do you want to reboot now?" \
- && reboot
+ # printf "\n\n%s\n%s\n%s\n\n\n" "Reboot required" "DisplayLink driver installed successfully." \
+ # "Please reboot your computer to ensure the proper functioning of the software." \
+ # && prompt_yes_no "Do you want to reboot now?" \
+ # && reboot
- if evdi_requires_reboot && prompt_yes_no "Do you want to reboot now?"; then
- reboot
- fi
+# if evdi_requires_reboot && prompt_yes_no "Do you want to reboot now?"; then
+# reboot
+# fi

- "$NOREBOOT" && exit 0
+ # "$NOREBOOT" && exit 0

- xorg_running || exit 0
- prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot
+ # xorg_running || exit 0
+ # prompt_yes_no "Xorg is running. Do you want to reboot now?" && reboot
exit 0
}

0 comments on commit 7ac076c

Please sign in to comment.