Merge branch '610' into 'master'

Fix home folder and add btrfs subv checker

See merge request readynas-scripts/share_lun_ui_fix.sh!8
This commit is contained in:
Cody Cook 2019-04-01 11:30:57 -07:00
commit e0b7b00f0a

View file

@ -172,12 +172,18 @@ else
if [[ $? == 2 ]]; then
echo "No shares or LUNs found."
else
objects=$(echo "$objects" |egrep -v "^.apps\/$|^home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//;s/\.\///')
objects=$(echo "$objects" |egrep -v "^.apps\/$|^\.\/home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//;s/\.\///')
echo "= Objects found: $(echo $objects | wc -w)"
echo $objects
backup_configs
for item in $objects; do
echo "== Reviewing $item"
btrfs subv show /"$volume"/"$item" &>/dev/null
if [[ $? -eq "1" ]]; then
echo "WARNING! /$volume/$item is NOT a valid btrfs subvolume, so it may not appear in the UI."
echo "We will create the configs, but will work on a migration feature later to proper btrfs subvolume."
fi
if ls -QdA /"$volume"/"$item"/.iscsi >/dev/null 2>&1; then
iscsi_create
else