Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update utils/flashcache

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...
commit 73fc6f08d9bfe2b08824aebffce38b14869e13f3 1 parent 0bdf08f
Romashkin Andrey critdamage authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 utils/flashcache
14 utils/flashcache
View
@@ -2,7 +2,7 @@
#
# flashcache Init Script to manage cachedev loads
#
-# chkconfig: 345 90 10
+# chkconfig: 345 9 98
# description: Flashcache Management
# Flashcache options
@@ -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
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.