Add test of mkdir in addition to test of touch

https://github.com/alexbelgium/hassio-addons/issues/1125#issuecomment-1851427927
This commit is contained in:
Alexandre
2023-12-12 10:43:02 +01:00
committed by GitHub
parent 47f160482d
commit ff5ec9ad97

View File

@@ -182,7 +182,7 @@ if bashio::config.has_value 'networkdisks'; then
#Test write permissions
# shellcheck disable=SC2015
touch "/mnt/$diskname/testaze" && rm "/mnt/$diskname/testaze" &&
mkdir "/mnt/$diskname/testaze" && touch "/mnt/$diskname/testaze/testaze" && rm -r "/mnt/$diskname/testaze" &&
bashio::log.info "...... $disk successfully mounted to /mnt/$diskname with options $MOUNTOPTIONS" ||
( touch ERRORCODE && 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" )