You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PARENT_DEVICE=$(echo "$DEVICE"| sed -r 's/^(([hs]d[a-z])([1-9][0-9]*)?|(nvme[0-9]+n1)(p[1-9][0-9]*)?|(disk[0-9]+)(s[1-9][0-9]*)?|(loop[0-9]+))$/\2\4\6/')
327
+
PARENT_DEVICE=$(echo "$DEVICE"| sed -r 's/^(([hs]d[a-z])([1-9][0-9]*)?|(nvme[0-9]+n1)(p[1-9][0-9]*)?|(disk[0-9]+)(s[1-9][0-9]*)?|(loop[0-9]+))$/\2\4\6\8/')
328
328
else
329
329
# this machine must have BSD sed ('-E' for extended regex)
330
-
PARENT_DEVICE=$(echo "$DEVICE"| sed -E 's/^(([hs]d[a-z])([1-9][0-9]*)?|(nvme[0-9]+n1)(p[1-9][0-9]*)?|(disk[0-9]+)(s[1-9][0-9]*)?|(loop[0-9]+))$/\2\4\6/')
330
+
PARENT_DEVICE=$(echo "$DEVICE"| sed -E 's/^(([hs]d[a-z])([1-9][0-9]*)?|(nvme[0-9]+n1)(p[1-9][0-9]*)?|(disk[0-9]+)(s[1-9][0-9]*)?|(loop[0-9]+))$/\2\4\6\8/')
331
331
fi
332
332
333
333
# validate parent device identifier (must be entire device)
0 commit comments