- Use /bin/sh and do not depend on bash

PR:		ports/109768
Submitted by:	Pankov Pavel <pankov_p@mail.ru>
Approved by:	maintainer timeout
This commit is contained in:
Gabor Kovesdan 2007-03-17 22:22:19 +00:00
parent 0b14902cb3
commit b12b87e98e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187605
8 changed files with 12 additions and 12 deletions

View file

@ -1,4 +1,4 @@
#!/usr/local/bin/bash #!/bin/sh
# #
# $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $ # $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $
# #
@ -16,7 +16,7 @@
. %%RC_SUBR%% . %%RC_SUBR%%
# Source the config script # Source the config script
if [[ "$datadir" == "" ]] ; then if [ -z "$datadir" ] ; then
echo Loading defaultsettings echo Loading defaultsettings
. %%PREFIX%%/etc/mysqlard.cnf . %%PREFIX%%/etc/mysqlard.cnf
fi fi
@ -44,11 +44,11 @@ queryfile=${queryfile:="${datadir}/queries.rrd"}
slavefile=${slavefile:="${datadir}/slave.rrd"} slavefile=${slavefile:="${datadir}/slave.rrd"}
slaveopt= slaveopt=
if [[ "$slave" != "" ]]; then if [ -n "$slave" ]; then
slaveopt=-L slaveopt=-L
fi fi
if [[ "$MYSQLHOST" != "" ]] ; then if [ -n "$MYSQLHOST" ] ; then
MYSQLHOST=--host=$MYSQLHOST MYSQLHOST=--host=$MYSQLHOST
fi fi
@ -63,7 +63,7 @@ avgsamps () {
} }
archives () { archives () {
arch=$(($1 / $2)) arch=$(($1 / $2))
if [[ $(($2 * ${arch} * $3)) -lt $4 ]] if [ $(($2 * ${arch} * $3)) -lt $4 ]
then then
arch=$((${arch} + 1)) arch=$((${arch} + 1))
fi fi

View file

@ -2,7 +2,7 @@
+++ src/mysqlard.server.sh Tue Aug 1 11:11:29 2006 +++ src/mysqlard.server.sh Tue Aug 1 11:11:29 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# #
# $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $ # $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $
# #

View file

@ -2,7 +2,7 @@
+++ src/mysqlar.monthly.sh Tue Aug 1 11:10:54 2006 +++ src/mysqlar.monthly.sh Tue Aug 1 11:10:54 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# #
# $Id: mysqlar.monthly.sh 35 2004-03-10 15:48:41Z dewitge $ # $Id: mysqlar.monthly.sh 35 2004-03-10 15:48:41Z dewitge $
# #

View file

@ -2,7 +2,7 @@
+++ src/mysqlar.weekly.sh Tue Aug 1 11:11:09 2006 +++ src/mysqlar.weekly.sh Tue Aug 1 11:11:09 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# #
# $Id: mysqlar.weekly.sh 35 2004-03-10 15:48:41Z dewitge $ # $Id: mysqlar.weekly.sh 35 2004-03-10 15:48:41Z dewitge $
# #

View file

@ -2,7 +2,7 @@
+++ src/mysqlard.cnf.sh Tue Aug 1 11:11:22 2006 +++ src/mysqlard.cnf.sh Tue Aug 1 11:11:22 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# $Id: mysqlard.cnf.sh 40 2006-01-20 20:26:11Z dewitge $ # $Id: mysqlard.cnf.sh 40 2006-01-20 20:26:11Z dewitge $
# #
# MySQL Activity Report # MySQL Activity Report

View file

@ -2,7 +2,7 @@
+++ src/mysqlar.daily.sh Tue Aug 1 11:10:47 2006 +++ src/mysqlar.daily.sh Tue Aug 1 11:10:47 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# #
# $Id: mysqlar.daily.sh 35 2004-03-10 15:48:41Z dewitge $ # $Id: mysqlar.daily.sh 35 2004-03-10 15:48:41Z dewitge $
# #

View file

@ -2,7 +2,7 @@
+++ src/mysqlar_graph.sh Tue Aug 1 12:53:48 2006 +++ src/mysqlar_graph.sh Tue Aug 1 12:53:48 2006
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-#!/bin/bash -#!/bin/bash
+#!/usr/local/bin/bash +#!/bin/sh
# #
# $Id: mysqlar_graph.sh 40 2006-01-20 20:26:11Z dewitge $ # $Id: mysqlar_graph.sh 40 2006-01-20 20:26:11Z dewitge $
# #

View file

@ -8,7 +8,7 @@ mysql> FLUSH PRIVILEGES;
2) Add the mysqlard crontab to root's crontab: 2) Add the mysqlard crontab to root's crontab:
*/5 * * * * hourly=1 daily=1 weekly=1 monthly=1 \ */5 * * * * /usr/bin/env hourly=1 daily=1 weekly=1 monthly=1 \
%%PREFIX%%/bin/mysqlar_graph > /dev/null %%PREFIX%%/bin/mysqlar_graph > /dev/null
3) Add a line like this to your apache's httpd.conf: 3) Add a line like this to your apache's httpd.conf: