filesystems: remove obsolete devfs code

This commit is contained in:
Silvan Calarco 2011-10-03 01:49:36 +02:00
parent 93699b2de1
commit 61d1ea7193

View File

@ -24,29 +24,6 @@ fstab="/etc/fstab"
# has been removed
devs2scan='/dev/disk/by-uuid/*'
# function devfs2dev()
# convert devfs names to stardard names
# args:
# $1: the devfs name that need to be converted
function devfs2dev() {
local devlong="$1"
# exit if devfs is not running
[ -e /dev/.devfsd ] || { echo -n "$devlong"; return; }
[[ "$devlong" ]] || { echo -n ""; return; }
# we want to skip symlinks like '/dev/ide/hd/c0b0t0u0p1'
LANG=C find /dev -maxdepth 1 -type l 2>/dev/null | \
while read dev; do
[[ "$(readlink -f $dev 2>/dev/null)" = "$devlong" ]] &&
{ echo -n "${dev:-$devlong}"; return 0; }
done
[ $? -eq 0 ] && return
echo -n "$devlong"
}
# function get_new_mp_name()
# Find for a usable mount point in the form $rootmp/$1[0-9]*
# or the current mount point if the device `$2' is already mounted
@ -102,22 +79,6 @@ tmpfstab=`mktemp -q -t $me.XXXXXXXX` ||
trap "rm -f $tmpfstab" 0 1 2 5 15
# convert device paths from devfs to udev
if [ -e /dev/.devfsd ]; then
while read line; do
case "$line" in
/dev/*)
set -- $line
fs="$(devfs2dev "$1")"
echo "$fs ${line#* }" >> $tmpfstab
;;
*) echo "$line" >> $tmpfstab ;;
esac
done < $fstab
mv $tmpfstab $fstab && chmod 644 $fstab
exit 0
fi
# note: remove some directories not FHS 2.3 compliant
#find /mnt/ -type d \( \
# -name floppy -o -name floppy[0-9]\* -o \