17 lines
No EOL
520 B
Bash
17 lines
No EOL
520 B
Bash
#!/bin/bash
|
|
# iscsi share fix
|
|
# use this script to rebuild default configs for shares if the ._share becomes
|
|
# broken for whatever reason.
|
|
|
|
(
|
|
x=$(rn_nml -g volumes | grep "resource-id" | sed 's/^.*id="//;s/".*//;')
|
|
for volume in "$x"
|
|
do
|
|
for i in `find /"$volume" -maxdepth 2 -type d -name ".iscsi" | sed "s/\/.iscsi//g;s/\/$volume\///g;"`
|
|
do
|
|
mkdir -p /"$volume"/._share/${i} cd /"$volume"/._share/${i}
|
|
echo "comment " > iscsi.conf
|
|
echo "0 0 0 * 0 0 0" > snapshot.conf
|
|
done
|
|
done
|
|
) |