|
Revision 828, 0.9 kB
(checked in by joe, 3 years ago)
|
Les scripts sont maintenant éxécutables (avec svn:executable).
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#!/bin/sh |
|---|
| 2 |
. /etc/alternc/local.sh |
|---|
| 3 |
|
|---|
| 4 |
DATA_PART=`df ${ALTERNC_LOC} 2>/dev/null | awk '/^\// { print $1 }'` |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
QUOTA_PART=`mount | sed -n -e "s,\([^ ]*\) on ${DATA_PART} type nfs.*,\1,p"` |
|---|
| 10 |
if [ -z "$QUOTA_PART" ]; then |
|---|
| 11 |
QUOTA_PART="$DATA_PART" |
|---|
| 12 |
fi |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
PART_LEN=`echo -n "$QUOTA_PART" | wc -c` |
|---|
| 17 |
if [ "$PART_LEN" -gt 15 ]; then |
|---|
| 18 |
quota -g "$1" | |
|---|
| 19 |
sed -n -e "\\;${QUOTA_PART}w,+1s/ *\([0-9]*\).*/\1/p" |
|---|
| 20 |
quota -g "$1" | |
|---|
| 21 |
sed -n -e "\\;${QUOTA_PART}w,+1s/ *[0-9]* *\([0-9]*\).*/\1/p" |
|---|
| 22 |
else |
|---|
| 23 |
quota -g "$1" | awk /${QUOTA_PART//\//\\\/}/\ {print\ '$2'} |
|---|
| 24 |
quota -g "$1" | awk /${QUOTA_PART//\//\\\/}/\ {print\ '$3'} |
|---|
| 25 |
fi |
|---|
| 26 |
|
|---|