diff -Nur conmux.orig/conmux conmux.new/conmux
--- conmux.orig/conmux 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/conmux 2007-02-26 16:41:38.000000000 -0500
@@ -30,7 +30,7 @@
use lib "/usr/local/conmux/lib";
use Conmux;
-our $P = 'conmux';
+our $P = 'conmuxd';
our $debug = 0;
$SIG{'CHLD'} = "IGNORE";
diff -Nur conmux.orig/Conmux.pm conmux.new/Conmux.pm
--- conmux.orig/Conmux.pm 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/Conmux.pm 2007-02-23 18:47:06.000000000 -0500
@@ -15,7 +15,7 @@
our $Config;
BEGIN {
- my $cf = '/usr/local/conmux/etc/config';
+ my $cf = '/etc/conmux/conmux.conf';
if (-f $cf) {
open(CFG, "<$cf") || die "Conmux: $cf: open failed - $!\n";
while(<CFG>) {
diff -Nur conmux.orig/console conmux.new/console
--- conmux.orig/console 2007-02-23 17:00:41.000000000 -0500
+++ conmux.new/console 2007-02-26 16:53:10.000000000 -0500
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# console <host>/<machine> -- interactive client interface
+# conmux <host>/<machine> -- interactive client interface
#
# The main interactive client interace to conmux. Allows direct
# interaction with the payload, as well as allowing break out
@@ -14,14 +14,14 @@
#
$| = 1;
-our $P = 'console';
+our $P = 'conmux';
use POSIX qw(errno_h BUFSIZ);
use IO::Socket;
use Getopt::Long qw(:config no_auto_abbrev);
-my $CONMUX = '/usr/local/conmux';
-my $CONMUX = $ENV{'CONMUX_ROOT'} if ($ENV{'CONMUX_ROOT'});
+#my $CONMUX = '/usr/local/conmux';
+#my $CONMUX = $ENV{'CONMUX_ROOT'} if ($ENV{'CONMUX_ROOT'});
# Find our internal libraries.
###my $lib = $0; $lib =~ s@/[^/]+$@@;
@@ -29,7 +29,7 @@
###require Conmux;
##use lib ".";
##use Conmux;
-use lib "/usr/local/conmux/lib";
+#use lib "/usr/local/conmux/lib";
use Conmux;
# Basic terminal handling.
diff -Nur conmux.orig/drivers/module.mk conmux.new/drivers/module.mk
--- conmux.orig/drivers/module.mk 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/drivers/module.mk 2007-02-24 17:48:51.000000000 -0500
@@ -7,9 +7,9 @@
reboot-rsa reboot-rsa2
install::
- @[ -d $(BASE)/lib/drivers ] || mkdir $(BASE)/lib/drivers
+ @[ -d $(BASE)/share/conmux/drivers ] || mkdir -p $(BASE)/share/conmux/drivers
for f in $(DRIVERS); do \
- rm -f $(BASE)/lib/drivers/$$f; \
- cp -p drivers/$$f $(BASE)/lib/drivers/$$f; \
- chmod 755 $(BASE)/lib/drivers/$$f; \
+ rm -f $(BASE)/share/conmux/drivers/$$f; \
+ cp -p drivers/$$f $(BASE)/share/conmux/drivers/$$f; \
+ chmod 755 $(BASE)/share/conmux/drivers/$$f; \
done
diff -Nur conmux.orig/helpers/module.mk conmux.new/helpers/module.mk
--- conmux.orig/helpers/module.mk 2007-02-20 11:42:50.000000000 -0500
+++ conmux.new/helpers/module.mk 2007-02-24 17:49:15.000000000 -0500
@@ -6,9 +6,9 @@
HELPERS:=autoboot-helper tickle-helper
install::
- @[ -d $(BASE)/lib/helpers ] || mkdir $(BASE)/lib/helpers
+ @[ -d $(BASE)/share/conmux/helpers ] || mkdir -p $(BASE)/share/conmux/helpers
for f in $(HELPERS); do \
- rm -f $(BASE)/lib/helpers/$$f; \
- cp -p helpers/$$f $(BASE)/lib/helpers/$$f; \
- chmod 755 $(BASE)/lib/helpers/$$f; \
+ rm -f $(BASE)/share/conmux/helpers/$$f; \
+ cp -p helpers/$$f $(BASE)/share/conmux/helpers/$$f; \
+ chmod 755 $(BASE)/share/conmux/helpers/$$f; \
done
diff -Nur conmux.orig/Makefile conmux.new/Makefile
--- conmux.orig/Makefile 2007-02-20 11:42:51.000000000 -0500
+++ conmux.new/Makefile 2007-03-14 20:20:48.000000000 -0400
@@ -2,12 +2,17 @@
# Author: Andy Whitcroft <andyw@uk.ibm.com>
#
# The Console Multiplexor is released under the GNU Public License V2
-BUILD=
-PREFIX=/usr/local/conmux
+BUILD=$(DESTDIR)
+PREFIX=/usr
BASE=$(BUILD)$(PREFIX)
-BINS=console conmux-attach
-LIBS=Conmux.pm
-SBIN=conmux-registry conmux start
+BINS=conmux-attach
+PERLLIBS=Conmux.pm
+PERLINC=$(shell eval "$(shell perl -V:installvendorlib)"; echo $$installvendorlib \
+ | sed -e 's/^\/usr\///')
+SHARE=
+SBIN=conmux-registry
+CONMUXD=conmux
+CONMUX=console
MODULES=helpers drivers
@@ -16,24 +21,35 @@
install::
@[ -d $(BASE) ] || mkdir -p $(BASE)
@[ -d $(BASE)/bin ] || mkdir $(BASE)/bin
- @[ -d $(BASE)/lib ] || mkdir $(BASE)/lib
+ @[ -d $(BASE)/share ] || mkdir $(BASE)/share
+ @[ -d $(BASE)/$(PERLINC) ] || mkdir -p $(BASE)/$(PERLINC)
@[ -d $(BASE)/sbin ] || mkdir $(BASE)/sbin
- @[ -d $(BASE)/log ] || mkdir $(BASE)/log
- @[ -d $(BASE)/etc ] || mkdir $(BASE)/etc
+ @[ -d $(BUILD)/var/log/conmux ] || mkdir -p $(BUILD)/var/log/conmux
+ @[ -d $(BUILD)/var/run/conmux ] || mkdir -p $(BUILD)/var/run/conmux
+ @[ -d $(BUILD)/etc/init.d ] || mkdir -p $(BUILD)/etc/init.d
+ @[ -d $(BUILD)/etc/sysconfig ] || mkdir -p $(BUILD)/etc/sysconfig
+ @[ -d $(BUILD)/etc/conmux ] || mkdir -p $(BUILD)/etc/conmux
for f in $(BINS); do \
rm -f $(BASE)/bin/$$f; \
cp -p $$f $(BASE)/bin/$$f; \
chmod 755 $(BASE)/bin/$$f; \
done
+ cp -p $(CONMUX) $(BASE)/bin/conmux
for f in $(SBIN); do \
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)/lib/$$f; \
- cp -p $$f $(BASE)/lib/$$f; \
- chmod 644 $(BASE)/lib/$$f; \
+ cp -p $(CONMUXD) $(BASE)/sbin/conmuxd
+ for f in $(SHARE); do \
+ rm -f $(BASE)/share/conmux/$$f; \
+ cp -p $$f $(BASE)/share/conmux/$$f; \
+ chmod 644 $(BASE)/share/conmux/$$f; \
+ done
+ for f in $(PERLLIBS); do \
+ rm -f $(BASE)/$(PERLINC)/$$f; \
+ cp -p $$f $(BASE)/$(PERLINC)/$$f; \
+ chmod 644 $(BASE)/$(PERLINC)/$$f; \
done
release::