forked from ungleich-public/cdist
explorer/disks: Add support for OpenBSD
This commit is contained in:
parent
0fc64a951c
commit
dbcf7d5543
1 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,16 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
os=$("$__explorer/os")
|
||||
case "$os" in
|
||||
openbsd)
|
||||
IFS=',' disks=$(sysctl -n hw.disknames)
|
||||
for d in $disks; do
|
||||
echo "${d%%:*}"
|
||||
done | sed -n '/^[sw]d[0-9][0-9]*/p'
|
||||
;;
|
||||
|
||||
*)
|
||||
cd /dev || exit 0
|
||||
echo sd? hd? vd?
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue