mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 15:45:56 +02:00
Compare commits
16 Commits
0f1e69b63a
...
b986f9ddbe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b986f9ddbe | ||
|
|
7c07ad6bac | ||
|
|
4d907d27ce | ||
|
|
c4d0d38806 | ||
|
|
64b7775bac | ||
|
|
984e2aad0a | ||
|
|
73f28a59b6 | ||
|
|
b58e3e2d2f | ||
|
|
6e632dd904 | ||
|
|
8937b514c5 | ||
|
|
bc578080df | ||
|
|
d3548501e5 | ||
|
|
3fd716bce3 | ||
|
|
3ff6ac3ae3 | ||
|
|
1276565aa3 | ||
|
|
4bf2ad8111 |
@@ -23,52 +23,51 @@ cleanup_cred() {
|
||||
}
|
||||
|
||||
test_mount() {
|
||||
local _werr
|
||||
MOUNTED=false
|
||||
ERROR_MOUNT=false
|
||||
mountpoint="/mnt/$diskname"
|
||||
|
||||
if ! mountpoint -q "/mnt/$diskname"; then
|
||||
# Not mounted → not an error for this function
|
||||
if ! mountpoint -q "$mountpoint"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
[[ -e "/mnt/$diskname/testaze" ]] && rm -rf "/mnt/$diskname/testaze"
|
||||
_werr="$(mktemp /tmp/mount_write_test.XXXXXX)"
|
||||
: >"$_werr" || true
|
||||
mkdir "/mnt/$diskname/testaze" 2>"$_werr" \
|
||||
&& touch "/mnt/$diskname/testaze/testaze" 2>>"$_werr" \
|
||||
&& rm -rf "/mnt/$diskname/testaze" 2>>"$_werr" \
|
||||
|| ERROR_MOUNT=true
|
||||
# ---- Write test function ----
|
||||
_test_write() {
|
||||
local testfile="$mountpoint/.writetest_$$"
|
||||
if : > "$testfile" 2>/dev/null; then
|
||||
rm -f "$testfile"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Accept read-only mounts: warn but do not fail
|
||||
if [[ "$ERROR_MOUNT" == "true" ]] && grep -qiE 'read-only file system|EROFS' "$_werr" 2>/dev/null; then
|
||||
bashio::log.warning "Disk is mounted but READ-ONLY (/mnt/$diskname). Write test failed due to read-only filesystem. Continuing."
|
||||
rm -f "$_werr" 2>/dev/null || true
|
||||
# First write test
|
||||
if _test_write; then
|
||||
MOUNTED=true
|
||||
return 0
|
||||
fi
|
||||
rm -f "$_werr" 2>/dev/null || true
|
||||
|
||||
# CIFS-only: noserverino fallback
|
||||
if [[ "$ERROR_MOUNT" == "true" && "$FSTYPE" == "cifs" ]]; then
|
||||
if [[ "$MOUNTOPTIONS" == *"noserverino"* ]]; then
|
||||
bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check UID/GID for permissions, and if the share is rw"
|
||||
return 0
|
||||
fi
|
||||
# ---- CIFS fallback check ----
|
||||
if [[ "$FSTYPE" == "cifs" && "$MOUNTOPTIONS" != *"noserverino"* ]]; then
|
||||
echo "... retrying mount with noserverino"
|
||||
MOUNTOPTIONS="${MOUNTOPTIONS},noserverino"
|
||||
echo "... testing with noserverino"
|
||||
mount_drive "$MOUNTOPTIONS"
|
||||
return 0
|
||||
|
||||
umount "$mountpoint" 2>/dev/null
|
||||
if mount_drive "$MOUNTOPTIONS"; then
|
||||
# retest with new options
|
||||
if _test_write; then
|
||||
MOUNTED=true
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# IMPORTANT: do not claim success when mounted but not writable (all FS types)
|
||||
if [[ "$ERROR_MOUNT" == "true" ]]; then
|
||||
MOUNTED=false
|
||||
bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check permissions/export options (rw), and UID/GID mapping."
|
||||
return 0
|
||||
fi
|
||||
|
||||
MOUNTED=true
|
||||
return 0
|
||||
# ---- Final: mounted but not writable ----
|
||||
ERROR_MOUNT=true
|
||||
bashio::log.fatal "Disk mounted, but cannot write. Check permissions/export options and UID/GID mapping."
|
||||
return 1
|
||||
}
|
||||
|
||||
mount_drive() {
|
||||
@@ -185,11 +184,6 @@ retry_cifs_with_vers_ladder_on_einval() {
|
||||
########################
|
||||
|
||||
if bashio::config.has_value 'networkdisks'; then
|
||||
if [[ "$(date +"%Y%m%d")" -lt "20240201" ]]; then
|
||||
bashio::log.warning "------------------------"
|
||||
bashio::log.warning "This is a new code, please report any issues on https://github.com/alexbelgium/hassio-addons"
|
||||
bashio::log.warning "------------------------"
|
||||
fi
|
||||
|
||||
echo "Mounting network share(s)..."
|
||||
|
||||
@@ -202,9 +196,7 @@ if bashio::config.has_value 'networkdisks'; then
|
||||
CHARSET=",iocharset=utf8"
|
||||
|
||||
# Clean data (keeps NFS entries intact)
|
||||
MOREDISKS=${MOREDISKS// \/\//,\/\/}
|
||||
MOREDISKS=${MOREDISKS//, /,}
|
||||
MOREDISKS=${MOREDISKS// /"\040"}
|
||||
MOREDISKS="$(echo "$MOREDISKS" | sed -E 's/[[:space:]]*,[[:space:]]*/,/g; s/^[[:space:]]+//; s/[[:space:]]+$//')"
|
||||
|
||||
# CIFS domain/workgroup
|
||||
DOMAINCLIENT=""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 10.11.6-4 (02-02-2026)
|
||||
- Minor bugs fixed
|
||||
## 10.11.6-3 (02-02-2026)
|
||||
- Minor bugs fixed
|
||||
## 10.11.6-2 (01-02-2026)
|
||||
- Minor bugs fixed
|
||||
|
||||
|
||||
@@ -124,5 +124,5 @@ schema:
|
||||
slug: jellyfin
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
version: "10.11.6-2"
|
||||
version: "10.11.6-4"
|
||||
video: true
|
||||
|
||||
@@ -71,11 +71,9 @@ RUN chmod 777 /ha_entrypoint.sh
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/bashio-standalone.sh" "/usr/local/lib/bashio-standalone.sh"
|
||||
RUN chmod 0755 /usr/local/lib/bashio-standalone.sh
|
||||
|
||||
COPY rootfs/ /
|
||||
#COPY rootfs/ /
|
||||
RUN find . -type f \( -name "*.sh" -o -name "run" \) -print -exec chmod +x {} \;
|
||||
|
||||
|
||||
|
||||
#ENTRYPOINT [ "/ha_entrypoint.sh" ]
|
||||
|
||||
############
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"build_from": {
|
||||
"amd64": "ghcr.io/baldarn/whatsapper:latest",
|
||||
"arm64": "ghcr.io/baldarn/whatsapper:latest"
|
||||
"aarch64": "ghcr.io/baldarn/whatsapper:latest"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
arch:
|
||||
- amd64
|
||||
- aarch64
|
||||
description: Whatsapper for Home Assistant
|
||||
image: ghcr.io/alexbelgium/whatsapper-{arch}
|
||||
map:
|
||||
@@ -19,4 +20,4 @@ schema:
|
||||
slug: whatsapper
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/whatsapper
|
||||
version: 1.1.1
|
||||
version: 1.1.2
|
||||
|
||||
Reference in New Issue
Block a user