From owner-freebsd-current@FreeBSD.ORG Sat Jul 26 13:21:20 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AE3737B401 for ; Sat, 26 Jul 2003 13:21:20 -0700 (PDT) Received: from sv07e.atm-tzs.kmjeuro.com (sv07e.atm-tzs.kmjeuro.com [193.81.94.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EAEC43F3F for ; Sat, 26 Jul 2003 13:21:17 -0700 (PDT) (envelope-from k.joch@kmjeuro.com) Received: from kmjeuro.com (adsl.sbg.kmjeuro.com [62.99.198.46]) (authenticated bits=0)h6QKL2Qo081111 for ; Sat, 26 Jul 2003 22:21:02 +0200 (CEST) (envelope-from k.joch@kmjeuro.com) Message-ID: <3F22E2AD.1060405@kmjeuro.com> Date: Sat, 26 Jul 2003 22:21:01 +0200 From: "Karl M. Joch" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Mail Server protected by CTS Austria www.ctseuro.com Message found to be clean Subject: 5.1 and Pervasive SQL in Linux Emu (7) -> tty stopped output X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2003 20:21:20 -0000 the following script starts psql without problems on 4.8 with linux base 6. with 5.1 and linux base 7 it looks like su hangs. scripts doenst complete and ends with tty output stopped. there is also something very strange: when starting pervasive in forground mode i get a listener and it works. when starting into background (manually without the following script) i dont get a listener opened. persavice thinks it is open, at least there is no entry in any log but netstat -rn doesnt show a listener. #!/compat/linux/bin/sh # # description: Starts and stops the Pervasive mkded and sqlmgr daemons # chkconfig: 2345 92 92 start_psql(){ echo "Starting Pervasive services: " SQLID=`/bin/ps ax | grep -v grep | grep sqlmgr | awk '{print $1}'` BTRID=`/bin/ps ax | grep -v grep | grep mkded | awk '{print $1}'` if [ "X$BTRID" != "X" -o "X$SQLID" != "X" ] ; then echo Warning: the following service is running if [ "X$BTRID" != "X" ] ; then echo mkded fi if [ "X$SQLID" != "X" ] ; then echo sqlmgr fi echo fi echo mkded echo "cd $PVSW_ROOT/bin; . $PVSW_ROOT/bin/.bash_profile ; ./mkded -start" | /usr/bin/su - psql || exit 1 echo sqlmgr echo "cd $PVSW_ROOT/bin; . $PVSW_ROOT/bin/.bash_profile ; ./sqlmgr -start" | /usr/bin/su - psql || exit 1 touch /var/lock/subsys/psql echo "" } stop_psql(){ echo "Shutting down Pervasive services: " SQLID=`/bin/ps ax | grep -v grep | grep sqlmgr | awk '{print $1}'` if [ "X$SQLID" != "X" ] ; then echo sqlmgr if [ -x /usr/local/psql/bin/sqlmgr ] ; then echo "cd $PVSW_ROOT/bin; . $PVSW_ROOT/bin/.bash_profile ; ./sqlmgr -stop" | /usr/bin/su - psql else kill -9 $SQLID fi fi BTRID=`/bin/ps ax | grep -v grep | grep mkded | awk '{print $1}'` if [ "X$BTRID" != "X" ] ; then echo mkded if [ -x /usr/local/psql/bin/mkded ] ; then echo "cd $PVSW_ROOT/bin; . $PVSW_ROOT/bin/.bash_profile ; ./mkded -stop" | /usr/bin/su - psql else kill -9 $BTRID fi fi echo "" rm -f /var/lock/subsys/psql } force_psql(){ if [ -x $PVSW_ROOT/bin/mkded ] ; then echo "Clearing Pervasive shared memory: " echo "cd $PVSW_ROOT/bin; . $PVSW_ROOT/bin/.bash_profile ; ./mkded -force" | /bin/su - psql fi # jme 27791 MEMORY=`ipcs -m | grep psql | awk '{print $2}' | tr -d "psql "` if [ "X$MEMORY" != "X" ] ; then for i in $MEMORY ; do ipcrm shm $i done fi echo "Clearing semaphores: " SEMAFORES=`ipcs -s | grep psql | awk '{print $2}' | tr -d "psql "` if [ "X$SEMAFORES" != "X" ] ; then for i in $SEMAFORES ; do ipcrm sem $i done fi # ayahin: defect 33091 SQLID=`/bin/ps ax | grep -v grep | grep sqlmgr | awk '{print $1}'` BTRID=`/bin/ps ax | grep -v grep | grep mkded | awk '{print $1}'` if [ "X$SQLID" != "X" ] ; then echo sqlmgr kill -9 $SQLID fi if [ "X$BTRID" != "X" ] ; then echo mkded kill -9 $BTRID fi echo "" } # Setting up environment PVSW_ROOT=/usr/local/psql PATH=$PVSW_ROOT/bin:$PATH LD_LIBRARY_PATH=$PVSW_ROOT/lib cd $PVSW_ROOT/bin case "$1" in start) start_psql ;; stop) stop_psql ;; force) stop_psql force_psql ;; restart) echo "Restarting Pervasive services: " stop_psql start_psql echo "done." ;; *) echo "Usage: psql {start|stop|force|restart}" exit 1 esac