From: Michael Meskes Date: Fri, 20 Mar 1998 13:11:28 +0000 (+0100) Subject: Imported Debian patch 2.1-3 X-Git-Tag: debian/2.1-3^0 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d405eb310e71a317b86bbfd34e8be2ff368157d;p=sash Imported Debian patch 2.1-3 --- diff --git a/debian/README.debian b/debian/README.debian new file mode 100644 index 0000000..690017c --- /dev/null +++ b/debian/README.debian @@ -0,0 +1,7 @@ +sash for DEBIAN +---------------------- + +I found the latest version on http://www.tip.net.au/~dbell/ + +Michael Meskes , Fri Jan 30 10:28:17 CET 1998 + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8b8a83a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,62 @@ +sash (2.1-3) frozen unstable; urgency=low + + * correct root shell if package is removed + + -- Michael Meskes Fri, 20 Mar 1998 14:11:28 +0100 + +sash (2.1-2) unstable; urgency=low + + * Fixed postinst (#19584) + * Added -i option (#19656) + + -- Michael Meskes Mon, 16 Mar 1998 15:23:44 +0100 + +sash (2.1-1) unstable; urgency=low + + * New upstream version: David incorporated most of my changes except that + he wants sash to print a message everytime it starts. But he has added + an option -q to get it quiet. I hope that solves the problem as well. + + -- Michael Meskes Mon, 9 Mar 1998 13:42:33 +0100 + +sash (2.0-3) unstable; urgency=low + + * corrected argv handling for exec call (#18695) + * reworked postinst/prerm to make installation ask less questions + + -- Michael Meskes Fri, 27 Feb 1998 08:57:00 +0100 + +sash (2.0-2) unstable; urgency=low + + * sash no longer prints a message every time you invoke it (#18580) + + -- Michael Meskes Fri, 27 Feb 1998 08:57:00 +0100 + +sash (2.0-1) unstable; urgency=low + + * New upstream version + + -- Michael Meskes Fri, 30 Jan 1998 10:25:59 +0100 + +sash (1.0-3) unstable; urgency=low + + * Added -c option which fixes the problem with su as well as bug (#17573). + + -- Michael Meskes Thu, 29 Jan 1998 09:38:41 +0100 + +sash (1.0-2) unstable; urgency=low + + * Added section entry. + + -- Michael Meskes Tue, 16 Dec 1997 11:05:51 +0100 + +sash (1.0-1) unstable; urgency=low + + * Initial Release. + + -- Michael Meskes Tue, 16 Dec 1997 11:05:51 +0100 + +Local variables: +mode: debian-changelog +add-log-mailing-address: "meskes@debian.org" +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..431a201 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: sash +Section: shells +Priority: optional +Maintainer: Michael Meskes +Standards-Version: 2.4.0.0 + +Package: sash +Architecture: any +Description: Stand-alone shell. + The purpose of this program is to make replacing of shared libraries + easy and safe. It does this by firstly being linked statically, and + secondly by including many of the standard utilities within itself. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..0d3fedc --- /dev/null +++ b/debian/copyright @@ -0,0 +1,13 @@ +This package was debianized by Michael Meskes meskes@debian.org on +Tue, 16 Dec 1997 11:05:51 +0100. + +It was downloaded from +ftp://sunsite.unc.edu/pub/Linux/system/shells/sash.tar.z. + +The new upstream version can be found under http://www.tip.net.au/~dbell/. + +Copyright: + + * Copyright (c) 1998 by David I. Bell + * Permission is granted to use, distribute, or modify this source, + * provided that this copyright notice remains intact. diff --git a/debian/crontab.ex b/debian/crontab.ex new file mode 100644 index 0000000..555ac91 --- /dev/null +++ b/debian/crontab.ex @@ -0,0 +1 @@ +0 4 * * * root sash_maintenance diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..0b3df4d --- /dev/null +++ b/debian/dirs @@ -0,0 +1,4 @@ +bin +usr/man/man1 +var/lib/sash + diff --git a/debian/diversions.ex b/debian/diversions.ex new file mode 100644 index 0000000..aebbbe5 --- /dev/null +++ b/debian/diversions.ex @@ -0,0 +1 @@ + diff --git a/debian/inetd.conf.ex b/debian/inetd.conf.ex new file mode 100644 index 0000000..5f06089 --- /dev/null +++ b/debian/inetd.conf.ex @@ -0,0 +1,2 @@ +#:OTHER: +sash stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sash diff --git a/debian/info.ex b/debian/info.ex new file mode 100644 index 0000000..07f35d0 --- /dev/null +++ b/debian/info.ex @@ -0,0 +1,15 @@ +# This is a configuration files for installing a .info menu +# The Description to be placed into the directory +DESCR="Description" + +# The section this info file should be placed in (Regexp) followed by +# the new section name to be created if the Regexp does not match +# (Optional. If not given the .info will be appended to the directory) +#SECTION_MATCH="Regexp" +#SECTION_NAME="New Section Name" + +# The file referred to from the Info directory +FILE=sash.info + +# Optional. The files to be copied to /usr/info +#FILES=*.info diff --git a/debian/init.d.ex b/debian/init.d.ex new file mode 100644 index 0000000..ae5eabf --- /dev/null +++ b/debian/init.d.ex @@ -0,0 +1,31 @@ +#! /bin/sh +# +# This file was automatically customized by debmake on Fri, 30 Jan 1998 10:25:59 +0100 +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for Debian by Christoph Lameter + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/sash +# The following value is extracted by debstd to figure out how to generate +# the postinst script. Edit the field to change the way the script is +# registered through update-rc.d (see the manpage for update-rc.d!) +FLAGS="defaults 50" + +test -f $DAEMON || exit 0 + +case "$1" in + start) + start-stop-daemon --start --verbose --exec $DAEMON + ;; + stop) + start-stop-daemon --stop --verbose --exec $DAEMON + ;; + *) + echo "Usage: /etc/init.d/sash {start|stop}" + exit 1 + ;; +esac + +exit 0 diff --git a/debian/manpage.1.ex b/debian/manpage.1.ex new file mode 100644 index 0000000..595f056 --- /dev/null +++ b/debian/manpage.1.ex @@ -0,0 +1,41 @@ +.TH NAME SECTION +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +sash \- programs to do something +.SH SYNOPSIS +.B sash +.I "[options] files ..." +.br +.B bar +.I "[options] files ..." +.SH "DESCRIPTION" +This manual page documents briefly the +.BR sash , +and +.B bar +commands. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +Instead, it has documentation in the GNU Info format; see below. +.PP +.B sash +is a program that... +.SH OPTIONS +The programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options are included below. +For a complete description, see the Info files. +.TP +.B \-h, \-\-help +Show summary of options. +.TP +.B \-v, \-\-version +Show version of program. +.SH "SEE ALSO" +The programs are documented fully by +.IR "The Rise and Fall of a Fooish Bar" , +available via the Info system. +.SH AUTHOR +This manual page was written by Michael Meskes , +for the Debian GNU/Linux system (but may be used by others). diff --git a/debian/menu.ex b/debian/menu.ex new file mode 100644 index 0000000..3e598f0 --- /dev/null +++ b/debian/menu.ex @@ -0,0 +1,2 @@ +?package(sash):needs=X11|text|vc|wm section=Apps/see-menu-manual\ + title="sash" command="/usr/bin/sash" diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..4e277e9 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,36 @@ +#!/bin/sh + +rootshell=`awk -F: '/^root/ {print $7}' /etc/passwd` + +if [ "$rootshell" != "/bin/sash" ] +then + echo "The best way to use sash is to install it as root's login shell. Currently" + echo "root's login shell is set to "$rootshell"." + + while true + do + echo -n "Shall I make sash the login shell for root? [y/N] " + read input + if [ $input = "y" -o $input = "Y" ] + then + wd=1 + break + elif [ $input = "n" -o $input = "N" ] + then + wd=0 + break + elif [ ! $input ] + then + wd=0 + break + else + echo "Please answer \`Y' or \`N'." + fi 2>/dev/null + done + + if [ $wd = 1 ] + then + chsh -s /bin/sash root + echo $rootshell > /var/lib/sash/rootshell + fi +fi diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..b7ba8fd --- /dev/null +++ b/debian/postrm @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "$1" = "purge" -o "$1" = "remove" ] +then + + rootshell=`awk -F: '/root/ {print $7}' /etc/passwd` + + if [ $rootshell == "/bin/sash" ] + then + chsh -s `cat /var/lib/sash/rootshell` root + /bin/rm -f /var/lib/sash/rootshell + fi +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3b495f9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=sash + +build: + $(checkdir) + + make CFLAGS="-O2 -g -Wall -DHAVE_GZIP" + touch build + +clean: + $(checkdir) + -rm -f build + -make clean + -rm -f `find . -name "*~"` + -rm -rf debian/tmp debian/files* core debian/substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp + install -d debian/tmp + cd debian/tmp && install -d `cat ../dirs` + make install BINDIR=`pwd`/debian/tmp/bin MANDIR=`pwd`/debian/tmp/usr/man/man1 +# Must have debmake installed for this to work. Otherwise please copy +# /usr/bin/debstd into the debian directory and change debstd to debian/debstd + debstd README + dpkg-gencontrol + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f debian/rules +endef + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/watch.ex b/debian/watch.ex new file mode 100644 index 0000000..96239b2 --- /dev/null +++ b/debian/watch.ex @@ -0,0 +1,5 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +sunsite.unc.edu /pub/Linux/Incomingu sash-*.tar.gz debian uupdate diff --git a/sash.c b/sash.c index 51cdb91..dc13e12 100644 --- a/sash.c +++ b/sash.c @@ -198,11 +198,11 @@ main(argc, argv) { const char * cp; const char * singleCommand; - BOOL quietFlag; + BOOL quietFlag, interactive; char buf[PATHLEN]; singleCommand = NULL; - quietFlag = FALSE; + quietFlag = interactive = FALSE; /* * Look for options. @@ -221,7 +221,7 @@ main(argc, argv) /* * Execute specified command. */ - if ((argc != 1) || singleCommand) + if ((argc != 1) || singleCommand || interactive) usage(); singleCommand = *argv++; @@ -229,6 +229,16 @@ main(argc, argv) break; + case 'i': + /* + * Be an interactive shell + */ + if (singleCommand) + usage(); + + interactive = TRUE; + break; + case 'p': /* * Set the prompt string. @@ -916,7 +926,7 @@ usage() { fprintf(stderr, "Stand-alone shell (version %s)\n", version); fprintf(stderr, "\n"); - fprintf(stderr, "Usage: sash [-q] [-c command] [-p prompt]\n"); + fprintf(stderr, "Usage: sash [-q] [-c command] [-p prompt] [-i]\n"); exit(1); }