Skip to content

Commit

Permalink
Do not translate UUID / label symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Oct 12, 2021
1 parent fcbd393 commit da69349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/bootloader/device_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class DevicePath
def initialize(dev)
@path = if dev_by_uuid?(dev)
# if defined by uuid, convert it
File.realpath(dev.sub(/UUID="([-a-zA-Z0-9]*)"/, '/dev/disk/by-uuid/\1'))
dev.sub(/UUID="([-a-zA-Z0-9]*)"/, '/dev/disk/by-uuid/\1')
elsif dev_by_label?(dev)
# as well for label
File.realpath(dev.sub(/LABEL="(.*)"/, '/dev/disk/by-label/\1'))
dev.sub(/LABEL="(.*)"/, '/dev/disk/by-label/\1')
else
# add it exactly (but whitespaces) as specified by the user
dev.strip
Expand Down

0 comments on commit da69349

Please sign in to comment.