Changeset 717
- Timestamp:
- 02/22/06 03:08:07 (7 years ago)
- Location:
- src
- Files:
-
- 2 edited
-
quota_edit.sh (modified) (1 diff)
-
quota_get.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/quota_edit.sh
r6 r717 1 1 #!/bin/sh 2 2 . /etc/alternc/local.sh 3 /usr/sbin/setquota - g $1 $2 $2 0 0 $DATA_PART3 /usr/sbin/setquota -r -g $1 $2 $2 0 0 $DATA_PART -
src/quota_get.sh
r182 r717 2 2 . /etc/alternc/local.sh 3 3 4 quota -g $1 | awk /${DATA_PART//\//\\\/}/\ {print\ '$2'} 5 quota -g $1 | awk /${DATA_PART//\//\\\/}/\ {print\ '$3'} 4 # quota will give over NFS will print the partition using the full NFS name 5 # (e.g. 10.0.0.1:/var/alternc) so we need to lookup first with mount 6 # to convert DATA_PART if needed. 7 QUOTA_PART=`mount | sed -n -e "s,\([^ ]*\) on ${DATA_PART} type nfs.*,\1,p"` 8 if [ -z "$QUOTA_PART" ]; then 9 QUOTA_PART="$DATA_PART" 10 fi 11 12 # quota will split its display on two lines if QUOTA_PART is bigger than 15 13 # characters. *sigh* 14 PART_LEN=`echo -n "$QUOTA_PART" | wc -c` 15 if [ "$PART_LEN" -gt 15 ]; then 16 quota -g "$1" | 17 sed -n -e "\\;${QUOTA_PART}w,+1s/ *\([0-9]*\).*/\1/p" 18 quota -g "$1" | 19 sed -n -e "\\;${QUOTA_PART}w,+1s/ *[0-9]* *\([0-9]*\).*/\1/p" 20 else 21 quota -g "$1" | awk /${QUOTA_PART//\//\\\/}/\ {print\ '$2'} 22 quota -g "$1" | awk /${QUOTA_PART//\//\\\/}/\ {print\ '$3'} 23 fi 24
Note: See TracChangeset
for help on using the changeset viewer.
