Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Update utils/flashcache
Browse files Browse the repository at this point in the history
patch change the start order, start to demons, stop after stop demons
patch test variables -n to -z
fix variable name $RETVAL in condition

PS sorry my bad english :)
  • Loading branch information
critdamage committed Oct 10, 2012
1 parent 0bdf08f commit 73fc6f0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils/flashcache
Expand Up @@ -2,7 +2,7 @@
#
# flashcache Init Script to manage cachedev loads
#
# chkconfig: 345 90 10
# chkconfig: 345 9 98
# description: Flashcache Management

# Flashcache options
Expand All @@ -15,11 +15,11 @@ MOUNTPOINT=
FLASHCACHE_NAME=

# Just a check, to validate the above params are set
[ -n "$SSD_DISK" ] && exit 10
[ -n "$BACKEND_DISK" ] && exit 11
[ -n "$CACHEDEV_NAME" ] && exit 12
[ -n "$MOUNTPOINT" ] && exit 13
[ -n "$FLASHCACHE_NAME" ] && exit 14
[ -z "$SSD_DISK" ] && exit 10
[ -z "$BACKEND_DISK" ] && exit 11
[ -z "$CACHEDEV_NAME" ] && exit 12
[ -z "$MOUNTPOINT" ] && exit 13
[ -z "$FLASHCACHE_NAME" ] && exit 14

# Source function library.
. /etc/rc.d/init.d/functions
Expand All @@ -44,7 +44,7 @@ start() {
#flashcache_load the cachedev
$FLASHCACHE_LOAD $SSD_DISK $CACHEDEV_NAME
RETVAL=$?
if [ $RETVAl -ne 0 ]; then
if [ $RETVAL -ne 0 ]; then
echo "Failed: flashcache_load $SSD_DISK $CACHEDEV_NAME"
exit $RETVAL;
fi
Expand Down

0 comments on commit 73fc6f0

Please sign in to comment.