genfstab: avoid re-printing kernel name
Without a specified tag, the devnode should not be printed.
This commit is contained in:
parent
e62b6bb560
commit
73016da72f
10
genfstab.in
10
genfstab.in
@ -10,10 +10,16 @@ write_source() {
|
||||
label=$(blkid -s LABEL -o value "$1" 2>/dev/null)
|
||||
uuid=$(blkid -s UUID -o value "$1" 2>/dev/null)
|
||||
|
||||
# bind mounds do not have a UUID!
|
||||
|
||||
case $bytag in
|
||||
'')
|
||||
[[ $uuid ]] && comment=("UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$label")
|
||||
;;
|
||||
LABEL)
|
||||
spec=$label
|
||||
comment=("$src" "UUID=$uuid")
|
||||
[[ $uuid ]] && comment=("$src" "UUID=$uuid")
|
||||
;;
|
||||
UUID)
|
||||
spec=$uuid
|
||||
@ -21,7 +27,7 @@ write_source() {
|
||||
[[ $label ]] && comment+=("LABEL=$label")
|
||||
;;
|
||||
*)
|
||||
comment=("$1" "UUID=$uuid")
|
||||
[[ $uuid ]] && comment=("$1" "UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$label")
|
||||
[[ $bytag ]] && spec=$(blkid -s "$bytag" -o value "$1")
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user