sysprofile-0.3.9/0000755000000000000000000000000007356130257010620 5ustar sysprofile-0.3.9/debian/0000755000000000000000000000000012626352127012040 5ustar sysprofile-0.3.9/debian/docs0000644000000000000000000000003007357103262012703 0ustar debian/BUGS debian/TODO sysprofile-0.3.9/debian/TODO0000644000000000000000000000047007673574340012542 0ustar TODO LIST --------- - Organize sourcing of files in a way which permits them to be read in a certain order like in "/etc/*emacs*/site-start.d/"? Would this actually be worthwhile? - Get rid of bashisms and apply POSIX shell syntax only. - Add support for other shells. Anyone? (apply Bug#147696) sysprofile-0.3.9/debian/sysprofile.postinst0000644000000000000000000000255607435677753016075 0ustar #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin set -e #DEBHELPER# if [ `grep -c '\/etc\/sysprofile' /etc/profile` = 0 ]; then echo "" echo " There is no entry for '/etc/sysprofile'" echo " in this system's '/etc/profile' file." echo " " echo " If you want /etc/sysprofile be sourced" echo " by default, append these lines to" echo " /etc/profile for login shells:" echo "" echo " if [ -f /etc/sysprofile ]; then" echo " . /etc/sysprofile" echo " fi" echo "" echo " Example files for /etc/sysprofile.d/ can be found in" echo " \"/usr/share/doc/sysprofile/examples/\"." echo "" fi if [ `grep -c '\/etc\/sysprofile' /etc/bash.bashrc` = 0 ]; then echo "" echo " There is no entry for '/etc/sysprofile'" echo " in this system's '/etc/bash.bashrc' file." echo " " echo " If you want /etc/sysprofile be sourced for" echo " non-login bash shells by default as well," echo " append these lines to /etc/bash.bashrc:" echo "" echo " if [ -f /etc/sysprofile ]; then" echo " . /etc/sysprofile" echo " fi" echo "" echo " Example files for /etc/sysprofile.d/ can be found in" echo " \"/usr/share/doc/sysprofile/examples/\"." echo "" fi sysprofile-0.3.9/debian/sysprofile.README.Debian0000644000000000000000000000465707357107430016313 0ustar sysprofile for Debian ---------------------- The package "sysprofile" represents an approach for a modular centralized configuration of the bash shell within a Debian Linux system. It's main component is the directory "/etc/sysprofile.d/" which contains small shell script modules executed at login. Each of the files in "/etc/sysprofile.d/" contains a small specific configuration setting item for either a single program or a specific environment variable. They are intended to split a monolithic "/etc/profile" into small independent components for a more flexible handling. E.g., by just dropping in scripts via a network connection without the need of having to start up an editor on every single remote host one can easily distribute changed configuration settings to a whole network. While some assorted sample shell script modules are provided as examples, the main accent lies on the implementation of a flexible modular mechanism instead of a specific but limited configuration setting which doesn't match anything but its author's own systems. The sysprofile mechanism appears to be quite usable and has actually been used successfully for more than a year. Please examine and test it closely before any serious use and share any criticism, corrections and hopefully additions with all of us. Especially nice would be the addition of somewhat equivalent settings for other shells like (t)csh, ksh or zsh, since this package primarily works for bash and has not been tested otherwise. If you need a similar mechanism for executing code at logout time please check out the related package "syslogout" by yours truly, which is a very close companion to "sysprofile". Debian package maintainers please note: --------------------------------------- Never *ever* rely on the existence of sysprofile on a system for your own Debian packages. The sysprofile mechanism is and should stay an optional tool for local sysadmins only. Massimo Dal Zotto has developed a similar package called "shellrc" which provides functionality not only for bash. It is hopefully still available from "http://www.cs.unitn.it/~dz/debian/". If you happen to become inspired enough to make something really useful out of this package i would be glad to hand over maintenance. I just tried to hack something i could use for my own purposes and because i didn't find anything equally simple to use. Paul Seelig , Mon, 01 Oct 2001 21:13:54 +0200sysprofile-0.3.9/debian/sysprofile.docs0000644000000000000000000000006212626350642015107 0ustar usr/share/doc/sysprofile/README.usage debian/BUGS sysprofile-0.3.9/debian/syslogout.install0000644000000000000000000000010512626347156015502 0ustar etc/syslogout /etc etc/syslogout.d/00Standard.bash /etc/syslogout.d/ sysprofile-0.3.9/debian/changelog0000644000000000000000000004103312626352116013711 0ustar sysprofile (0.3.9) unstable; urgency=medium * QA upload. * Maintainer field set to QA Group. * Set debhelper compatibility level to 9. (Closes: #800276) * Switch to dh(1). * Bump Standards-Version to 3.9.6. * Depend on ${misc:Depends} because of debhelper. * Point to /usr/share/common-licenses in copyright file. -- Emanuele Rocca Sat, 28 Nov 2015 17:19:24 +0100 sysprofile (0.3.8) unstable; urgency=low * Updated /usr/share/doc/sysprofile/examples/etc/sysprofile.d/mc.bash wrapper which works with mc-4.6.0 * Replace "mkdir /tmp/syslogout" with "mkdir -m 1777 /var/tmp/syslogout" where possible. Likewise replace "/tmp/syslogout" with "/var/tmp/syslogout". -- Paul Seelig Fri, 20 Jun 2003 22:06:15 +0200 sysprofile (0.3.7) unstable; urgency=low * Replaced '/bin/ls' in both /etc/sysprofile and /etc/syslogout by shell builtin 'echo' command. * Bumped up Standards version (no changes). -- Paul Seelig Tue, 17 Jun 2003 13:41:45 +0200 sysprofile (0.3.6) unstable; urgency=low * Corrected "Debian Linux system" to be "Debian system" in debian/control file. (Closes: #150888) * Replaced sysprofile's $DEBUG variable name with (hopefully) unique $SYSDEBUG variable name to ensure that it is not to be confused with $DEBUG variables from other config files (like /etc/bash_completion). (Closes: #186634) * Replaced $SYSDEBUG's debug log location definition in both /etc/sysprofile and /etc/syslogout from '/tmp' to '/var/tmp'. -- Paul Seelig Tue, 17 Jun 2003 12:43:52 +0200 sysprofile (0.3.5) unstable; urgency=low * Fixed wrong code example in debian/sysprofile.postinst message. A big thanks to Jack Kern for pointing this out! :-) -- Paul Seelig Sat, 23 Feb 2002 12:36:44 +0200 sysprofile (0.3.4) unstable; urgency=low * Fixed even more lintian errors: marked all files installed in /etc as conffiles and reworded postinst to make lintian stop claiming non-existing bashisms. * Added entry DH_COMPAT=3 to debian/rules file. -- Paul Seelig Fri, 25 Jan 2002 20:05:30 +0200 sysprofile (0.3.3) unstable; urgency=low * Fixed test for DEBUG in /etc/sysprofile and /etc/syslogout -- Paul Seelig Fri, 21 Dec 2001 23:54:11 +0200 sysprofile (0.3.2) unstable; urgency=low * Fixed some of the lintian errors which are listed at "http://lintian.debian.org/reports/mPaul_Seelig.html". * Added a debugging facility to both sysprofile and syslogout. * Included even more example *.bash files. -- Paul Seelig Wed, 19 Dec 2001 21:04:57 +0200 sysprofile (0.3.1) unstable; urgency=low * Fixed faulty su syntax in Xreset examples and added an if statement to the "sysprofile.d/logout.bash" example file. * Added a note to both the sysprofile/syslogout README.* and man pages hinting at each others reverse functionality. * Enhanced debugging facilities in both 00Standard.bash files. * Added a few notes to TODO file. * Added "syslogout.d/rmpgppass.bash" example file. * Added "syslogout.d/netscape.bash" as unified replacement for the {communicator,navigator}.bash example files and slightly enhanced the "syslogout.d/wperfect.bash" example file. -- Paul Seelig Thu, 04 Oct 2001 18:04:16 +0200 sysprofile (0.3.0) unstable; urgency=low * Added a commented out if statement which, if uncommented, might be helpful for debugging to "/etc/sys{profile,logout}.d/00Standard.bash". * Removed unnecessary X resource file "/etc/X11/Xresources/Sysprofile". * Decreased verbosity of postinst scripts. sysprofile (0.2.9) unstable; urgency=low * Got rid again of syslogin package to avoid confusion and keeping sysprofile's functions. * Polished documentation for syslogout and sysprofile. * Made sysprofile recommend syslogout. * Has never been released or uploaded. sysprofile (0.2.8) unstable; urgency=low * Split sysprofile into three packages: syslogin, syslogout and sysprofile (the installer package for the former ones). * Has not been released or even uploaded. -- Paul Seelig Tue, 02 Oct 2001 13:56:35 +0200 sysprofile (0.2.7) unstable; urgency=low * Rearranged /etc/sysprofile for better distinction between system wide and private user defined scripts. -- Paul Seelig Sun, 29 Oct 2000 17:30:49 +0200 sysprofile (0.2.6) unstable; urgency=low * Commented out *loginShell entry in /etc/X11/Xresources/Sysprofile to leave it's enabling to the local sysadmin's discretion. Maybe it should be rather removed since there already is the option of /etc/bash.bashrc instead? * Updated README.usage about using the /etc/bash.bashrc file. * Added a warning in debian/README.* to Debian package maintainers not to rely on the existence of sysprofile for their own packages. -- Paul Seelig Sun, 24 Sep 2000 16:39:56 +0200 sysprofile (0.2.5) unstable; urgency=low * Added hint to add entry for sourcing sysprofile into systemwide /etc/bash.bashrc for non-login bash shells. Unfortunately wterm doesn't bother about the X resource *LoginShell/*loginShell at all. :-/ * Added a test for sysprofile in /etc/bash.bashrc to debian/postinst. * Updated some example files. -- Paul Seelig Sun, 24 Sep 2000 03:34:21 +0200 sysprofile (0.2.4) unstable; urgency=low * Corrected entry "*LoginShell" in etc/X11/Xresources to "*loginShell" because wterm wouldn't start up with login shell settings this way. * Added test for a sysprofile entry in /etc/X11/Xsession to debian/postinstall and a suggestion to insert some lines for sourcing /etc/sysprofile if not present. -- Paul Seelig Sun, 24 Sep 2000 00:31:04 +0200 sysprofile (0.2.3) unstable; urgency=low * Simplified debian/rules * Updated debian/TODO * Minor formatting changes to the manual page -- Paul Seelig Fri, 22 Sep 2000 07:12:36 +0200 sysprofile (0.2.2) unstable; urgency=low * Fixed section in debian/control * Further enhancements to the manual page * Package is lintian clean -- Paul Seelig Thu, 21 Sep 2000 07:12:36 +0200 sysprofile (0.2.1) unstable; urgency=low * Updated standards version. * Put sample files in examples subdirectory * Added debian/conffiles * Simplified debian/rules * Extended manual page with informations about how single users can completely or partly disable/adapt the systemwide mechanism. -- Paul Seelig Wed, 20 Sep 2000 23:34:13 +0200 sysprofile (0.2.0) unstable; urgency=low * Removed the xsysprofile package and Xresources samples since it's functionality is already part of the Debian X11 packages. * Stripped the messaging functionality because there exist other packages for this need. * Deleted the "adduser.local" and "userdel.local" scripts again to stay within the primary scope of this package. * Changed description line in debian/control. * Made sysprofile conflict with xsysprofile (not officially released). * First official upload to Incoming. -- Paul Seelig Mon, 18 Sep 2000 19:21:14 +0100 sysprofile (0.1.1) unstable; urgency=low * Added the scripts "adduser.local" and "userdel.local" into /usr/local/sbin/. -- Paul Seelig Mon, 03 May 1999 13:59:31 +0100 sysprofile (0.1.0) unstable; urgency=low * Modified "/etc/X11/Xsysprofile" to only display /etc/message if present and renamed it to "/etc/X11/Xmessage". -- Paul Seelig Sun, 02 May 1999 17:40:49 +0100 sysprofile (0.0.15) unstable; urgency=low * Changed "Recommends" to "Suggests" in debian/control file * Adapted xsysprofile to use the new app-resources mechanism of slink's XFree86-3.3.2.3a via "/etc/X11/Xresources/". -- Paul Seelig Sat, 01 May 1999 16:59:43 +0100 sysprofile (0.0.14) unstable; urgency=low * Fixed the severely buggy "/etc/sysprofile" (puts paper bag with an extra dark shade of brown over head...). * Removed the debug output redirection from "/etc/*/*sysprofile". * Polished some of the sample scripts and removed the bash_logout and logoutrm.script stuff. * Updated the manual pages and README files to reflect the current state of the package. -- Paul Seelig Sun, 28 Feb 1999 23:53:14 +0100 sysprofile (0.0.13) unstable; urgency=low * Removed the sample script "manpath.sh" since Debian already has "/etc/manpath.conf" and the worse than bad "bashrc.sh" sample. * Removed the which-calls from /etc/sysprofile and sample scripts. * Corrected the "visual.sh" sample file to really refer to VISUAL. * Completely removed any dependency on /etc/environment for both sysprofile and xsysprofile. Now it will only be sourced from within /etc/profile and the standard X resource setting for LoginShell has been set to "True" to assure that /etc/profile is sourced by terminal emulators like xterm or rxvt within an X session. No need to abuse /etc/environment for this. Thanks to Andreas Jellinghaus and Michael Bramer for pointing this out to me. * Completely reorganized the source tree and build process. * The last version was not uploaded to master because it actually had the full potential for a 'brown paper bag' release. ;-) -- Paul Seelig Fri, 26 Feb 1999 23:53:14 +0100 sysprofile (0.0.12) unstable; urgency=low * Tried to find a way to make the 'logoutrm.script' more fault tolerant but didn't really succeed. :-/ Basically it has to be assured, that $USER has no other shell running and is really logged out. For this has to be taken into account that he might still be running X11 but with no shell open in an xterm (or any variant thereof). Well, it's in the "/usr/doc/sysprofile/samples" directory and maybe someone else finds a better solution... * Removed the interactive postinst routine because this is the most evil aspect of the Debian installation routine and should be avoided like the plague IMHO if at all possible. * This is the first version i will upload to master and i hope it is not one of those ill-famed 'brown paper bag' releases. ;-) -- Paul Seelig Fri, 26 Feb 1999 23:53:14 +0100 sysprofile (0.0.11) unstable; urgency=low * Dumped the actually useless check for $DISPLAY in '/etc/sysprofile' and in "/etc/X11/Xsysprofile" because it has proven to be unnecessary. * Merged '/etc/sysprofile.d/message.script' into '/etc/sysprofile' and included checks for the size of /etc/message and the most appropriate pager (cat, less or more) to use for display of /etc/message at login. * Included checks for most appropriate X11 pager (xmessage, xless or just plain rxvt/xterm -e less) to use for display of /etc/message at login in /etc/X11/Xsysprofile. * Included a variable definition for the logfile used for debugging in both /etc/sysprofile ($DEBUGLOG) and /etc/X11/Xsysprofile ($XDEBUGLOG). This makes switching to other output files (or /dev/null) easier. * Since variables are a Good Thing[tm] anway i've defined $DEBUGTIME as well in just the same places. * Redid the $DEBUGLOG rewriting rules in '/etc/sysprofile' to only overwrite $DEBUGLOG if $USER is not already logged in and to simply append any further debugging output if he already is. -- Paul Seelig Fri, 26 Feb 1999 19:56:31 +0100 sysprofile (0.0.10) unstable; urgency=low * Made the postinst routine default to "no" when asking whether /etc/profile and /etc/environment.sh should be changed. * Moved sample scripts and app-default files into the respective "/usr/doc/*sysprofile/samples/" directory so that only the blank mechanism gets installed. This is for a first test balloon upload to master later. -- Paul Seelig Fri, 26 Feb 1999 09:32:27 +0100 sysprofile (0.0.9) unstable; urgency=low * Split 'sysprofile' package into a shell version under it's original name and a X11 version called 'xsysprofile'. * Rewrote manual page and created a derived one for 'xsysprofile'. * Moved 'Xsysprofile.sh' from '/etc/X11/xresources.d/' one level up into the more appropriate '/etc/X11/Xsysprofile' and corrected all relevant scripts. -- Paul Seelig Thu, 25 Feb 1999 19:03:08 +0100 sysprofile (0.0.8) unstable; urgency=low * Renamed "/etc/X11/xresources.d/" to "/etc/X11/xsysprofile.d/" and changed all relevant scripts in this regard. * Included a check for a proper entry for "Xsysprofile.sh" execution in "/etc/X11/Xsession" in debian/postinst. -- Paul Seelig Thu, 25 Feb 1999 18:14:31 +0100 sysprofile (0.0.7) unstable; urgency=low * Replaced both scripts "/etc/X11/xresources.d/Xresources.sh" and "/etc/X11/xresources.d/Xmessage.sh" with a far simpler single script "/etc/X11/xresources.d/Xsysprofile.sh". * The scripts in "/etc/X11/xresources.d/" and "/etc/sysprofile.d" have been considerably refined and simplified. * The debian/postinst script now contains a more explicit hint about how to manually change "/etc/X11/Xsession" to take advantage of the "/etc/X11/xresources.d/Xsysprofile.sh" script. -- Paul Seelig Thu, 25 Feb 1999 14:12:33 +0100 sysprofile (0.0.6) unstable; urgency=low * Removed the necessity to create "$HOME/.acknowledged" as a means to test if user is already logged in and replaced it with a bash shell function. * Changed /etc/logoutrm.script to use the same shell functions and cleaned it from some obsolete functions. -- Paul Seelig Thu, 25 Feb 1999 08:23:48 +0100 sysprofile (0.0.5) unstable; urgency=low * Split a few app default files in "/etc/X11/xresources.d" into application specific modules with a .defs suffix and a generic NeXT-like master style file with an .ad suffix, which sources the .defs files via include command. This is actually just a crude example but it serves it's purpose well enough. * Added a recommendation for the nextaw package in debian/control. * Changed debian/postinst to make use of /etc/environment instead of /etc/profile for triggering /etc/sysprofile. This adds the advantage that /etc/X11/Xsession can parse this file as well. -- Paul Seelig Wed, 24 Feb 1999 16:51:23 +0100 sysprofile (0.0.4) unstable; urgency=low * Renamed "/etc/X11/xappstyle.d" to "/etc/X11/xresources.d" to make it's obvious function explicit by proper intuitive naming. * Moved X11 specific scripts from "/etc/sysprofile.d" to the better suited "/etc/X11/xresources.d/" directory. * Made "/etc/X11/Xsession" execute "/etc/X11/xresources.d/*.sh". * Included a nice sample message to use for testing. ;-) * Included debian/BUGS, debian/TODO, debian/README.Xsession and debian/Xsession.sample. * Added a warning to possibly naive users into control file. -- Paul Seelig Wed, 24 Feb 1999 04:44:52 +0100 sysprofile (0.0.3) unstable; urgency=low * Renamed "/etc/profile.d" to the more obvious "/etc/sysprofile.d" and "/etc/X11/xappstyle" to "/etc/X11/xappstyle.d". This mainly serves as reservation of an own name space to avoid possible name conflicts with packages using "/etc/profile.d" too. * Renamed some files in "/etc/sysprofile.d" to explicitly show that they are mainly related to bash. * Wrote a small manual page for sysprofile(8). -- Paul Seelig Tue, 23 Feb 1999 10:06:35 +0100 sysprofile (0.0.2) unstable; urgency=low * Second try. Now contains a mechanism for sourcing private user settings instead of system default which automagically overide any system administrator's preconfigurations if present. * Added a postinst script for appending the necessary entries into "/etc/profile" to enable sourcing of "/etc/profile.d/". * Renamed "/etc/preprofile" to the more obvious "/etc/sysprofile". * Added a mechanism to source single X11 app default files. Seems to be good enough to create basic themes. Still needs lots of thought though. -- Paul Seelig Mon, 22 Feb 1999 07:49:05 +0100 sysprofile (0.0.1) unstable; urgency=low * First trial version. This is not at all useable and should be considered alpha state. -- Paul Seelig Wed, 17 Feb 1999 15:20:57 +0100 Local variables: mode: debian-changelog End: sysprofile-0.3.9/debian/syslogout.manpages0000644000000000000000000000003712626347556015637 0ustar usr/share/man/man8/syslogout.8 sysprofile-0.3.9/debian/compat0000644000000000000000000000000212626336743013244 0ustar 9 sysprofile-0.3.9/debian/syslogout.README.Debian0000644000000000000000000000432307357107454016160 0ustar syslogout for Debian ---------------------- The package "syslogout" is a modular centralized logout configuration for the bash shell within a Debian Linux system. It's main component is the directory "/etc/syslogout.d/" which contains small shell script modules executed at logout of each user. The contents of "/etc/syslogout.d/" serve to establish a system wide mechanism to execute e.g. clean up routines after each user's logout. While some assorted sample shell script modules are provided as examples, the main accent lies on the implementation of a flexible modular mechanism instead of a specific but limited configuration setting which doesn't match anything but its author's own systems. The syslogout mechanism appears to be quite usable and has actually been used successfully for more than a year. It still lacks further thought and polishing by peer review, though. Just take this here as a first sample implementation of an idea for now. Please examine and test it closely before any serious use and share any criticism, corrections and hopefully additions with all of us. Especially nice would be the addition of somewhat equivalent settings for other shells like (t)csh, ksh or zsh, since this package primarily works for bash and has not been tested otherwise. If you need a similar mechanism for executing code at login time please check out the related package "sysprofile" by yours truly, which is a very close companion to "syslogout". Debian package maintainers please note: --------------------------------------- Never *ever* rely on the existence of syslogout on a system for your own Debian packages. The syslogout mechanism is and should stay an optional tool for local sysadmins only. Massimo Dal Zotto has developed a similar package called "shellrc" which provides functionality not only for bash. It is hopefully still available from "http://www.cs.unitn.it/~dz/debian/". If you happen to become inspired enough to make something really useful out of this package i would be glad to hand over maintenance. I just tried to hack something i could use for my own purposes and because i didn't find anything equally simple to use. Paul Seelig , Mon, 01 Oct 2001 21:13:54 +0200 sysprofile-0.3.9/debian/control0000644000000000000000000000200312626352014013431 0ustar Source: sysprofile Section: admin Priority: optional Build-Depends-Indep: debhelper (>= 9) Maintainer: Debian QA Group Standards-Version: 3.9.6 Package: sysprofile Architecture: all Section: admin Priority: optional Depends: ${misc:Depends} Recommends: syslogout Description: Modularized system wide shell configuration mechanism Simple centralized configuration mechanism for flexible maintenance of the shell specific parts for login to a Debian system. . It has been designed to work with bash. Other shells have not been taken in consideration for this version. Package: syslogout Architecture: all Section: admin Priority: optional Depends: ${misc:Depends} Recommends: sysprofile Description: Modularized system wide shell logout mechanism Simple centralized configuration mechanism for flexible maintenance of the shell specific parts for logout from a Debian system. . It has been designed to work with bash. Other shells have not been taken in consideration for this version. sysprofile-0.3.9/debian/rules0000755000000000000000000000003612626346505013122 0ustar #!/usr/bin/make -f %: dh $@ sysprofile-0.3.9/debian/syslogout.postinst0000644000000000000000000000010207410173046015702 0ustar #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin set -e #DEBHELPER# sysprofile-0.3.9/debian/copyright0000644000000000000000000000075312626351235013777 0ustar This package was created on Wed, 17 Feb 1999 15:20:57 +0100 for the Debian Linux system and extended with the syslogout mechanism on Tue, 02 Oct 2001 13:56:35 +0200 by Paul Seelig . Upstream Author: Paul Seelig Copyright: Paul Seelig Licensing: Dual licensed under both the GPL and BSD licenses. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. sysprofile-0.3.9/debian/sysprofile.examples0000644000000000000000000000004712626350363016000 0ustar usr/share/doc/sysprofile/examples/etc/ sysprofile-0.3.9/debian/syslogout.docs0000644000000000000000000000007512626350730014762 0ustar debian/BUGS debian/TODO usr/share/doc/syslogout/README.usage sysprofile-0.3.9/debian/syslogout.examples0000644000000000000000000000004612626350377015655 0ustar usr/share/doc/syslogout/examples/etc/ sysprofile-0.3.9/debian/sysprofile.manpages0000644000000000000000000000004012626347565015760 0ustar usr/share/man/man8/sysprofile.8 sysprofile-0.3.9/debian/sysprofile.install0000644000000000000000000000011012626347141015617 0ustar etc/sysprofile /etc etc/sysprofile.d/00Standard.bash /etc/sysprofile.d/ sysprofile-0.3.9/debian/BUGS0000644000000000000000000000024107163227536012525 0ustar BUGS ---- Lots of 'em probably! ;-) Ideas anyone? Any improvements, additions or at least constructive critizism (i take patches too BTW ;) are very welcome. sysprofile-0.3.9/usr/0000755000000000000000000000000007162226457011434 5ustar sysprofile-0.3.9/usr/share/0000755000000000000000000000000007162623523012531 5ustar sysprofile-0.3.9/usr/share/man/0000755000000000000000000000000007162623523013304 5ustar sysprofile-0.3.9/usr/share/man/man8/0000755000000000000000000000000007356311736014154 5ustar sysprofile-0.3.9/usr/share/man/man8/syslogout.80000644000000000000000000000714507357110653016320 0ustar .TH SYSLOGOUT 8 .SH NAME syslogout \- modular centralized shell logout mechanism .br .SH "DESCRIPTION" .BR syslogout is a generic approach to enable centralized shell logout actions for all users of a given system in a modular and centralized way mostly aimed at avoiding work for lazy sysadmins. It has only been tested to work with the bash shell. .PP It basically consists of the small .B /etc/syslogout shell script which invokes other small shell scripts having a .B .bash suffix which are contained in the .B /etc/syslogout.d/ directory. The system administrator can drop in any script he wants without any naming convention other than that the scripts need to have a .bash suffix to enable automagic sourcing by the .B /etc/syslogout script. For shell sessions, the contents of .B /etc/syslogout.d/" will be sourced by every user at logout if the following lines are present in his .B $HOME/.bash_logout: if [ -f /etc/syslogout ]; then . /etc/syslogout fi If used for X sessions it is advisable to include the former statement into the .B Xreset script of the X display manager instead to prevent that closing of an terminal emulator window yields unexpected results in your running X session if your X11 terminal emulator is using a login shell. Be sure then to run it under the user-id of the X session's user. See the example files in .B /usr/share/doc/syslogout/ for illustration. Users not wanting .B /etc/syslogout to be sourced for their environment can easily disable it's automatic mechanism. It can be disabled by simply creating an empty file called .B $HOME/.nosyslogout in the user's home directory using e.g. the .B touch(1) command. Any single configuration file in .B /etc/syslogout.d/ can simply be overridden by any user by creating a private .B $HOME/.syslogout.d/ directory which may contain a user's own version of any configuration file to be sourced instead of the system default. It's names have just to match exactly the system's default .B /etc/syslogout.d/ configuration files. Empty versions of these files contained in the .B $HOME/.syslogout.d/ directory automatically disable sourcing of the system wide version. Naturally, users can add and include their own private scripts to be automagically executed by .B /etc/syslogout at logout time. .SH OPTIONS There are no options other than those dictated by shell conventions. Anything is defined within the configuration scripts themselves. .SH "SEE ALSO" The README files and configuration examples contained in .B /usr/share/doc/syslogout/ and the manual page for .B bash(1), .B xdm(1x), .B xdm.options(5), and .B wdm(1x). Recommended further reading is everything related with shell programming. If you need a similar mechanism for executing code at login time check out the related package .B sysprofile(8) which is a very close companion to .B syslogout. .SH BUGS .B syslogout in its current form is mainly restricted to .B bash(1) syntax. In fact it is actually a rather embarrassing quick and dirty hack than anything else - but it works. It serves the practical need to enable a centralized bash configuration until something better becomes available. Your constructive criticism in making this into something better" is very welcome. Before i forget to mention it: we take patches... ;-) .SH AUTHOR .B syslogout was developed by Paul Seelig specifically for the Debian GNU/Linux system. Feel free to port it to and use it anywhere else under the conditions of either the GNU public license or the BSD license or both. Better yet, please help to make it into something more worthwhile than it currently is. sysprofile-0.3.9/usr/share/man/man8/sysprofile.80000644000000000000000000000736107357110707016447 0ustar .TH SYSPROFILE 8 .SH NAME sysprofile \- modular centralized shell configuration .br .SH "DESCRIPTION" .BR sysprofile is a generic approach to configure shell settings in a modular and centralized way mostly aimed at avoiding work for lazy sysadmins. It has only been tested to work with the bash shell. .PP It basically consists of the small .B /etc/sysprofile shell script which invokes other small shell scripts having a .B .bash suffix which are contained in the .B /etc/sysprofile.d/ directory. The system administrator can drop in any script he wants without any naming convention other than that the scripts need to have a .bash suffix to enable automagic sourcing by .B /etc/sysprofile. This mechanism is set up by inserting a small shell routine into .B /etc/profile for login shells and optionally into .B /etc/bashrc and/or .B /etc/bash.bashrc for non-login shells from where the actual .B /etc/sysprofile script is invoked: if [ -f /etc/sysprofile ]; then . /etc/sysprofile fi For using "sysprofile" under X11, one can source it in a similar way from .B /etc/X11/Xsession or your X display manager's .B Xsession file to provide the same shell environment as under the console in X11. See the example files in .B /usr/share/doc/sysprofile/ for illustration. For usage of terminal emulators with a non-login bash shell under X11, take care to enable sysprofile via .B /etc/bash.bashrc. If not set this way, your terminal emulators won't come up with the environment defined by the scripts in .B /etc/sysprofile.d/. Users not wanting .B /etc/sysprofile to be sourced for their environment can easily disable it's automatic mechanism. It can be disabled by simply creating an empty file called .B $HOME/.nosysprofile in the user's home directory using e.g. the .B touch(1) command. Any single configuration file in .B /etc/sysprofile.d/ can be overridden by any user by creating a private .B $HOME/.sysprofile.d/ directory which may contain a user's own version of any configuration file to be sourced instead of the system default. It's names have just to match exactly the system's default .B /etc/sysprofile.d/ configuration files. Empty versions of these files contained in the .B $HOME/.sysprofile.d/ directory automatically disable sourcing of the system wide version. Naturally, users can add and include their own private script inventions to be automagically executed by .B /etc/sysprofile at login time. .SH OPTIONS There are no options other than those dictated by shell conventions. Anything is defined within the configuration scripts themselves. .SH "SEE ALSO" The README files and configuration examples contained in .B /etc/sysprofile.d/ and the manual pages .B bash(1), .B xdm(1x), .B xdm.options(5), and .B wdm(1x). Recommended further reading is everything related with shell programming. If you need a similar mechanism for executing code at logout time check out the related package .B syslogout(8) which is a very close companion to .B sysprofile. .SH BUGS .B sysprofile in its current form is mainly restricted to .B bash(1) syntax. In fact it is actually a rather embarrassing quick and dirty hack than anything else - but it works. It serves the practical need to enable a centralized bash configuration until something better becomes available. Your constructive criticism in making this into something better" is very welcome. Before i forget to mention it: we take patches... ;-) .SH AUTHOR .B sysprofile was developed by Paul Seelig specifically for the Debian GNU/Linux system. Feel free to port it to and use it anywhere else under the conditions of either the GNU public license or the BSD license or both. Better yet, please help to make it into something more worthwhile than it currently is.sysprofile-0.3.9/usr/share/doc/0000755000000000000000000000000007356311402013271 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/0000755000000000000000000000000007163404540015472 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/README.usage0000644000000000000000000000373507357107540017472 0ustar Place any shell scripts containing your own preconfigurations into the "/etc/sysprofile.d/" directory. They will be sourced by every user at login if the following lines are present in "/etc/profile" (for login shells) and "/etc/bash.bashrc" (for non-login shells): if [ -f /etc/sysprofile ]; then . /etc/sysprofile fi Any files in "/etc/sysprofile.d/" without the .bash suffix will be simply ignored. For "sysprofile", it might be useful to source it the same way from "/etc/X11/Xsession" or your X display manager's Xsession file to provide the same shell environment as under the console in X11 too. See the example files in "/usr/share/doc/sysprofile/" for illustration. Under X11, for usage of terminal emulators with a non-login bash shell take care to enable sysprofile via "/etc/bash.bashrc". If not set this way, your terminal emulators won't come up with the environment defined by the scripts in "/etc/sysprofile.d/". Users wanting to exclusively use their own private configurations can simply touch the file "$HOME/.nosysprofile" to stay practically unaffected by the sysadmin's silly musings. Alternatively users can set up their own "$HOME/.sysprofile.d/" directory containing private versions of the *.bash files contained in "/etc/sysprofile.d/" which will automagically be preferred over the the system wide version. To disable sourcing of a single specific systemwide shell configuration file it is sufficient to create an empty version of it in "$HOME/.sysprofile.d/". If you need a similar mechanism for executing code at logout time please check out the related package "syslogout" by yours truly, which is a very close companion to "sysprofile". Package maintainers should please never ever rely on the existence of "sysprofile" on a system for their own Debian packages. The "sysprofile" mechanism is and should stay an optional tool for local sysadmins only. Feedback, additions and any improvements are happily appreciated by the current package maintainer. sysprofile-0.3.9/usr/share/doc/sysprofile/examples/0000755000000000000000000000000007356111447017315 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/0000755000000000000000000000000007410166136020064 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/0000755000000000000000000000000007410170457022506 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/umask.bash0000644000000000000000000000011107162226457024464 0ustar # The default umask. See "man (1) builtins" for explanation. umask 002 sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/editclient.bash0000644000000000000000000000045207162363061025471 0ustar # Define here the most appropriate editor for all. # Any complaints about the order of arguments go # immediately to "/dev/null". If you don't like # the ordering then just change it. if [ -x $HOME/bin/editclient ]; then export EDITOR=editclient else . /etc/sysprofile.d/editor.bash fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/nntp.bash0000644000000000000000000000011107163256351024320 0ustar # Define the server used for news reading: #export NNTPSERVER=localhost sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/pager.bash0000644000000000000000000000025007162226457024446 0ustar # The pager is used for viewing files and is used for displaying manual # pages as well. The following settings defines the use of "less". #set -x export PAGER=less sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/bash_history.bash0000644000000000000000000000065207162226457026054 0ustar # This defines the number of remembered commands and size of the history # file. Lazy people like large history file contents. ;-) #set -x # Defines the number of commands that will be remembered. export HISTSIZE=5000 export HISTFILESIZE=5000 # The "ignoreboth" option ignores any double entry and makes sure that a # command with a leading blank is not inluded in the history file at all. export HISTCONTROL=ignoreboth sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/path.bash0000644000000000000000000000032307162226457024305 0ustar # This should rather be defined already in "/etc/profile". # Use this only for adding to or overriding "$PATH". Note # that root needs different PATH settings than normal users. #export PATH="$PATH:$HOME/bin" sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/dircolors.bash0000644000000000000000000000071006730536154025347 0ustar LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:ex=01;35:*.cmd=01;32:*.dvi=00;35:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=00;31:*.tgz=00;31:*.tar.gz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.deb=00;32:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.mpg=00;37:*.avi=00;37:*.gl=00;37:*.dl=00;37:'; export LS_COLORS sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/ignoreof.bash0000644000000000000000000000012107162226457025155 0ustar # This prevents a logout with just a single ctrl-d: #set -x export IGNOREEOF=1 sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/editor.bash0000644000000000000000000000104007162226457024634 0ustar # Define here the most appropriate editor for all. # Any complaints about the order of arguments go # immediately to "/dev/null". If you don't like # the ordering then just change it. #set -x if [ -x /usr/bin/mcedit ]; then export EDITOR=mcedit elif [ -x /usr/bin/vi ]; then export EDITOR=vi elif [ -x /usr/bin/elvis-tiny ]; then export EDITOR=elvis-tiny elif [ -x /usr/bin/jed ]; then export EDITOR=jed elif [ -x /usr/bin/emacs ]; then export EDITOR=emacs elif [ -x /usr/bin/xemacs ]; then export EDITOR=xemacs fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/ulimit.bash0000644000000000000000000000127707162226457024665 0ustar # The default ulimit. See "man (1) builtins" for explanation. # # Usage: ulimit [--SHacdflmnpstuv [limit]] # # Provides control over the resources available to the shell and to # processes started by it. The value of "limit" can be a number in the # unit specified for the resource, or the value "unlimited". # # Just a few selected options: # # -c The maximum size of core files created # -f The maximum size of files created by the shell # -l The maximum size that may be locked into memory # -t The maximum amount of cpu time in seconds # -u The maximum number of processes available to a single user # This is for those living on the edge - no limits! ;-) #ulimit unlimited sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/sysnews.bash0000644000000000000000000000013107162226457025061 0ustar # Executing news from the nice sysnews package if [ -x `which news` ]; then news fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/kde.bash0000644000000000000000000000006107162226457024113 0ustar # This is for KDE specific environment variables sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/locale.bash0000644000000000000000000000010307275057417024607 0ustar #export LC_ALL=de_DE #export LANG=C.iso88591 export LC_CTYPE=de_DE sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/visual.bash0000644000000000000000000000104007162226457024651 0ustar # Define here the most appropriate VISUAL for all. # Any complaints about the order of arguments go # immediately to "/dev/null". If you don't like # the ordering then just change it. #set -x if [ -x /usr/bin/mcedit ]; then export VISUAL=mcedit elif [ -x /usr/bin/vi ]; then export VISUAL=vi elif [ -x /usr/bin/elvis-tiny ]; then export VISUAL=elvis-tiny elif [ -x /usr/bin/jed ]; then export VISUAL=jed elif [ -x /usr/bin/emacs ]; then export VISUAL=emacs elif [ -x /usr/bin/xemacs ]; then export VISUAL=xemacs fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/gnustep.bash0000644000000000000000000000033507424326431025033 0ustar # This is for setting GNUstep specific environment variables #set -x if [ ! $GNUSTEP_ROOT ] && [ -f /usr/lib/GNUstep/System/Makefiles/GNUstep.sh ]; then . /usr/lib/GNUstep/System/Makefiles/GNUstep.sh &>/dev/null fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/proxies.bash0000644000000000000000000000012107410170531025021 0ustar ftp_proxy=http://some-proxy.near.you:80 http_proxy=http://some-proxy.near.you:80 sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/printer.bash0000644000000000000000000000006607162226457025040 0ustar # Define the default system printer in here. #set -x sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/bash_prompt.bash0000644000000000000000000000020207162226457025663 0ustar # It's nice to know in which directory one is working # in without having to resort to /bin/pwd #set -x export PS1='[\u]\w > ' sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/logout.bash0000644000000000000000000000012107356075201024650 0ustar if [ ! -f $HOME/.bash_logout ] then cp /etc/skel/.bash_logout $HOME fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/mc.bash0000644000000000000000000000150707674662600023757 0ustar # With this configuration setting the GNU Midnight Commander leaves you # to stay right at the same spot you were last upon quit. #set -x # If you prefer MC in monochrome # then just uncomment this: #unset COLORTERM #unset COLORFGBG if [ `echo $TERM` != emacs ] && [ `echo $TERM` != dumb ]; then # This works only with mc-4.6.0 and above: mc () { MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$" /usr/bin/mc -bP "$MC_PWD_FILE" "$@" if test -r "$MC_PWD_FILE"; then MC_PWD="`cat $MC_PWD_FILE`" if test -n "$MC_PWD" && test -d "$MC_PWD"; then cd "$MC_PWD" fi unset MC_PWD fi rm -f "$MC_PWD_FILE" unset MC_PWD_FILE } # This works only for mc-4.5.x or lower: # #mc () #{ # mkdir -p ~/.mc/tmp 2> /dev/null # chmod 700 ~/.mc/tmp # MC=~/.mc/tmp/mc-$$ # /usr/bin/mc -P "$@" > "$MC" # cd "`cat $MC`" # rm "$MC" # unset MC; #} fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/less.bash0000644000000000000000000000051107143112125024277 0ustar # See "man less" for details of further customization #set -x # assures the correct displaying of 8-bit # characters in the latin1 charset. export LESSCHARSET=latin1 # This option regulates the verbosity of "less". export LESS=-MM # enables browsing of .deb, .rpm,. tar.gz, etc. with less only eval `/usr/bin/lesspipe` sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/composekey.bash0000644000000000000000000000024707410164023025516 0ustar # Defining a compose key for the console: if [ ! TERM = xterm-debian ]; then loadkeys </dev/null sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/alias.bash0000644000000000000000000000154707400531567024447 0ustar # See either "man alias" or "man bash_builtins" for # further explanation of the shell's alias mechanism. # Some random aliases: alias lo='clear;logout' alias startx='startx 2> ~/.X.err 1> ~/.X.out &' alias xwin='startx; logout' alias ll='ls -l' # Some things don't function properly if TERM=emacs if [ `echo $TERM` != emacs ] && [ `echo $TERM` != dumb ]; then alias man='man -P less' alias ls='ls --color=auto ' alias v='vdir --color=auto' else alias v='/bin/ls -l' alias man='echo -e "Please use \"M-x manual-entry RET manpage\"\nto read the manual page for"' fi # A few abbreviations for using recode if [ `which recode` ]; then alias atari2unix='recode AtariST..latin1' alias unix2dos='recode lat1..ibmpc' alias dos2unix='recode ibmpc..lat1' fi # Sourcing all private aliases: if [ -f ~/.alias ]; then . ~/.alias fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/lscolors.bash0000644000000000000000000000075507162226457025222 0ustar # Some people like colored listings: #set -x export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:ex=01;32:*.cmd=01;32:*.dvi=00;35:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.tar=00;31:*.tgz=00;31:*.tar.gz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.deb=00;32:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.ppm=00;35:*.tga=00;35:*.xbm=00;35:*.xpm=00;35:*.tif=00;35:*.mpg=00;37:*.avi=00;37:*.gl=00;37:*.dl=00;37:'; sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/lang.bash0000644000000000000000000000004107162226457024267 0ustar # The default language settings: sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/gnome.bash0000644000000000000000000000006307162226457024457 0ustar # This is for GNOME specific environment variables sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/sysprofile.d/display.bash0000644000000000000000000000042107361076026025011 0ustar # XEmacs 21.4.4 takes a long nslookup time to find display. # This here shortens it's startup time for local display. # # If xlock complains with "can not lock 127.0.0.1's display", # use it adding the options "-remote -display 127.0.01:0.0". export DISPLAY=127.0.0.1:0.0 sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/profile0000644000000000000000000000063107674667663021476 0ustar # /etc/profile: system-wide .profile file for bash(1). if [ -f /etc/sysprofile ]; then if [ `grep -x ^SYSDEBUG=1 /etc/sysprofile` ]; then if [ ! -d /var/tmp/sysprofile ]; then mkdir -m 1777 /var/tmp/sysprofile touch /var/tmp/sysprofile/$USER chmod 600 /var/tmp/sysprofile/$USER fi . /etc/sysprofile >> /var/tmp/sysprofile/$USER 2>&1 else . /etc/sysprofile fi fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/0000755000000000000000000000000007356311577020447 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/wdm/0000755000000000000000000000000007356431710021226 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/wdm/Xsession.sample0000644000000000000000000000055107357107046024250 0ustar #!/bin/sh # This is an Xsession wrapper for use with wdm to take care of the # handling of the 'NoChange' window manager selection option. # Run /etc/sysprofile before invoking /etc/X11/Xsession if [ -f /etc/sysprofile ]; then . /etc/sysprofile; fi if [ $# -eq 1 ] ; then echo $1 >$HOME/.wm_style ; fi shift ; exec /etc/X11/Xsession `cat $HOME/.wm_style` $@ sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/xdm/0000755000000000000000000000000007356432035021230 5ustar sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/xdm/Xsession.sample0000644000000000000000000000050407357107033024243 0ustar #!/bin/sh # # $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $ # # # # # $XFree86: xc/programs/xdm/config/Xsession,v 1.2 1998/01/11 03:48:32 dawes Exp $ # Run /etc/sysprofile before invoking /etc/X11/Xsession if [ -f /etc/sysprofile ]; then . /etc/sysprofile; fi # invoke global X session script . /etc/X11/Xsession sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/X11/Xsession.sample0000644000000000000000000000731507356426464023475 0ustar #!/bin/sh # # /etc/X11/Xsession # # global Xsession file -- used by both xdm and xinit (startx) ########################################## ##### Inserted for sysprofile usage ###### ##### Don't use this sample file but ##### ##### adapt your own /etc/X11/Xsession ### if [ -f /etc/sysprofile ]; then . /etc/sysprofile fi ##### Inserted for sysprofile usage ###### ########################################## optionfile=/etc/X11/Xsession.options sysmodmap=/etc/X11/Xmodmap usrmodmap=$HOME/.Xmodmap sysresources=/etc/X11/Xresources usrresources=$HOME/.Xresources startup=$HOME/.xsession errfile=$HOME/.xsession-errors startssh= sshagent=/usr/bin/ssh-agent if grep -qs ^use-ssh-agent $optionfile; then if [ -x $sshagent -a -z "$SSH_AUTH_SOCK" ]; then startssh=yes fi fi if touch $errfile 2> /dev/null && [ -w $errfile ]; then chmod 600 "$errfile" elif errfile=$(tempfile 2> /dev/null); then ln -sf "$errfile" "$TMPDIR/xsession-$USER" else # fatal error echo "Xsession: unable to create X session error file. Aborting." exit 1 fi exec > "$errfile" 2>&1 case $# in 0) ;; 1) case "$1" in failsafe) if grep -qs ^allow-failsafe $optionfile; then if [ -e /usr/bin/x-terminal-emulator ]; then if [ -x /usr/bin/x-terminal-emulator ]; then exec x-terminal-emulator -geometry +1+1 else # fatal error echo "Xsession: unable to launch failsafe X session; x-terminal-emulator not" echo " executable. Aborting." exit 1 fi else # fatal error echo "Xsession: unable to launch failsafe X session; x-terminal-emulator not found." echo " Aborting." exit 1 fi fi ;; default) ;; *) program=$(which $1) if [ -e $program ]; then if [ -x $program ]; then startup=$program else echo "Xsession: unable to launch $1 X session; $1 not executable." echo "Xsession: Falling back to default session." fi else echo "Xsession: unable to launch $1 X session; $1 not found." echo "Xsession: Falling back to default session." fi ;; esac ;; *) echo "Xsession: unsupported number of arguments ($#)." echo "Xsession: Falling back to default session." ;; esac if [ -d $sysresources ]; then for resourcefile in $sysresources/*; do if [ -f $resourcefile ]; then if expr $resourcefile : '.*/[[:alnum:]_-]*$' > /dev/null 2>&1; then xrdb -merge $resourcefile fi fi done fi if [ -x /usr/bin/X11/xmodmap ]; then if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi fi if grep -qs ^allow-user-resources $optionfile; then if [ -f $usrresources ]; then xrdb -merge $usrresources fi fi if [ -x /usr/bin/X11/xmodmap ]; then if grep -qs ^allow-user-modmap $optionfile; then if [ -f $usrmodmap ]; then xmodmap $usrmodmap fi fi fi if [ -e $startup ] && grep -qs ^allow-user-xsession $optionfile; then if [ -x $startup ]; then realstartup=$startup else realstartup="sh $startup" fi elif [ -x /usr/bin/x-window-manager ]; then realstartup=x-window-manager fi if [ -z "$realstartup" ]; then if [ -x /usr/bin/x-terminal-emulator ]; then realstartup=x-terminal-emulator else # fatal error echo -n "Xsession: unable to start X session; " if grep -qs ^allow-user-xsession $optionfile; then echo -n "no $startup found, " fi echo "no window managers, and no terminal emulators found." echo " Aborting." exit 1 fi fi if [ "$startssh" ]; then exec $sshagent $realstartup else exec $realstartup fi sysprofile-0.3.9/usr/share/doc/sysprofile/examples/etc/bash.bashrc0000644000000000000000000000072707674667643022220 0ustar # System-wide .bashrc file for interactive bash(1) shells. shopt -s checkwinsize if [ -f /etc/sysprofile ]; then if [ `grep -x ^SYSDEBUG=1 /etc/sysprofile` ]; then if [ ! -d /var/tmp/sysprofile ]; then mkdir -m 1777 /var/tmp/sysprofile touch /var/tmp/sysprofile/$USER chmod 600 /var/tmp/sysprofile/$USER fi . /etc/sysprofile >> /var/tmp/sysprofile/$USER 2>&1 else . /etc/sysprofile fi fi sysprofile-0.3.9/usr/share/doc/syslogout/0000755000000000000000000000000007163404540015343 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/README.usage0000644000000000000000000000404007357314411017326 0ustar Place your shell scripts containing modular configuration items into the "/etc/syslogout.d/" directory. Any files in "/etc/syslogout.d/" without a .bash suffix will be ignored. For shell sessions, the contents of "/etc/syslogout.d/" will be sourced by every user at logout if the following lines are present in his $HOME/.bash_logout: if [ -f /etc/syslogout ]; then . /etc/syslogout fi If used for X sessions it is advisable to include the former statement into the Xreset script of the X display manager instead to prevent that closing of an terminal emulator window yields unexpected results in your running X session if your X11 terminal emulator is using a login shell. Since Xreset is run by root, be sure then to run it under the user-id of the X session's user: ---------------- to include in "/etc/X11/{w,x}dm/Xreset" ------------- # Run /etc/syslogout being $USER su - $USER -c "if [ -f /etc/syslogout ]; then . /etc/syslogout; fi" ---------------- to include in "/etc/X11/{w,x}dm/Xreset" ------------- Users wanting to exclusively use own private configurations can simply touch the file "$HOME/.nosyslogout" to stay practically unaffected by the sysadmin's silly musings. Alternatively users can set up their own "$HOME/.syslogout.d/" directory containing private versions of the *.bash files contained in "/etc/syslogout.d/" which will automagically be preferred over the the system wide version. To disable sourcing of a single specific systemwide shell configuration file it is sufficient create an empty version of it in "$HOME/.syslogout.d/". If you need a similar mechanism for executing code at login time please check out the related package "sysprofile" by yours truly, which is a very close companion to "syslogout". Package maintainers should please never ever rely on the existence of "syslogout" on a system for their own Debian packages. The "syslogout" mechanism is and should stay an optional tool for local sysadmins only. Feedback, additions and any improvements are happily appreciated by the current package maintainer. sysprofile-0.3.9/usr/share/doc/syslogout/examples/0000755000000000000000000000000007356111447017166 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/0000755000000000000000000000000007410163321017726 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/sysprofile.d/0000755000000000000000000000000007410170053022347 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/sysprofile.d/syslogout.bash0000644000000000000000000000026107674667406025306 0ustar # Prevents syslogout logfiles from consuming too much space # Uncomment for debugging: #set -x if [ -f /var/tmp/syslogout/$USER ]; then rm -f /var/tmp/syslogout/$USER fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/sysprofile.d/logout.bash0000644000000000000000000000075007410163377024534 0ustar # For using "syslogout" with X11, better invoke it from out of your # X display manager's Xreset file as explained in README.usage instead # out of "$HOME/.bash_logout". # # For using "syslogout" exclusively in a non-X11 environment you could # use this code here via the "syslogin" package to make sure every user # has a "$HOME/.bash_logout" file: if [ ! -f $HOME/.bash_logout ] then if [ -f /etc/skel/.bash_logout ] then cp /etc/skel/.bash_logout $HOME fi fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/0000755000000000000000000000000007410170151022217 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/corefiles.bash0000644000000000000000000000102507674667314025057 0ustar # Finding and maybe deleting core files in the users's $HOME to # reclaim lost disk space delcores() { set -x for file in `find $HOME -name core -type f -print` do if [ `/usr/bin/file $file | /bin/grep -c "core file"` != 0 ]; then /usr/bin/gdb -batch -q -c $file /bin/ls -l $file #/bin/rm -f $file else echo "File named \"core\" is not a core file" fi done } if [ -d /var/tmp/syslogout ]; then delcores >> /var/tmp/syslogout/$USER 2>&1 & else delcores &> /dev/null & fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/netscape.bash0000644000000000000000000000065307674667323024714 0ustar # These programs sometimes crash and eat # up system resources even after logout. # Uncomment for debugging: #set -x for prog in navigator communicator do if [ "`ps --user $USER | grep -c $prog`" != 0 ]; then if [ -d /var/tmp/syslogout ]; then killall -v -9 $prog-smotif.real\ >> /var/tmp/syslogout/$USER 2>&1 else killall -v -9 $prog-smotif.real\ &> /dev/null fi fi done sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/wperfect.bash0000644000000000000000000000124407674667370024730 0ustar # WordPerfect sometimes refuses to quit: # Uncomment for debugging: #set -x for prog in wpexc do if [ "`ps --user $USER | grep -c $prog`" != 0 ]; then if [ -d /var/tmp/syslogout ]; then killall -v -9 $prog >> /var/tmp/syslogout/$USER 2>&1 else killall -v -9 $prog &> /dev/null fi fi done # Remove the leftovers of a WordPerfect session: if [ -d /tmp/wpc-$HOSTNAME ]; then if [ -d /var/tmp/syslogout ]; then rm -rf `find /tmp -user $USER -maxdepth 1 -name "wpc-$HOSTNAME"`\ >> /var/tmp/syslogout/$USER 2>&1 else rm -rf `find /tmp -user $USER -maxdepth 1 -name "wpc-$HOSTNAME"`\ &> /dev/null fi fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/sysprofile.bash0000644000000000000000000000026407674667336025313 0ustar # Prevents sysprofile logfiles from consuming too much space # Uncomment for debugging: #set -x if [ -f /var/tmp/sysprofile/$USER ]; then rm -f /var/tmp/sysprofile/$USER fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/clearscreen.bash0000644000000000000000000000016007356153575025365 0ustar # when leaving the console clear the screen to increase privacy case "`tty`" in /dev/tty[0-9]*) clear esac sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/backups.bash0000644000000000000000000000042407674667260024536 0ustar # Uncomment for debugging: #set -x BACKUPSCRIPT=/usr/local/sbin/backupscript for dir in $HOME/whatever do if [ -d /var/tmp/syslogout ]; then nohup $BACKUPSCRIPT $dir >> /var/tmp/syslogout/$USER 2>&1 & else nohup $BACKUPSCRIPT $dir &> /dev/null & done fi sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/rmpgppass.bash0000644000000000000000000000034507357154672025120 0ustar # Remove any PGPPASS entries from shell history: # Uncomment for debugging: #set -x sed '/^export PGPPASS/d'\ ~/.bash_history > ~/.bash_history.tmp &&\ mv ~/.bash_history.tmp ~/.bash_history &&\ chmod 640 ~/.bash_history sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/syslogout.d/cleantmp.bash0000644000000000000000000000042507674667277024722 0ustar # Remove the leftovers of $USER in /tmp # Uncomment for debugging: #set -x for file in `find /tmp -user $USER -maxdepth 1 -name "*"` do if [ -d /var/tmp/syslogout ]; then ls -l $file >> /var/tmp/syslogout/$USER else ls -l $file #&> /dev/null fi done sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/X11/0000755000000000000000000000000007356276223020316 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/X11/wdm/0000755000000000000000000000000007356312546021104 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/X11/wdm/Xreset.sample0000644000000000000000000000123207674662301023557 0ustar #!/bin/sh # # /etc/X11/wdm/Xreset # # This script is run as root after any X session ends. #set -x # First run /etc/syslogout being $USER su - $USER -c "if [ -f /etc/syslogout ]; then . /etc/syslogout; fi" # Remove the utmp entry for the session if grep -q ^use-sessreg /etc/X11/wdm/wdm.options; then sessreg -d -l $DISPLAY -u /var/run/utmp -x /etc/X11/wdm/Xservers $USER fi # This must be done here as opposed to in the Xsetup scripts as # they are run after wdm has initialized its session menu, so # any changes made there won't be reflected in the current menu if grep -q ^auto-update-wmlist /etc/X11/wdm/wdm.options; then update_wdm_wmlist fi exit 0 sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/X11/xdm/0000755000000000000000000000000007356312552021102 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/X11/xdm/Xreset.sample0000644000000000000000000000126307674662407023573 0ustar #!/bin/sh # # /etc/X11/xdm/Xreset # # This script is run as root after the X session ends. PATH=$PATH:/usr/bin/X11 HOSTSERVER=$(echo $DISPLAY | cut -d. -f1) PIDFILE=/var/run/xconsole.$HOSTSERVER.pid if [ -e $PIDFILE ]; then PID=$(cat $PIDFILE 2> /dev/null) if [ -n "$PID" ]; then kill $PID 2> /dev/null fi rm $PIDFILE fi # Run /etc/syslogout being $USER su - $USER -c "if [ -f /etc/syslogout ]; then . /etc/syslogout; fi" # remove the utmp entry for the session if grep -qs ^use-sessreg /etc/X11/xdm/xdm.options && command -v sessreg > /dev/null 2>&1; then sessreg -d -l $DISPLAY -u /var/run/utmp -x /etc/X11/xdm/Xservers $USER fi exit 0 # vim:set ai et sts=2 sw=2 tw=0: sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/skel/0000755000000000000000000000000007356107616020702 5ustar sysprofile-0.3.9/usr/share/doc/syslogout/examples/etc/skel/.bash_logout0000644000000000000000000000055607357105636023220 0ustar # This is probably only useful within pure shell environments # and will only create unexepected behaviour under X11 if any # terminal emulator running a login shell is closed. # # For using "syslogout" with X11, better use this code from your # X display manager's Xreset file as explained in README.usage. if [ -f /etc/syslogout ]; then . /etc/syslogout fi sysprofile-0.3.9/etc/0000755000000000000000000000000007356426627011404 5ustar sysprofile-0.3.9/etc/sysprofile.d/0000755000000000000000000000000007356111553014012 5ustar sysprofile-0.3.9/etc/sysprofile.d/00Standard.bash0000644000000000000000000000112607674664103016560 0ustar # This here is for any settings you want. If the contents # become too abundant consider separating them into single # modules. Please do read "/usr/share/doc/sysprofile/README.usage" # for further information. Sample modules can be found in the # samples subdirectory "/usr/share/doc/sysprofile/examples/". # Might be handy for script debugging: #if [ ! -d /var/tmp/sysprofile ]; then # mkdir -m 1777 /var/tmp/sysprofile # touch /var/tmp/sysprofile/$USER # chmod 600 /var/tmp/sysprofile/$USER #else # touch /var/tmp/sysprofile/$USER # chmod 600 /var/tmp/sysprofile/$USER #fi sysprofile-0.3.9/etc/syslogout.d/0000755000000000000000000000000007356113562013665 5ustar sysprofile-0.3.9/etc/syslogout.d/00Standard.bash0000644000000000000000000000111707674664052016434 0ustar # This here is for any settings you want. If the contents # become too abundant consider separating them into single # modules. Please do read "/usr/share/doc/syslogout/README.usage" # for further information. Sample modules can be found in the # samples subdirectory "/usr/share/doc/syslogout/examples/". # Might be handy for script debugging: #if [ ! -d /var/tmp/syslogout ]; then # mkdir -m 1777 /var/tmp/syslogout # touch /var/tmp/syslogout/$USER # chmod 600 /var/tmp/syslogout/$USER #else # touch /var/tmp/syslogout/$USER # chmod 600 /var/tmp/syslogout/$USER #fi sysprofile-0.3.9/etc/sysprofile0000644000000000000000000000216307674663764013540 0ustar # This script first checks for the existence of "$HOME/.nosysprofile" # and simply quits if it exists. If it doesn't exist it further checks # for the directory "/etc/sysprofile.d" which contains all configuraton # scripts to execute. If the latter doesn't exist it just quits without # any unnecessary complaints. # Set SYSDEBUG=1 for debugging: #SYSDEBUG=1 SYSDEBUG=0 # Only run if user doesn't prevent it: if [ ! -f $HOME/.nosysprofile ]; then if [ "$SYSDEBUG" = 1 ]; then if [ ! -d /var/tmp/sysprofile ]; then mkdir -m 1777 /var/tmp/sysprofile touch /var/tmp/sysprofile/$USER chmod 600 /var/tmp/sysprofile/$USER fi fi # First run common system wide scripts if no # user defined version exists: if [ -d /etc/sysprofile.d ]; then for i in `cd /etc/sysprofile.d && echo *.bash` do if [ ! -f $HOME/.sysprofile.d/$i ]; then . /etc/sysprofile.d/$i fi done fi # Then run any existing user defined scripts: if [ -d $HOME/.sysprofile.d ]; then for i in `cd $HOME/.sysprofile.d && echo *.bash` do . $HOME/.sysprofile.d/$i done fi fi sysprofile-0.3.9/etc/syslogout0000644000000000000000000000214707674663754013412 0ustar # This script first checks for the existence of "$HOME/.nosyslogout" # and simply quits if it exists. If it doesn't exist it further checks # for the directory "/etc/syslogout.d" which contains all configuraton # scripts to execute. If the latter doesn't exist it just quits without # any unnecessary complaints. # Set SYSDEBUG=1 for debugging: #SYSDEBUG=1 SYSDEBUG=0 # Only run if user doesn't prevent it: if [ ! -f $HOME/.nosyslogout ]; then if [ "$SYSDEBUG" = 1 ]; then if [ ! -d /var/tmp/syslogout ]; then mkdir -m 1777 /var/tmp/syslogout touch /var/tmp/syslogout/$USER chmod 600 /var/tmp/syslogout/$USER fi fi # First run common system wide scripts if no # user defined version exists: if [ -d /etc/syslogout.d ]; then for i in `cd /etc/syslogout.d && echo *.bash` do if [ ! -f $HOME/.syslogout.d/$i ]; then . /etc/syslogout.d/$i fi done fi # Then run any existing user defined scripts: if [ -d $HOME/.syslogout.d ]; then for i in `cd $HOME/.syslogout.d && echo *.bash` do . $HOME/.syslogout.d/$i done fi fi