From c4b524da8118d47a9642465e5e4b7cefa44043b7 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 28 Apr 2007 11:01:23 -0600 Subject: [PATCH] Imported Debian patch 5.1-10 --- debian/changelog | 10 ++++++++++ debian/control | 2 +- debian/gcpegg.1 | 4 ++-- debian/init.d | 16 +++++++++++++++- debian/rules | 5 +++-- reg_orion.c | 2 ++ reg_pear.c | 2 ++ regtest.c | 6 ++++++ 8 files changed, 41 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 49c829b..fb5161d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +gcpegg (5.1-10) unstable; urgency=low + + * add a purge target to the init.d script, closes: #367123 + * merge patch that adds support for Debian/kfreebsd, closes: #414405 + * rename 'basket' to 'gcpbasket' to avoid package conflict, closes: #420632 + * add LSB structure to init.d + * update standards version + + -- Bdale Garbee Sat, 28 Apr 2007 11:01:23 -0600 + gcpegg (5.1-9) unstable; urgency=low * use fully qualified pathnames in init.d, addresses another part of 347778 diff --git a/debian/control b/debian/control index 052a0d4..0553a25 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: misc Priority: optional Maintainer: Bdale Garbee Build-Depends: debhelper (>= 5), libncurses-dev -Standards-Version: 3.6.2.1 +Standards-Version: 3.7.2 Package: gcpegg Architecture: any diff --git a/debian/gcpegg.1 b/debian/gcpegg.1 index afbcbc3..78a440a 100644 --- a/debian/gcpegg.1 +++ b/debian/gcpegg.1 @@ -2,7 +2,7 @@ .SH NAME gcpegg \- Global Consciousness Project REG Software .SH SYNOPSIS -.B basket +.B gcpbasket .br .B eggsh .br @@ -23,7 +23,7 @@ launched at boot and runs persistently. Is is configured using the /etc/eggrc file. The -.B basket +.B gcpbasket command is the data collector, and is not normally needed by an EGG site. diff --git a/debian/init.d b/debian/init.d index 3992719..6f0e2c9 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,5 +1,14 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: gcpegg +# Required-Start: $local_fs +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start GCP EGG software on virtual terminal 8 +### END INIT INFO + set -e test -x /usr/sbin/eggsh || exit 0 @@ -24,8 +33,13 @@ case "$1" in /usr/bin/openvt -f -c 8 /usr/sbin/eggsh echo "done." ;; + purge) + echo -n "Purging all previously generated data by GCP EGG" + rm -r /var/spool/gcpegg/* + echo "done." + ;; *) - echo "Usage: /etc/init.d/gcpegg {start|stop|reload|force-reload|restart}" + echo "Usage: /etc/init.d/gcpegg {start|stop|reload|force-reload|restart|purge}" exit 1 ;; esac diff --git a/debian/rules b/debian/rules index a9f7ee6..6e16a2f 100755 --- a/debian/rules +++ b/debian/rules @@ -23,14 +23,15 @@ install-stamp: build-stamp dh_installdirs /usr/bin/install -o root -g root -m 0755 eggsh debian/gcpegg/usr/sbin /usr/bin/install -o root -g root -m 0755 regtest debian/gcpegg/usr/sbin - /usr/bin/install -o root -g root -m 0755 basket debian/gcpegg/usr/sbin + /usr/bin/install -o root -g root -m 0755 basket \ + debian/gcpegg/usr/sbin/gcpbasket /usr/bin/install -o root -g root -m 0644 eggrc.sample \ debian/gcpegg/etc/eggrc /usr/bin/install -o root -g root -m 0644 debian/gcpegg.1 \ debian/gcpegg/usr/share/man/man1/gcpegg.1 gzip -9 debian/gcpegg/usr/share/man/man1/gcpegg.1 ( cd debian/gcpegg/usr/share/man/man1 ; \ - ln gcpegg.1.gz basket.1.gz ;\ + ln gcpegg.1.gz gcpbasket.1.gz ;\ ln gcpegg.1.gz eggsh.1.gz ;\ ln gcpegg.1.gz regtest.1.gz ) touch install-stamp diff --git a/reg_orion.c b/reg_orion.c index d6938ef..ccb1189 100644 --- a/reg_orion.c +++ b/reg_orion.c @@ -147,7 +147,9 @@ fprintf(stderr, "Error in open(%s)\n", ttydev); #else res = cfsetospeed(&tt, baudcon); cfmakeraw(&tt); +#if !defined(__FreeBSD_kernel__) tt.c_oflag &= (~(TABDLY | ONLCR)); +#endif #endif res = tcsetattr(TTY_fd, TCSANOW, &tt); diff --git a/reg_pear.c b/reg_pear.c index bc79bb7..8775537 100644 --- a/reg_pear.c +++ b/reg_pear.c @@ -122,7 +122,9 @@ static int32 OpenDev(DevOpts *opts) { #else res = cfsetospeed(&tt, baudcon); cfmakeraw(&tt); +#if !defined(__FreeBSD_kernel__) tt.c_oflag &= (~(TABDLY | ONLCR)); +#endif #endif res = tcsetattr(TTY_fd, TCSANOW, &tt); diff --git a/regtest.c b/regtest.c index 5d3f6c8..397dd60 100644 --- a/regtest.c +++ b/regtest.c @@ -10,6 +10,10 @@ #define __USE_BSD #include #undef __USE_BSD +#if defined(__FreeBSD_kernel__) +/* Not patching the code directly, used once, in a "|" context */ +#define O_NDELAY 0 +#endif #include #include @@ -56,7 +60,9 @@ int main(int argc, char *argv[]) { res = tcgetattr(TTY_fd, &tt); res = cfsetospeed(&tt, baud); cfmakeraw(&tt); +#if !defined(__FreeBSD_kernel__) tt.c_oflag &= (~(TABDLY | ONLCR)); +#endif res = tcsetattr(TTY_fd, TCSANOW, &tt); mean = 0; -- 2.30.2