Skip to content

Commit

Permalink
if multiple mountpoints avail, pick the first one
Browse files Browse the repository at this point in the history
  • Loading branch information
ttyS4 committed Oct 4, 2023
1 parent 541958e commit deb3d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoconfig.functions
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ else
else
eindent
einfo "debs, config, scripts are read from $DCSDEVICE." ; eend 0
DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2 }}')"
DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2; exit }}')"
if [ -n "$DCSDIR" ]; then
ewarn "$DCSDEVICE already mounted on $DCSDIR"; eend 0
else
Expand Down

0 comments on commit deb3d70

Please sign in to comment.