diff --git a/utils/usr/bin/oci-make-osd b/utils/usr/bin/oci-make-osd index 765b2c0c7ec868005d472fe18c6aebd345f1a935..2155a74b9264bef5f1575ea20c4d20b057f1352c 100755 --- a/utils/usr/bin/oci-make-osd +++ b/utils/usr/bin/oci-make-osd @@ -26,7 +26,7 @@ chown ceph /etc/ceph/ceph.client.admin.keyring # - drive letter # - OSD id # - OSD port number -MAJOR_NUM=$(hostname -s | cut -d- -f3) +MAJOR_NUM=$(hostname -s | sed 's/^.*\-\([0-9]*\)$/\1/p;d' ) if echo ${HDD_DEV} | grep -q nvme ; then NVME_DRIVE_NUM=$(echo ${HDD_DEV} | sed sed -e s/nvme// -e s/n1//) # We add 1 to avoid issue when nvme0n1