summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-13 14:18:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-13 14:21:33 +0200
commitd9233e3096374be846a2cb324b92821828038435 (patch)
tree8e6d8d2c31121ecec4dd70ea4ad0ae95b40def8b
parent359be82da6f4cfa4d9d32615f13b5b60cb3fa0b1 (diff)
MAKEDEV: fix creating non-partstore nodes
We want to drop the slice part only in the partstore case. (but still want to change the device in case of USB disk)
-rw-r--r--sutils/MAKEDEV.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh
index e8a9a883..4961f858 100644
--- a/sutils/MAKEDEV.sh
+++ b/sutils/MAKEDEV.sh
@@ -225,7 +225,7 @@ mkdev() {
;;
esac
- dev=${I%s[0-9]*}
+ dev=$I
case "$I" in
wd*|cd*)
@@ -246,7 +246,8 @@ mkdev() {
# The device name passed all syntax checks, so finally use it!
if [ "$USE_PARTSTORE" ] && [ -z "$rest" ] && [ "$sliceno" ]; then
- st $I root 640 b /hurd/storeio -T typed part:$sliceno:device:$MASTER$dev
+ local drive=${dev%s[0-9]*}
+ st $I root 640 b /hurd/storeio -T typed part:$sliceno:device:$MASTER$drive
else
st $I root 640 b /hurd/storeio $MASTER$dev
fi