SVN: rc-scripts/trunk/rc.d/init.d/functions

glen glen at pld-linux.org
Thu Nov 1 02:34:29 CET 2007


Author: glen
Date: Thu Nov  1 02:34:29 2007
New Revision: 8933

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- strstr() from fedora initscripts

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions	(original)
+++ rc-scripts/trunk/rc.d/init.d/functions	Thu Nov  1 02:34:29 2007
@@ -104,6 +104,12 @@
 	esac
 }
 
+# returns OK if $1 contains $2
+strstr() {
+	[ "${1#*$2*}" = "$1" ] && return 1
+	return 0
+}
+
 if is_yes "$FASTRC"; then
 	RC_LOGGING=no
 fi


More information about the pld-cvs-commit mailing list