From 61d1ea7193c2b430bce91a50e3543332806b55df Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 3 Oct 2011 01:49:36 +0200 Subject: [PATCH] filesystems: remove obsolete devfs code --- postplug.d/10filesystems | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/postplug.d/10filesystems b/postplug.d/10filesystems index f0edc87..626a3b3 100644 --- a/postplug.d/10filesystems +++ b/postplug.d/10filesystems @@ -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 \