[go: up one dir, main page]

File: aoe-discover.in

package info (click to toggle)
aoetools 36-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 464 kB
  • sloc: ansic: 1,506; sh: 627; makefile: 54
file content (18 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh
# aoe-discover - trigger an AoE device discovery
# Copyright 2009, CORAID, Inc., and licensed under GPL v.2.

zero=`basename $0`
f=@devdir@/discover

if ! test -w $f; then
	echo 1>&2 $zero: $f does not exist or is not writeable.
	exit 1
fi
if ! test -c $f; then
	exec 1>&2
	echo "$zero: $f is not a character device file"
	echo "$zero: use udev or aoe-mkdevs to create it"
	exit 1
fi
echo > $f