mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-17 14:21:49 +02:00
Update 00-local_mounts.sh
This commit is contained in:
@@ -1,6 +1,16 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
#################
|
||||||
|
# INSTALL TOOLS #
|
||||||
|
#################
|
||||||
|
|
||||||
|
# Install lsblk
|
||||||
|
if ! command -v "lsblk" &>/dev/null; then
|
||||||
|
if command -v "apk" &>/dev/null; then apk add --no-cache lsblk >/dev/null; fi
|
||||||
|
if command -v "apt" &>/dev/null; then apt-get update && apt-get install -yqq util-linux; fi
|
||||||
|
fi
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# LIST LOCAL DISKS #
|
# LIST LOCAL DISKS #
|
||||||
####################
|
####################
|
||||||
@@ -54,12 +64,6 @@ if bashio::config.has_value 'localdisks'; then
|
|||||||
chown "$PUID:$PGID" /mnt/"$disk"
|
chown "$PUID:$PGID" /mnt/"$disk"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install lsblk
|
|
||||||
if ! command -v "lsblk" &>/dev/null; then
|
|
||||||
if command -v "apk" &>/dev/null; then apk add --no-cache lsblk >/dev/null; fi
|
|
||||||
if command -v "apt" &>/dev/null; then apt-get update && apt-get install -yqq util-linux; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check FS type and set relative options (thanks @https://github.com/dianlight/hassio-addons)
|
# Check FS type and set relative options (thanks @https://github.com/dianlight/hassio-addons)
|
||||||
fstype=$(lsblk "$devpath"/"$disk" -no fstype)
|
fstype=$(lsblk "$devpath"/"$disk" -no fstype)
|
||||||
options="nosuid,relatime,noexec"
|
options="nosuid,relatime,noexec"
|
||||||
|
|||||||
Reference in New Issue
Block a user