Nish reported problems in conmux that can be traced back to commit f072c190b171a756417d54c698adf1499069cbf0
So to avoid breakages for existing users of the code, that commit will be reverted. We'll get back to it when it is possible to find out an environment where we can get conmux more thoroughly tested. CC: Philipp Seiler <[email protected]> CC: Nishanth Aravamudan <[email protected]> Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- conmux/Makefile | 34 +++++++++++++---------------- conmux/conmux | 5 ----- conmux/console | 4 ---- conmux/contrib/console_check.py | 2 +- conmux/drivers/ivm | 2 +- conmux/drivers/module.mk | 8 +++---- conmux/drivers/x3270_glue.expect | 1 - conmux/start | 44 ++++++++++++-------------------------- 8 files changed, 35 insertions(+), 65 deletions(-) diff --git a/conmux/Makefile b/conmux/Makefile index 049995d..f78d205 100644 --- a/conmux/Makefile +++ b/conmux/Makefile @@ -8,36 +8,32 @@ BASE=$(BUILD)$(PREFIX) BINS=console conmux-attach LIBS=Conmux.pm SBIN=conmux-registry conmux start -LIBDIR=/lib -LOGDIR=/var/log -SYSCONFIGDIR=/etc + MODULES=helpers drivers -BINDIR=/bin -SBINDIR=/sbin all:: install:: @[ -d $(BASE) ] || mkdir -p $(BASE) - @[ -d $(BASE)$(BINDIR) ] || mkdir $(BASE)$(BINDIR) - @[ -d $(BASE)$(LIBDIR)/conmux ] || mkdir -p $(BASE)$(LIBDIR)/conmux - @[ -d $(BASE)$(SBINDIR) ] || mkdir $(BASE)$(SBINDIR) - @[ -d $(BUILD)$(LOGDIR)/conmux ] || mkdir -p $(BUILD)$(LOGDIR)/conmux - @[ -d $(BUILD)$(SYSCONFIGDIR)/conmux ] || mkdir -p $(BUILD)$(SYSCONFIGDIR)/conmux + @[ -d $(BASE)/bin ] || mkdir $(BASE)/bin + @[ -d $(BASE)/lib ] || mkdir $(BASE)/lib + @[ -d $(BASE)/sbin ] || mkdir $(BASE)/sbin + @[ -d $(BASE)/log ] || mkdir $(BASE)/log + @[ -d $(BASE)/etc ] || mkdir $(BASE)/etc for f in $(BINS); do \ - rm -f $(BASE)$(BINDIR)/$$f; \ - cp -p $$f $(BASE)$(BINDIR)/$$f; \ - chmod 755 $(BASE)$(BINDIR)/$$f; \ + rm -f $(BASE)/bin/$$f; \ + cp -p $$f $(BASE)/bin/$$f; \ + chmod 755 $(BASE)/bin/$$f; \ done for f in $(SBIN); do \ - rm -f $(BASE)$(SBINDIR)/$$f; \ - cp -p $$f $(BASE)$(SBINDIR)/$$f; \ - chmod 755 $(BASE)$(SBINDIR)/$$f; \ + rm -f $(BASE)/sbin/$$f; \ + cp -p $$f $(BASE)/sbin/$$f; \ + chmod 755 $(BASE)/sbin/$$f; \ done for f in $(LIBS); do \ - rm -f $(BASE)$(LIBDIR)/conmux/$$f; \ - cp -p $$f $(BASE)$(LIBDIR)/conmux/$$f; \ - chmod 644 $(BASE)$(LIBDIR)/conmux/$$f; \ + rm -f $(BASE)/lib/$$f; \ + cp -p $$f $(BASE)/lib/$$f; \ + chmod 644 $(BASE)/lib/$$f; \ done release:: diff --git a/conmux/conmux b/conmux/conmux index 9462108..12bc871 100755 --- a/conmux/conmux +++ b/conmux/conmux @@ -21,11 +21,6 @@ use IPC::Open3; use URI::Escape; use Net::Domain; -use lib "/usr/lib/"; -use lib "/usr/lib64/"; -use lib "/lib/"; -use lib "/lib64/"; - # Find our internal libraries. use lib $FindBin::Bin; use lib "$FindBin::Bin/../lib/"; diff --git a/conmux/console b/conmux/console index 5203230..f031e5b 100755 --- a/conmux/console +++ b/conmux/console @@ -24,10 +24,6 @@ use Getopt::Long qw(:config no_auto_abbrev); my $CONMUX = $FindBin::Bin; my $CONMUX = $ENV{'CONMUX_ROOT'} if ($ENV{'CONMUX_ROOT'}); -use lib "/usr/lib/"; -use lib "/usr/lib64/"; -use lib "/lib/"; -use lib "/lib64/"; # Find our internal libraries. use lib $FindBin::Bin; use lib "$FindBin::Bin/../lib/"; diff --git a/conmux/contrib/console_check.py b/conmux/contrib/console_check.py index 0f14c52..86a8d87 100755 --- a/conmux/contrib/console_check.py +++ b/conmux/contrib/console_check.py @@ -16,7 +16,7 @@ _author_ = 'Scott Zawalski ([email protected])' import sys, pexpect, commands, os from optparse import OptionParser -from autotest.client.shared import global_config +from autotest_lib.client.common_lib import global_config GLOBAL_CONFIG = global_config.global_config diff --git a/conmux/drivers/ivm b/conmux/drivers/ivm index 29c749c..c134c7a 100755 --- a/conmux/drivers/ivm +++ b/conmux/drivers/ivm @@ -316,7 +316,7 @@ if {$version < 3} { # See if the lpar is up, if so shut it down. if {[string compare [state $lpar] "Ready"] != 0} { note "shutting down lpar" - if {[runit "chsysstate -r lpar -n $lpar -o shutdown --immed\r" out] != 0} { + if {[runit "chsysstate -r lpar -n $lpar -o shutdown\r" out] != 0} { winge "$lpar: power off failed\n$out" exit 2 } diff --git a/conmux/drivers/module.mk b/conmux/drivers/module.mk index a33150d..c13fec0 100644 --- a/conmux/drivers/module.mk +++ b/conmux/drivers/module.mk @@ -8,9 +8,9 @@ DRIVERS:=blade dli-lpc hmc ivm reboot-netfinity reboot-newisys reboot-numaq \ reboot-acs48 reboot-apc reboot-laurel fence_apc_snmp.py install:: - @[ -d $(BASE)$(LIBDIR)/conmux/drivers ] || mkdir $(BASE)$(LIBDIR)/conmux/drivers + @[ -d $(BASE)/lib/drivers ] || mkdir $(BASE)/lib/drivers for f in $(DRIVERS); do \ - rm -f $(BASE)$(LIBDIR)/conmux/drivers/$$f; \ - cp -p drivers/$$f $(BASE)$(LIBDIR)/conmux/drivers/$$f; \ - chmod 755 $(BASE)$(LIBDIR)/conmux/drivers/$$f; \ + rm -f $(BASE)/lib/drivers/$$f; \ + cp -p drivers/$$f $(BASE)/lib/drivers/$$f; \ + chmod 755 $(BASE)/lib/drivers/$$f; \ done diff --git a/conmux/drivers/x3270_glue.expect b/conmux/drivers/x3270_glue.expect index 4f4e36a..b905d7f 100755 --- a/conmux/drivers/x3270_glue.expect +++ b/conmux/drivers/x3270_glue.expect @@ -1,4 +1,3 @@ -#!/usr/bin/expect # Copyright 2000, 2004 by Paul Mattes. # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, diff --git a/conmux/start b/conmux/start index 81b9507..dabcd58 100755 --- a/conmux/start +++ b/conmux/start @@ -7,37 +7,21 @@ # # The Console Multiplexor is released under the GNU Public License V2 # -# -### BEGIN INIT INFO -# Provides: conmuxd -# Required-Start: $remote_fs -# Required-Stop: $remote_fs -# Should-Start: $null -# Should-Stop: $null -# Default-Start: 3 5 S -# Default-Stop: 0 1 2 6 -# Short-Description: console multiplexing deamon -# Description: deamon to multiplex ipmi and bladecenter sol sessions -### END INIT INFO - - if [ -f ~/.gmm.conf ]; then . ~/.gmm.conf fi -CONMUX=${CONMUX:-/usr/} +CONMUX=${CONMUX:-/usr/local/conmux} cmd="start" if [ "$1" != "" ]; then cmd="$1" fi -PATH=$CONMUX/bin:$CONMUX/sbin:$CONMUX/lib/conmux/drivers:$CONMUX/lib/helpers:$PATH -MY_LOG=/var/log/conmux -MY_ETC=/etc/conmux +PATH=$CONMUX/bin:$CONMUX/sbin:$CONMUX/lib/drivers:$CONMUX/lib/helpers:$PATH function start() { typeset name="$1" - typeset pf="${MY_LOG}/$name.pid" + typeset pf="$CONMUX/log/$name.pid" shift @@ -49,14 +33,14 @@ function start() { fi echo "starting $name ..." - "$@" >"${MY_LOG}/$name.log" 2>&1 & + "$@" >"$CONMUX/log/$name.log" 2>&1 & echo "$!" >"$pf" return 0 } function stop() { typeset name="$1" - typeset pf="${MY_LOG}/$name.pid" + typeset pf="$CONMUX/log/$name.pid" echo "stopping $name ..." # Kill it and clear up @@ -65,10 +49,10 @@ function stop() { } existing="" -for i in ${MY_LOG}/*.pid +for i in $CONMUX/log/*.pid do n=${i%.pid} - n=${n#${MY_LOG}/} + n=${n#$CONMUX/log/} if [ "$n" != "*" ]; then existing="$existing $n" @@ -77,21 +61,21 @@ done if [ "$cmd" = "start" ]; then autoboot="" - [ -f ${MY_ETC}/registry ] || touch ${MY_ETC}/registry - start registry $CONMUX/sbin/conmux-registry 63000 ${MY_ETC}/registry + [ -f $CONMUX/etc/registry ] || touch $CONMUX/etc/registry + start registry $CONMUX/sbin/conmux-registry 63000 $CONMUX/etc/registry if [ "$?" -eq 0 ]; then sleep 1 fi started="registry" pause=0 - for i in ${MY_ETC}/*.cf + for i in $CONMUX/etc/*.cf do n=${i%.cf} - n=${n#${MY_ETC}} + n=${n#$CONMUX/etc/} if [ "$n" != "*" ]; then - if [ -f "${MY_LOG}/$n.cf" ]; then - if ! cmp -s "$i" "${MY_LOG}/$n.cf"; then + if [ -f "$CONMUX/log/$n.cf" ]; then + if ! cmp -s "$i" "$CONMUX/log/$n.cf"; then stop $n fi fi @@ -102,7 +86,7 @@ if [ "$cmd" = "start" ]; then started="$started $n" # Preserve the orginal configuration file. - cp "$i" "${MY_LOG}/$n.cf" + cp "$i" "$CONMUX/log/$n.cf" if grep -q TYPE:numaq "$i"; then autoboot="$autoboot $n" -- 1.7.10.4 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
