Commit 991312cb authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue

[iscsi] Update.sh remplit /etc/quotatab sur zbee

parent 0062fda2
......@@ -9,6 +9,8 @@
# Ce script fait tout ce qu'il faut après l'ajout d'un volume sur la
# baie de stockage.
HNAME=$(hostname)
exec_cmd() {
local msg=$1
shift
......@@ -39,3 +41,36 @@ exec_cmd "Rescan des volumes iscsi" \
exec_cmd "Mises à jours des liens symboliques dans /dev" \
/usr/scripts/gestion/iscsi/udev_update_symlinks.py --clean
if [ $HNAME = "zbee" ]; then
(cat << EOF
# This is an example quotatab file
#
# This file is used as a translation for device names, so a warnquota message
# makes sense to the user.
#
# syntax is as follows:
#
# colon ':' is used to specify the start of the substituted text
# pipe '|' is used to specify a line break
#
# device:substituted text
# device:text on line 1|test on line2
#
# For instance if you would like to have warnquota tell the user their
# 'mailspool' is full instead of '/dev/hdb1' is full, use the following
# example.
#
# /dev/hdb1:mailspool
# Attention, sur zbee, les lignes suivantes sont générées par un update.sh
EOF
) > /etc/quotatab
for i in {a..z}; do
echo "/dev/$(readlink /dev/iscsi_home_${i}_part1):Partition /home/${i}" >> /etc/quotatab
done
fi
echo "" >> /etc/quotatab
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment