debian/0000755000000000000000000000000012054075160007166 5ustar debian/docs0000644000000000000000000000001711526434737010053 0ustar README CHANGES debian/watch0000644000000000000000000000010611526434737010230 0ustar version=3 http://riemann.fmi.uni-sofia.bg/ngetty/ngetty-(.*)\.tar\.gz debian/source/0000755000000000000000000000000011526435305010472 5ustar debian/source/format0000644000000000000000000000001411526435274011705 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011526437531010624 5ustar debian/patches/01_no_gz_manual_install.diff0000644000000000000000000000306411526437531016160 0ustar Description: Don't install manuals with .gz extension Author: NIIBE Yutaka Last-Update: 2011-02-15 Index: ngetty-1.1/Makefile =================================================================== --- ngetty-1.1.orig/Makefile 2011-02-15 17:48:29.000000000 +0900 +++ ngetty-1.1/Makefile 2011-02-15 17:53:51.000000000 +0900 @@ -21,7 +21,7 @@ ALL_EXEC = ngetty ngetty.tiny ngetty.sortpfd \ ngetty-helper ngetty-helper.tiny ngetty-argv \ cleanutmp dumputmp nwho -ALL_MAN = ngetty.8.gz ngetty-helper.8.gz ngetty-argv.8.gz +ALL_MAN = ngetty.8 ngetty-helper.8 ngetty-argv.8 ifeq ($(FLAG_DEBUG),no) CCC_ = @echo ' CC $< ' ; @@ -160,6 +160,8 @@ ./ngetty-argv :-N:-a1:./ngetty-helper::TestTime || true ngetty-%.8.gz: $(C) echo '.so ngetty.8' | gzip -9 > $@ +ngetty-%.8: + $(C) echo '.so ngetty.8' > $@ install_other: $(ALL) install -m 755 $(P) -d $(usrbin_prefix) @@ -174,7 +176,6 @@ install -m 700 $(P) -d $(ngetty_prefix) install -m 755 $(P) -d $(man8dir) install -m 755 $(P) ngetty ngetty-helper ngetty-argv $(sbin_prefix) - install -m 644 $(P) ngetty.8.gz ngetty-*.8.gz $(man8dir) install -m 600 $(P) sample.Conf $(ngetty_prefix) install -m 755 $(P) contrib/setup $(ngetty_prefix) install -m 644 $(P) Version $(ngetty_prefix) @@ -185,7 +186,7 @@ @echo ' make install_other' clean: - rm -f $(ALL) *.o *.a *.s *_defs.h *.hZ a.out tzmap_mmap.c \ + rm -f $(ALL_EXEC) ngetty-helper.8 ngetty-argv.8 *.o *.a *.s *_defs.h *.hZ a.out tzmap_mmap.c \ *.c.orig test-helper opts_make ngetty.$(MYARCH) sstrip.* elf_print* rm -rf PACKAGE distclean: debian/patches/series0000644000000000000000000000003611526437057012043 0ustar 01_no_gz_manual_install.diff debian/control0000644000000000000000000000137311526635032010600 0ustar Source: ngetty Section: comm Priority: optional Maintainer: NIIBE Yutaka Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), dietlibc-dev Standards-Version: 3.9.1 Homepage: http://riemann.fmi.uni-sofia.bg/ngetty/ Package: ngetty Architecture: any Depends: lsb-base (>= 3.0-6), ${misc:Depends} Description: getty replacement - one single daemon for all consoles Ngetty is a daemon that starts login sessions on virtual console terminals, on demand. It is a good replacement for all those getty processes started from init that, most of the time, are only taking up memory. Since it is compiled statically with dietlibc, the ngetty binary size is only about 2k and uses considerably less memory than a usual getty implementations. debian/rules0000755000000000000000000000030712054072076010251 0ustar #!/usr/bin/make -f # -*- gmakefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DH_OPTIONS %: dh $@ --with quilt override_dh_auto_build: $(MAKE) CC='diet -Os gcc -W' debian/compat0000644000000000000000000000000211526436362010374 0ustar 7 debian/ngetty.examples0000644000000000000000000000003212054075004012230 0ustar debian/ngetty.init.sample debian/ngetty.init.sample0000644000000000000000000000643711526674160012667 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: ngetty # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: a small getty replacement # Description: Debian init script for ngetty, a small getty replacement ### END INIT INFO # Author: NIIBE Yutaka PATH=/sbin:/bin DESC="ngetty" NAME=ngetty DAEMON=/sbin/ngetty PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME STARTER=/sbin/ngetty-argv STARTER_ARGS="-D -S -d/ -e -p$PIDFILE" # Exit if the package is not installed (has been removed) test -x $DAEMON || exit 0 NGETTY_TTYS_RUNLEVEL23="1 2 3 4 5 6" NGETTY_TTYS_RUNLEVEL45="1" # Read configuration variable file if it is present test -f /etc/default/$NAME && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. . /lib/lsb/init-functions if [ -z "${RUNLEVEL:-}" ]; then # we need only the current level RUNLEVEL=`runlevel | sed 's/^. //'` fi case "$RUNLEVEL" in 0|1|6) ;; S|N) ;; 2|3) DAEMON_ARGS="$NGETTY_TTYS_RUNLEVEL23" ;; 4|5) DAEMON_ARGS="$NGETTY_TTYS_RUNLEVEL45" ;; esac # # Function that starts the daemon/service # do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $STARTER --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $STARTER -- \ " $STARTER_ARGS -- $DAEMON $NAME $DAEMON_ARGS" \ || return 2 } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 rm -f $PIDFILE return "$RETVAL" } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; restart|force-reload) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac exit 0 debian/dirs0000644000000000000000000000003011526440052010042 0ustar sbin usr/share/man/man8 debian/copyright0000644000000000000000000000224011526434737011133 0ustar This package was debianized by NIIBE Yutaka on Wed, 13 Feb 2008 12:43:20 +0900. Old implementations before 0.3 included fmt_ulong.c by DJB, but it has been replaced by newly written fmt_number_macro(). It was downloaded from http://riemann.fmi.uni-sofia.bg/ngetty/ Upstream Author: Nikola Vladov Copyright: Copyright 2007 Nikola Vladov Copyright 2007 Andre Oliveira License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is (C) 2008, NIIBE Yutaka and is licensed under the GPL, see above. debian/changelog0000644000000000000000000000504312054075154011045 0ustar ngetty (1.1-3) unstable; urgency=low * debian/ngetty.lintian-overrides: Remove dot-slash for newer lintian. * debian/ngetty.init.sample: Rename (was: ngetty.init). It's just a sample now, it's better to change inittab in most cases. * debian/ngetty.examples: New. * debian/README.Debian: Add explanation (Closes: #614049). -- NIIBE Yutaka Sat, 24 Nov 2012 16:27:43 +0900 ngetty (1.1-2) unstable; urgency=low * debian/control (Depends): Add lsb-base. * debian/ngetty.init: New (Closes: #470802, #495765). Not use inittab. Thanks to Sheridan Hutchinson and Radovan GarabĂ­k. -- NIIBE Yutaka Wed, 16 Feb 2011 14:18:47 +0900 ngetty (1.1-1) unstable; urgency=low * New upstream release. * debian/ngetty.lintian-overrides: Renamed from lintian.overrides. * debian/rules: Use dh. * debian/ngetty.manpages: New. * debian/source/format: New. * debian/control (Build-Depends): Require newer debhelper and quilt. (Starndards-Version): Conform to 3.9.1. (Description): Mention the binary package is compiled with dietlibc. (Closes: #600991). Thanks to Marco Bodrato. * debian/compat: Updated. * debian/patches/01_no_gz_manual_install.diff: New. -- NIIBE Yutaka Tue, 15 Feb 2011 17:31:28 +0900 ngetty (1.0-1) unstable; urgency=low * New upstream release (Closes: #532558). -- NIIBE Yutaka Tue, 09 Feb 2010 11:52:11 +0900 ngetty (0.4-1) unstable; urgency=low * New upstream release. * debian/control (Standards-Version): Conform to 3.8.0. -- NIIBE Yutaka Tue, 01 Jul 2008 14:05:10 +0900 ngetty (0.3-3) unstable; urgency=low * debian/rules, debian/overrides, debian/control: Build with dietlibc. Patch from Julian Gilbey. Closes: #470946. * CHANGES, Makefile, README, Version, all_defs.h, check_first.c, cleanutmp.c,do_utmp.c, get_headers, get_uptime.c, init.d/ngetty, lib.h, logname_isprint.h, ngetty-argv.c, ngetty-helper.c, ngetty.8, opts_do.c, sample.Conf, scan_number.h, scan_ulong.c, str_defs.h, test-helper.c, tryboottime.c, trysysinfo.c, tzmap.c, utmp_do.c, utmp_io.c, x_atoi.c: Incorporate upstream changes. -- NIIBE Yutaka Sun, 06 Apr 2008 15:25:33 +0900 ngetty (0.3-2) unstable; urgency=low * Incorporate upstream change of nwho.c to fix FTBFS on amd64. -- NIIBE Yutaka Sun, 02 Mar 2008 21:45:55 +0900 ngetty (0.3-1) unstable; urgency=low * Initial release (Closes: #461663). -- NIIBE Yutaka Wed, 13 Feb 2008 10:13:00 +0900 debian/README.Debian0000644000000000000000000000177212054074623011241 0ustar ngetty for Debian ----------------- In this packaging, I don't include cleanutmp, nwho and dumputmp which source distribution includes. To enable ngetty, please edit /etc/inittab like following: BEFORE: # Run gettys in standard runlevels 1:2345:respawn:/sbin/getty tty1 ... 6:23:respawn:/sbin/getty tty6 AFTER: # Run ngetty in standard runlevels ng:2345:respawn:/sbin/ngetty 1 2 3 4 5 6 That is, please disable getty lines _and_ add a single line for ngetty. It is also possible to start ngetty as init script. But please note that disabling getty in inittab is required, too. You can use the example init script. Default behavior of init script is: NGETTY_TTYS_RUNLEVEL23="1 2 3 4 5 6" NGETTY_TTYS_RUNLEVEL45="1" That is, you will see login prompts on tty1..6 when runlevel is 2 or 3 and will see login prompt only on tty1 when runlevel is 4 or 5. Please edit /etc/default/ngetty to override this behavior. -- NIIBE Yutaka , Sat, 24 Nov 2012 16:38:00 +0900 debian/ngetty.lintian-overrides0000644000000000000000000000043212054075064014062 0ustar # We deliberately have statically linked binaries using dietlibc # for efficiency, as this is the way the ngetty software was designed ngetty: statically-linked-binary sbin/ngetty ngetty: statically-linked-binary sbin/ngetty-helper ngetty: statically-linked-binary sbin/ngetty-argv debian/ngetty.manpages0000644000000000000000000000004711526437645012233 0ustar ngetty.8 ngetty-argv.8 ngetty-helper.8