-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Automated] Merged develop into target master
- Loading branch information
Showing
17 changed files
with
275 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 | ||
#### https://github.com/mainsail-crew/crowsnest | ||
#### https://github.com/mainsail-crew/MainsailOS | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/usr/bin/env bash | ||
|
||
#### Patch Script | ||
#### This will patch MainsailOS udev rule | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 | ||
#### https://github.com/mainsail-crew/MainsailOS | ||
#### | ||
#### This File is distributed under GPLv3 | ||
#### | ||
|
||
#### This should fix error in udev not creating symlinks fpr serial devices. | ||
#### For details see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035094 | ||
#### This is fixed by: https://github.com/systemd/systemd/pull/25246 | ||
#### To fix this error in MainsailOS we implement that file as 'user rule'. | ||
|
||
# shellcheck disable=SC2034 | ||
|
||
# Error Handling | ||
set -eo pipefail | ||
|
||
# Debug | ||
# set -x | ||
|
||
### Variables | ||
DEBIAN_FRONTEND="noninteractive" | ||
TITLE="\e[31mMainsailOS Patcher\e[0m - udev rule fix" | ||
UDEV_PKG_VERSION="$(dpkg-query -s udev | grep "Version" | sed 's/Version\: //')" | ||
UDEV_FIX_RAW_RULE_FILE="https://raw.githubusercontent.com/systemd/systemd/main/rules.d/60-serial.rules" | ||
UDEV_FIX_TMP_FILE="/tmp/60-serial.rules" | ||
UDEV_FIX_OUTPUT_FILE="/etc/udev/rules.d/60-serial.rules" | ||
|
||
# Message Vars | ||
MP_OK="\e[32mOK\e[0m" | ||
MP_SK="\e[33mSKIPPED\e[0m" | ||
|
||
## Helper funcs | ||
|
||
## Message Funcs | ||
|
||
echo_green(){ | ||
echo -e "\e[32m${1}\e[0m" | ||
} | ||
|
||
echo_red(){ | ||
echo -e "\e[31m${1}\e[0m" | ||
} | ||
|
||
echo_blue(){ | ||
echo -e "\e[34m${1}\e[0m" | ||
} | ||
|
||
echo_yellow(){ | ||
echo -e "\e[33m${1}\e[0m" | ||
} | ||
|
||
print_header(){ | ||
echo -e "${TITLE}\n" | ||
echo_blue "Ahoi!" | ||
echo -e "Please be patient, this might take a while ..." | ||
echo_yellow "HINT: This should also work for any other Debian/Armbian based Distribution\n" | ||
echo_red "\tYou'll be prompted for sudo password!\n" | ||
# Dirty hack to grant root priviledges | ||
sudo echo -e "\n" | ||
echo -e "Trying to patch your system ..." | ||
} | ||
|
||
print_footer(){ | ||
echo -e "\nThank you for being patient ..." | ||
echo_red "Reboot as soon as possible!\n" | ||
} | ||
|
||
# Patch Funcs | ||
|
||
patch_udev(){ | ||
if [[ -n "${UDEV_PKG_VERSION}" ]] && [[ "${UDEV_PKG_VERSION}" =~ "deb11u2" ]]; then | ||
echo_red "'udev' version: ${UDEV_PKG_VERSION}, is affected by bug ..." | ||
echo_green "Install patched udev rule from systemd git repository ..." | ||
curl -sSL "${UDEV_FIX_RAW_RULE_FILE}" > "${UDEV_FIX_TMP_FILE}" | ||
sudo cp "${UDEV_FIX_TMP_FILE}" "${UDEV_FIX_OUTPUT_FILE}" | ||
rm -f "${UDEV_FIX_TMP_FILE}" | ||
else | ||
echo_green "'udev' version: ${UDEV_PKG_VERSION}, is NOT affected by bug ... [SKIPPED]" | ||
fi | ||
} | ||
|
||
### Main | ||
# Step 1: Print Header | ||
print_header | ||
|
||
# Step 2: Run apt-get update | ||
sudo apt-get update | ||
|
||
# Step 3: Run apt-get upgrade | ||
sudo apt-get upgrade --yes | ||
|
||
# Step 4: Apply patches | ||
patch_udev | ||
|
||
# Step 5: Print footer | ||
print_footer | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
#### crowsnest - A webcam Service for multiple Cams and Stream Services. | ||
#### | ||
#### Written by Stephan Wendel aka KwadFan <[email protected]> | ||
#### Copyright 2021 - 2022 | ||
#### Copyright 2021 - till today | ||
#### https://github.com/mainsail-crew/crowsnest | ||
#### | ||
#### This File is distributed under GPLv3 | ||
|
@@ -18,7 +18,6 @@ | |
[[ -n "$CROWSNEST_CONFIG_PATH" ]] || CROWSNEST_CONFIG_PATH="/home/${BASE_USER}/printer_data/config" | ||
[[ -n "$CROWSNEST_LOG_PATH" ]] || CROWSNEST_LOG_PATH="/home/${BASE_USER}/printer_data/logs" | ||
[[ -n "$CROWSNEST_ENV_PATH" ]] || CROWSNEST_ENV_PATH="/home/${BASE_USER}/printer_data/systemd" | ||
[[ -n "$CROWSNEST_RASPICAMFIX" ]] || CROWSNEST_RASPICAMFIX="1" | ||
[[ -n "$CROWSNEST_ADD_CROWSNEST_MOONRAKER" ]] || CROWSNEST_ADD_CROWSNEST_MOONRAKER="1" | ||
[[ -n "$CROWSNEST_MOONRAKER_CONF_PATH" ]] || CROWSNEST_MOONRAKER_CONF_PATH="/home/${BASE_USER}/printer_data/config/moonraker.conf" | ||
|
||
|
@@ -27,6 +26,10 @@ | |
[[ -n "$CROWSNEST_USTREAMER_REPO_SHIP" ]] || CROWSNEST_USTREAMER_REPO_SHIP="https://github.com/pikvm/ustreamer.git" | ||
[[ -n "$CROWSNEST_USTREAMER_REPO_BRANCH" ]] || CROWSNEST_USTREAMER_REPO_BRANCH="master" | ||
|
||
# camera-streamer | ||
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_SHIP" ]] || CROWSNEST_CAMERA_STREAMER_REPO_SHIP="https://github.com/ayufan/camera-streamer.git" | ||
[[ -n "$CROWSNEST_CAMERA_STREAMER_REPO_BRANCH" ]] || CROWSNEST_CAMERA_STREAMER_REPO_BRANCH="master" | ||
|
||
########################################################################### | ||
### DO NOT EDIT BELOW THIS LINE, UNLESS YOU KNOW EXACTLY WHAT HAPPENDS! ### | ||
########################################################################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.