|
这是一个mount分区的脚本,我想让它加上-o iocharset=gb2312的参数,请问怎么改??我还没有学习编写脚本
#!/bin/bash
# Started as a daemon only if "daemon" parameter is present as $1
# Will analyze /dev/discs each second and if new disc is found then it's
# mounted to /mnt/...
#
# example of usage: mntall # will mount all discs and exit
# example of usage: mntall daemon # will try to mount all discs each second
#
# Author: Tomas Matejicek <http://slax.linux-live.org>
#
# Note: I believe that there is a better way how to mount new discs
# automatically, but to be honest I'm very lazy to learn it.
# It works great this way with devfs.
#
DDIR=/dev/discs
if [ ! -d $DDIR ]; then exit; fi
ls -aAb1 $DDIR | while read DISC ; # list all files in directory
do
ls -aAb1 "$DDIR/$DISC" | grep part | while read PART;
do
MYMOUNT="/mnt/$DISC$PART"
if [ ! -d "$MYMOUNT" ]; then
mkdir -p "$MYMOUNT"
mount -t auto "$DDIR/$DISC/$PART" "$MYMOUNT" >/dev/null 2>/dev/null
if [ "$?" != 0 ]; then rmdir "$MYMOUNT"; fi
fi
done
: |
|