2 # Make /etc/fstab standard compliant.
3 # M.Weller (eowmob@exp-math.uni-essen.de) 13.11.1994.
4 # This script is public domain. Still if only slightly
5 # modified a credit to me might be nice.
7 ROOT_PASS=1 # Pass for root file system
8 NON_ROOT_PASS=2 # Pass for non root file systems
9 DEF_FLAGS="defaults" # Default filesysflags
10 DEF_DUMP=0 # Default dumpfreq.
20 # Actually there are no comments allowed in /etc/fstab
21 echo "Warning: comment in /etc/fstab detected." >&2
22 echo "Please remove it by hand." >&2
25 if [ $# -gt 6 ] || [ $# -lt 3 ]
27 echo "Don't have a clue about \"$LINE\"." >&2
43 ignore | iso9660 | msdos | hpfs | sysv | \
44 xenix | coherent | nfs | proc | sw | swap )
51 echo "$LINE $DEF_FLAGS $DUMP $PASS"
54 echo "$LINE $DUMP $PASS"
67 echo "Warning: One empty line removed." >&2
69 done </etc/fstab >/tmp/newfstab.$$
70 mv -f /etc/fstab /etc/fstab.bak
71 mv -f /tmp/newfstab.$$ /etc/fstab
74 echo "Installation of patched /etc/fstab failed."
75 echo "It would have been:"
77 rm -f /tmp/newfstab.$$