Curby's Ultra-Verbose Log-In Scripts README by Michael 'Curby' Lee v1.07.00, 2005-05-06 ====================================================================== - Contents ====================================================================== The rest of this file is divided as follows: - Introduction - Requirements - Where to Download - Installation via Gnu make - Installation via manual file copy - Plugins - Script interactions - QFAO For version information and changelogs, consult the CHANGELOG. ====================================================================== - Introduction ====================================================================== This is a project to standardize all my bash environments with aliases and settings that I use all the time. Since computers and the things I do on them are usually at least somewhat different, I used a plug-in system to customize each environment. ====================================================================== - Requirements ====================================================================== The login scripts should work fine in any version 2.02 or later release of bash. For example, they've been tested successfuly in RedHat Linux 7.1 and 9, RedHat Enterprise Linux 3, Fedora Core 2, Debian 3, Cygwin, Mandrake 10.0, and OS X 10.3. The installation scripts require Gnu make. You'll also need common programs such as grep, sed, awk, tail, and the like. When less common programs are not found, the login scripts try to fail gracefully. ====================================================================== - Requirements ====================================================================== Download locations are always changing as I get access to different hosting services. Thus, this list of mirrors may be out of date by the time you read it: http://www.speakeasy.org/~curby/filelib/cuvlis/ http://www.cs.ucsb.edu/~kirbysdl/broadcast/cuvlis/ http://curby.net/filelib/cuvlis/ A search to Google may help: http://www.google.com/search?q=cuvlis-current.tar.gz&btnG=Google Additionally, if you have a version more recent than 1.05.00, you should be able to type ``make upgrade'' from the installer's directory. If your version is really old, its internal list of mirrors may be out of date too. ====================================================================== - Installation via Gnu make ====================================================================== As of v1.02.04, there is a Makefile that tries to make installation easier, but the old installation instructions are still included below in case the Makefile doesn't work for you. As of v1.04.00, the Makefile calls a shell script to help with much of the heavy lifting. To begin installation, type make install to backup previous login scripts and install the new scripts. After the installation process finishes, and if a backup was created, the script asks if you would like to migrate the old version's plugins. Migration involves the following: Enable plugins that were enabled in the previous version List plugins that were added and removed between versions Bring colormap settings from previous to new version Enable individual plugins by making them executable. After installation, do not exit your current session. Open a new shell to check that everything is working and keep the first shell to undo changes if something goes wrong. This is especially important if you're logging in remotely (though you can tell bash to disregard startup scripts). If things are fatally borked, run the following: make restore In the future, you can download a new version using make download You can download and upgrade to the newest version by typing make upgrade For a command summary, type make help ====================================================================== - Installation via manual file copy ====================================================================== The central files are .bashrc, .bash_profile, and .bash_logout. If there are existing versions of those files in your home directory, check them to make sure you aren't about to overwrite important settings, and/or rename them for backup. The .cuvlis directory should be copied to your home directory. Enable individual plugins by making them executable. Review the new files and make any changes you want. Copy the new files into your home directory. For now, do not exit your current session. Open a new shell to check that everything is working and keep the first shell to undo changes if something goes wrong. ====================================================================== - Plugins ====================================================================== The goal of cuvlis is identical core functionality for all machines. In reality machines and their uses are seldom identical. To handle these special needs, users can write plugins for each machine as necessary while keeping the same core functionality throughout. The default plugin directory is ~/.cuvlis/plugins For each machine, place its unique login commands in files in the plugin directory. During login, executable files there will be sourced (the shell commands in them will be executed). To temporarily disable a plugin, remove its executable flag. Some plugins have sanity-checking code to make sure that users don't anything too hilarious, but don't count on such code always being there. The default set of plugins have names with meaningful prefixes: alias-* These plugins set aliases misc-* These plugins do something weird, or several things out-* These plugins don't affect the environment, but only show data path-* These plugins set PATH variables (not necessarily 'the' path) var-* These plugins set miscellaneous environment variables It is recommended but not required that plugins also follow this naming convention. ====================================================================== - Script interactions ====================================================================== Traditionally, bash calls ~/.bashrc for interactive non-login shells (e.g. typing ``bash'' when you're already in a shell). It calls /etc/profile and then ~/.bash_profile for (interactive) login shells (e.g. ssh-ing into a machine). For noninteractive shells (e.g. ssh- ing into a machine with a command argument), it looks for the variable $BASH_ENV. If found, it runs the script given by that variable. CUVLIS runs both ~/.bash_profile and ~/.bashrc for ALL interactive shells. If /etc/profile did not run by the time ~/.bash_profile runs, an alert is given and /etc/profile is sourced by CUVLIS. ~/.bash_profile also raises an alert if ~/.bashrc already ran, and sources it otherwise. For noninteractive shells, ~/.bashrc runs (but not ~/.bash_profile). Lastly, CUVLIS defines $ENV and $BASH_ENV to be ~/.bashrc ====================================================================== - QFAO (Questions, Frequently-Asked and Otherwise) ====================================================================== Q: Are you crazy? A: That's the general concensus. This is probably the most insane, most involved login process ever concocted. But it's great for learning Bash scripting. =) Q: Is this a serious project though? A: Yup. Q: Wow, you ARE crazy. A: Yup. Q: I don't trust your craziness, but the project intrigues me. How can I test it out safely? A: The best solution is to look at the code itself and see that I might be doing something stupid, but I'm not doing anything malicious. You could also make a dummy account to test in, or convince less paranoid people to try it. Q: Was that a lame attempt at word-of-mouth advertising? A: Yes! Tell everyone you know to try this stuff. My goal is to have servers buckling under the load of people logging in... bwahaahaahaa! -- End of file