10filesystem: support for /dev/vd* devices as swap

This commit is contained in:
Silvan Calarco 2014-12-21 13:26:45 +01:00
parent 81d0b9b78d
commit 97242a1b52

View File

@ -165,7 +165,7 @@ let "swapon = 0"
[[ "$FS_PARTS_MOUNT" = "yes" ]] && AUTO_ADD="" || AUTO_ADD="noauto," [[ "$FS_PARTS_MOUNT" = "yes" ]] && AUTO_ADD="" || AUTO_ADD="noauto,"
[[ "$FS_PARTS_UPDATE" != "yes" && "$FS_SWAP_UPDATE" != "yes" ]] || [[ "$FS_PARTS_UPDATE" != "yes" && "$FS_SWAP_UPDATE" != "yes" ]] ||
blkid | grep /dev/sd | while read line; do blkid | while read line; do
unset dev uuid devline devfstype TYPE UUID LABEL unset dev uuid devline devfstype TYPE UUID LABEL
dev=${line/:*} dev=${line/:*}
devline=${line/*:} devline=${line/*:}
@ -197,7 +197,9 @@ blkid | grep /dev/sd | while read line; do
[ "$FS_FLOPPY_UPDATE" = "yes" ] || continue [ "$FS_FLOPPY_UPDATE" = "yes" ] || continue
mount_point=$(get_new_mp_name floppy) mount_point=$(get_new_mp_name floppy)
;; ;;
/dev/cdrom[0-9]*) # CDROM devices /dev/sr[0-9]*|\
/dev/cdrom[0-9]*)
# CDROM devices
[ "$FS_CDROM_UPDATE" = "yes" ] || continue [ "$FS_CDROM_UPDATE" = "yes" ] || continue
# check if the CD is already mounted # check if the CD is already mounted
devfs="$(readlink -f $dev)" devfs="$(readlink -f $dev)"
@ -213,7 +215,9 @@ blkid | grep /dev/sd | while read line; do
mount_point=$(get_new_mp_name cdrom) mount_point=$(get_new_mp_name cdrom)
;; ;;
/dev/sd[a-z][0-9]*|\ /dev/sd[a-z][0-9]*|\
/dev/vd[a-z][0-9]*|\
/dev/hd[a-z][0-9]*|\ /dev/hd[a-z][0-9]*|\
/dev/mmcblk[0-9]*p[0-9]*|\
/dev/ub[a-z][0-9]*|\ /dev/ub[a-z][0-9]*|\
/dev/ub/[a-z]*/part[0-9]*) /dev/ub/[a-z]*/part[0-9]*)
## if an USB device is detected add the 'sync' option ## if an USB device is detected add the 'sync' option