cdist-backup/cdist/conf/explorer/disks
2019-03-19 23:13:24 +01:00

16 lines
291 B
Bash
Executable file

#!/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