Reworked script to remount USB drives on SuSE 10.0
I realised that I could generalize yesterday’s ‘remount’ script to remount all subfs filesystems. Here is the new version:
#! /bin/sh
# Look for any filesystems mounted as subfs, unmount them,
# then remount them manually
mount -t subfs \
| awk '{print "echo Remounting " $1 " on " $3 "; umount " $1 " && mount " $1 " " $3}' \
| sh
I’m sure you could use Perl for this instead of Awk, but my skillz are little more old skool
I need hardly add that these shell scripts are totally unwarranted. Use them at your own risk. I or Sun cannot be held responsible if, after running either of these scripts, you lose data, money or friends.
Leave a Comment
Your email address will not be published. Required fields are marked *