head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.42 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.40 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.38 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.36 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.34 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.32 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.30 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.28 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.26 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.24 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.22 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.20 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.18 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.16 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.14 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.12 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.10 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.8 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.6 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.4 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.2 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.1.1.1.0.4 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.2 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 2005.04.22.19.05.28; author wiz; state dead; branches; next 1.1; 1.1 date 2004.10.28.01.02.17; author xtraeme; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.10.28.01.02.17; author xtraeme; state Exp; branches; next ; desc @@ 1.2 log @Removed mysql3-{client,server} -- obsoleted by mysql-* and mysql4-* packages, and the original authors have stopped its maintenance. Thus, there are various vulnerabilities in them now. @ text @$NetBSD: patch-am,v 1.1 2004/10/28 01:02:17 xtraeme Exp $ --- scripts/safe_mysqld.sh.orig Fri Apr 11 13:57:14 2003 +++ scripts/safe_mysqld.sh Fri Apr 11 13:58:02 2003 @@@@ -195,6 +195,14 @@@@ fi fi +datemsg() +{ + echo -n $(date +'%y%M%d %H:%M:%S')" " + echo "$*" +} + +exec >>$err_log 2>&1 + # # If there exists an old pid file, check if the daemon is already running # Note: The switches to 'ps' may depend on your operating system @@@@ -205,18 +213,16 @@@@ then if @@FIND_PROC@@ then # The pid contains a mysqld process - echo "A mysqld process already exists" - echo "A mysqld process already exists at " `date` >> $err_log + datemsg "A mysqld process already exists" exit 1 fi fi rm -f $pid_file if test -f $pid_file then - echo "Fatal error: Can't remove the pid file: $pid_file" - echo "Fatal error: Can't remove the pid file: $pid_file at " `date` >> $err_log - echo "Please remove it manually and start $0 again" - echo "mysqld daemon not started" + datemsg "Fatal error: Can't remove the pid file: $pid_file" + datemsg "Please remove it manually and start $0 again" + datemsg "mysqld daemon not started" exit 1 fi fi @@@@ -225,11 +231,11 @@@@ # Uncomment the following lines if you want all tables to be automaticly # checked and repaired at start # -# echo "Checking tables in $DATADIR" +# datemsg "Checking tables in $DATADIR" # $MY_BASEDIR_VERSION/bin/myisamchk --silent --force --fast --medium-check -O key_buffer=64M -O sort_buffer=64M $DATADIR/*/*.MYI # $MY_BASEDIR_VERSION/bin/isamchk --silent --force -O sort_buffer=64M $DATADIR/*/*.ISM -echo "Starting $MYSQLD daemon with databases from $DATADIR" +datemsg "Starting $MYSQLD daemon with databases from $DATADIR" # Does this work on all systems? #if type ulimit | grep "shell builtin" > /dev/null @@@@ -237,7 +243,7 @@@@ # ulimit -n 256 > /dev/null 2>&1 # Fix for BSD and FreeBSD systems #fi -echo "`date +'%y%m%d %H:%M:%S mysqld started'`" >> $err_log +datemsg "mysqld started" while true do rm -f $MYSQL_UNIX_PORT $pid_file # Some extra safety @@@@ -260,7 +266,7 @@@@ # The only thing is ps x => redhat 5 gives warnings when using ps -x. # kill -9 is used or the process won't react on the kill. numofproces=`ps xa | grep -v "grep" | grep -c $ledir/$MYSQLD` - echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log + datemsg "Number of processes running now: $numofproces" I=1 while test "$I" -le "$numofproces" do @@@@ -272,7 +278,7 @@@@ # echo "TEST $I - $T **" if kill -9 $T then - echo "$MYSQLD process hanging, pid $T - killed" | tee -a $err_log + datemsg "$MYSQLD process hanging, pid $T - killed" else break fi @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.4 2003/10/05 17:55:34 martti Exp $ @ 1.1.1.1 log @Import mysql-server-3.23.58 into databases/mysql3-server. @ text @@