#!/bin/sh -e fail() { echo "$@" >&2 && exit 1; } usage() { fail "usage: ${0##*/} "; } if test "$(whoami)" != 'root' then fail "$0: need root privileges" fi if test "$#" -ne 2; then usage; fi bioctl -c C -l "$2" softraid0 fsck -y "$1" mkdir -p "/mnt/$1" mount -o nodev,nosuid,noatime,noexec "$1" "/mnt/$1" df -h "/mnt/$1"