Skip to content
Snippets Groups Projects
Verified Commit 48faa2bd authored by David Hoese's avatar David Hoese
Browse files

Add some more error checking to ceilo driver install script

parent 4e59eb67
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
# communicated with. This should be run on reboot as the driver seems to # communicated with. This should be run on reboot as the driver seems to
# have trouble with kernel updates and maybe even reboots of the server. # have trouble with kernel updates and maybe even reboots of the server.
oops() {
echo "ERROR: $*"
exit 1
}
if [ $UID -ne 0 ]; then if [ $UID -ne 0 ]; then
echo "ERROR: This script must be run as root (UID 0)." echo "ERROR: This script must be run as root (UID 0)."
exit 1 exit 1
...@@ -44,11 +49,11 @@ EOF ...@@ -44,11 +49,11 @@ EOF
) )
# Add the server # Add the server
cd $DRIVER_DST cd $DRIVER_DST || oops "Driver install directory doesn't exist"
./mxaddsvr 192.168.16.27 4 ./mxaddsvr 192.168.16.27 4
status=$? status=$?
if [ $? -ne 0]; then if [ $? -ne 0 ]; then
echo "ERROR: Could not install driver" echo "ERROR: Could not install driver"
exit 1 exit 1
fi fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment