0.1.1/ 40750 765 144 0 5600321051 10163 5ustar ac3slhusers0.1.1/bin/ 40750 765 144 0 5600320102 10727 5ustar ac3slhusers0.1.1/bin/ParseTar120777 765 144 0 5574720437 20762 2../src/Software/InstallTar/ParseTarustar ac3slhusers0.1.1/bin/ParseMod100640 765 144 4411 5577716355 12522 0ustar ac3slhusers# # These functions are used to parse README.module files # set -h #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = succeed/found/warning/fail (0/1/254/255) # $2 = general report # $3 = fail report function Report() { if [ "$1" -eq 255 ]; then echo -n "Skipping" elif [ "$1" -eq 254 ]; then echo -n "Warning " elif [ "$1" -eq 1 ]; then echo -n "Found " else echo -n "Adding " fi echo -n " : $2" if [ ! "$3" = "" ]; then echo " ($3)" else echo "" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = author name # $2 = author address function author() { echo ": Copyright (c) $1 ($2)" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = comment # $2 = log it? function comment() { echo ": $1" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- function depend() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = directory # $2 = permissions function dir() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements function endinfo() { exit } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = source # $2 = dest # $3 = permissions function file() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = file to link to # $2 = link function link() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = log comment # $2 = echo it? function log() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements function pause() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = required util function require() { echo -n "This module requires '$1' " if which "$1" > /dev/null ; then echo "which is installed." else echo "which you need to install." fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = title function title() { echo "$1" echo "--------------------" } 0.1.1/bin/REMOVE100750 765 144 7014 5600320102 11751 0ustar ac3slhusers#! /bin/bash # # REMOVE : Remove a package # # This script was written to remove packages for The System Manager # and was inspired by the Linux kernel configure script by # raymondc@microsoft.com (well, I think it's a neat hack :-) # # I'm sure this script can be used for any general purpose installation, # and I hope it'll catch on big-time. Let me say that again, louder. # # PLEASE USE THIS SCRIPT TO PROVIDE AN INSTALLATION SYSTEM FOR YOUR OWN # SOFTWARE. PLEASE USE THIS SCRIPT ON AS MANY UNIX PLATFORMS AS POSSIBLE. # PLEASE MAKE USE OF IT'S SISTER SCRIPT, REMOVE, TO PROVIDE A WAY TO REMOVE # YOUR SOFTWARE. # # Please send comments/suggestions/bug fixes to S.Herbert@sheffield.ac.uk #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- set -h COLOR_BLACK="\033[0;30m" COLOR_RED="\033[1;31m" COLOR_GREEN="\033[1;32m" COLOR_YELLOW="\033[1;33m" COLOR_BLUE="\033[1;34m" COLOR_CYAN="\033[1;36m" COLOR_LIGHT_GREY="\033[0;37m" COLOR_DARK_GREY="\033[1;30m" COLOR_WHITE="\033[1;37m" #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = manifest of files to remove NailIt() { echo -ne "$COLOR_DARK_GREY" echo "--*-- --*-- --*-- --*-- --*--" echo -ne "$COLOR_LIGHT_GREY" echo "Removing '$COLOR_WHITE$1$COLOR_LIGHT_GREY'" echo -ne "$COLOR_DARK_GREY" echo "--*-- --*-- --*-- --*-- --*--" mv ~/.INSTALLed/$1 /tmp/REMOVE.$USER.$1 cat /tmp/REMOVE.$USER.$1 | while read x ; do if [ ! -d $x ]; then if NotRequired $x ; then Report "0" "$x" rm -f $x else Report "255" "$x" "required by $PACKAGE" fi fi done # this should remove empty directories # perhaps attempting this is silly? cat /tmp/REMOVE.$USER.$1 | while read x ; do Contents="`echo $x/*`" if [ -d $x -a "$Concents" = "$x/*" ]; then Report "0" "$x" "directory" rm -rf $x fi done rm -f /tmp/REMOVE.$USER.$1 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = a required file NotRequired() { if [ -e ~/.INSTALLed/* ]; then if grep "^$1\$" ~/.INSTALLed/* > /dev/null ; then return 1 fi fi return 0 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = succeed/found/warning/fail (0/1/254/255) # $2 = general report # $3 = fail report Report() { if [ "$1" -eq 255 ]; then echo -ne "$COLOR_RED" echo -n "Skipping" elif [ "$1" -eq 254 ]; then echo -ne "$COLOR_YELLOW" echo -n "Warning " elif [ "$1" -eq 1 ]; then echo -ne "$COLOR_CYAN" echo -n "Found " else echo -ne "$COLOR_GREEN" echo -n "Removing" fi echo -ne "$COLOR_LIGHT_GREY" echo -n " : $2" if [ ! "$3" = "" ]; then echo " ($3)" else echo "" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements Usage() { if [ -d ~/.INSTALLed ]; then echo "REMOVE: Remove a package" echo "Packages available for removal are :" echo "" ls ~/.INSTALLed echo "" echo "Type 'REMOVE ...' to remove a package or two." else echo "REMOVE: Nothing installed" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # this is where the fun begins # if no arguements, show usage and quit if [ "$1" = "" ]; then Usage exit 0 fi # right, now work through arguements ... for x in $@ ; do if [ -r ~/.INSTALLed/$x ]; then Report "0" "$x" "package" NailIt $x else Report "255" "$x" "package not found" fi done # that's it folks! 0.1.1/bin/AuthorInfo100750 765 144 2557 5577722355 13076 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function main() { local AuthorInfo local x InfoBox "Getting AUTHOR information ... please wait" if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 fi if [ -f README.module ]; then README.module --SysmanAuthor > $SysmanFile1 fi for x in * ; do AuthorInfo="" if [ -d $x ]; then AuthorInfo="`$x/README.module --SysmanAuthor`" elif [ -x $x -a "$x" != "README.module" ]; then AuthorInfo="`./$x --SysmanAuthor`" fi if [ -n "$AuthorInfo" ]; then if [ -s $SysmanFile1 ]; then echo "--*- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*--" >> $SysmanFile1 fi echo "$AuthorInfo" >> $SysmanFile1 fi done if [ -s $SysmanFile1 ]; then TextBox $SysmanFile1 fi } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : INFO : Show Author Information :$0" exit ;; --SysmanAuthor) echo "INFO : Show Author Information" echo "Copyright (c) Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/bin/INFO100750 765 144 11654 5600320102 11534 0ustar ac3slhusers#! /bin/bash # # INFO : Examine a package # # This script was written to install packages for The System Manager # and was inspired by the Linux kernel configure script by # raymondc@microsoft.com (well, I think it's a neat hack :-) # # I'm sure this script can be used for any general purpose installation, # and I hope it'll catch on big-time. Let me say that again, louder. # # PLEASE USE THIS SCRIPT TO PROVIDE AN INSTALLATION SYSTEM FOR YOUR OWN # SOFTWARE. PLEASE USE THIS SCRIPT ON AS MANY UNIX PLATFORMS AS POSSIBLE. # PLEASE MAKE USE OF IT'S SISTER SCRIPT, REMOVE, TO PROVIDE A WAY TO REMOVE # YOUR SOFTWARE. # # Please send comments/suggestions/bug fixes to S.Herbert@sheffield.ac.uk #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- set -h COLOR_BLACK="\033[0;30m" COLOR_RED="\033[1;31m" COLOR_GREEN="\033[1;32m" COLOR_YELLOW="\033[1;33m" COLOR_BLUE="\033[1;34m" COLOR_CYAN="\033[1;36m" COLOR_LIGHT_GREY="\033[0;37m" COLOR_DARK_GREY="\033[1;30m" COLOR_WHITE="\033[1;37m" #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = succeed/found/warning/fail (0/1/254/255) # $2 = general report # $3 = fail report Report() { if [ "$1" -eq 255 ]; then echo -ne "$COLOR_RED" echo -n "Skipping" echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi elif [ "$1" -eq 254 ]; then echo -ne "$COLOR_YELLOW" echo -n "Warning " echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi elif [ "$1" -eq 1 ]; then echo -ne "$COLOR_CYAN" echo -n "Found " else echo -ne "$COLOR_GREEN" echo -n "Adding " fi echo -ne "$COLOR_LIGHT_GREY" echo -n " : $2" if [ ! "$3" = "" ]; then echo " ($3)" else echo "" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements Usage() { if [ -d .MANIFEST ]; then echo "INFO: Examine a package" echo "Packages available for examination are :" echo "" ls .MANIFEST echo "" echo "Type 'INFO ...' to examine a package or two." else echo "INFO: directory .MANIFEST does not exist" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = author name # $2 = author address author() { echo -en "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo -e "Copyright (c) $COLOR_WHITE$1$COLOR_LIGHT_GREY ($2)" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = comment # $2 = log it? comment() { echo -ne "$COLOR_DARK_GREY: COLOR_LIGHT_GREY" echo "$1" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = directory/file # $2 = test depend() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = directory # $2 = permissions dir() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements endinfo() { exit } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = source # $2 = dest # $3 = permissions file() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = file to link to # $2 = link link() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = log comment # $2 = echo it? log() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements pause() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = required util require() { echo -en "$COLOR_WHITE" echo -n "This module requires '$COLOR_WHITE$1$COLOR_LIGHT_GREY' " if which "$1" > /dev/null ; then echo "which is installed." elif [ -e "$1" ]; then echo "which is installed." else echo "which you need to install." fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements root() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = default hierarchy # $2 = root directory of package target() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = title title() { echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" echo -ne "$COLOR_LIGHT_GREY" echo -e "Examining '$COLOR_WHITE$1$COLOR_LIGHT_GREY'" echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # this is where the fun begins # if no arguements, show usage and quit if [ "$1" = "" ]; then Usage exit 0 fi # right, now work through arguements ... for x in $@ ; do if [ -r .MANIFEST/$x ]; then Report "0" "$x" "package" . .MANIFEST/$x else Report "255" "$x" "package not found" fi done # that's it folks! 0.1.1/bin/testfornews100750 765 144 652 5577435143 13351 0ustar ac3slhusers#! /bin/ash if [ -f $HOME/.sysman.news ]; then for x in /var/news/* ; do if [ -f $x -a -r $x -a $x -nt $HOME/.sysman.news ]; then echo "News has changed since you last read it. Type 'news' to read all about it." return fi done else for x in /var/news/* ; do if [ -f $x -a -r $x ]; then echo "You have never read the news. Type 'news' to read all about it." return fi done fi 0.1.1/bin/INSTALL100750 765 144 20464 5600320102 12106 0ustar ac3slhusers#! /bin/bash # # INSTALL : Install a package # # This script was written to install packages for The System Manager # and was inspired by the Linux kernel configure script by # raymondc@microsoft.com (well, I think it's a neat hack :-) # # I'm sure this script can be used for any general purpose installation, # and I hope it'll catch on big-time. Let me say that again, louder. # # PLEASE USE THIS SCRIPT TO PROVIDE AN INSTALLATION SYSTEM FOR YOUR OWN # SOFTWARE. PLEASE USE THIS SCRIPT ON AS MANY UNIX PLATFORMS AS POSSIBLE. # PLEASE MAKE USE OF IT'S SISTER SCRIPT, REMOVE, TO PROVIDE A WAY TO REMOVE # YOUR SOFTWARE. # # Please send comments/suggestions/bug fixes to S.Herbert@sheffield.ac.uk #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- set -h COLOR_BLACK="\033[0;30m" COLOR_RED="\033[1;31m" COLOR_GREEN="\033[1;32m" COLOR_YELLOW="\033[1;33m" COLOR_BLUE="\033[1;34m" COLOR_CYAN="\033[1;36m" COLOR_LIGHT_GREY="\033[0;37m" COLOR_DARK_GREY="\033[1;30m" COLOR_WHITE="\033[1;37m" #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = succeed/found/forced/warning/fail (0/1/2/254/255) # $2 = general report # $3 = fail report # $4 = don't log skipped entries Report() { if [ "$1" -eq 255 ]; then echo -ne "$COLOR_RED" echo -n "Skipping" if [ -z "$4" ]; then echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi echo "(Use INSTALL -f to force installation)" >> $LOG fi elif [ "$1" -eq 254 ]; then echo -ne "$COLOR_YELLOW" echo -n "Warning " echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi elif [ "$1" -eq 2 ]; then echo -ne "$COLOR_YELLOW" echo -n "Forced " elif [ "$1" -eq 1 ]; then echo -ne "$COLOR_CYAN" echo -n "Found " else echo -ne "$COLOR_GREEN" echo -n "Adding " fi echo -ne "$COLOR_LIGHT_GREY" echo -n " : $2" if [ ! "$3" = "" ]; then echo " ($3)" else echo "" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements Usage() { if [ -d .MANIFEST ]; then echo "INSTALL: Install a package" echo "Packages available for installation are :" echo "" ls .MANIFEST echo "" echo "Type 'INSTALL [ -f ] ...' to install a package or two." else echo "INSTALL: Directory .MANIFEST does not exist." fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = author name # $2 = author address author() { echo -en "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo -e "Copyright (c) $COLOR_WHITE$1$COLOR_LIGHT_GREY ($2)" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = comment # $2 = log it? comment() { echo -ne "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo "$1" if [ "$2" = "y" -o "$2" = "Y" ]; then echo $1 >> $LOG fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $2 = directory/file # $1 = test depend() { if [ $1 $2 ]; then echo > /dev/null else Report "254" "$1" "required, but not found" return 254 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = directory # $2 = permissions # $3 = consider directory for deletion? dir() { if [ -e "$1" ]; then Report "255" "$1" "dir: exists" "N" if [ "$3" = "y" -o "$3" = "Y" ]; then echo "$1/" >> $MANIFEST fi return 255 else Report "0" "$1/" "mode : $2" install -m "$2" -d "$1" if [ "$3" = "y" -o "$3" = "Y" ]; then echo "$1/" >> $MANIFEST fi return 0 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements endinfo() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = source # $2 = dest # $3 = permissions file() { if [ -e "$2" ]; then if [ $FORCED -eq 1 ] ; then Report "255" "$2" "file: exists" return 255 fi fi if [ ! -e "$1" ]; then Report "255" "$2" "file: $1 not found" return 255 fi if [ -e "$2" ]; then Report "2" "$2" "mode : $3" else Report "0" "$2" "mode : $3" fi install -m "$3" "$1" "$2" echo "$2" >> $MANIFEST return 0 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = file to link to # $2 = link link() { if [ -e "$2" ]; then if [ $FORCED -eq 1 ]; then Report "255" "$2" "link: exists" return 255 fi fi if [ ! -e "$1" ]; then Report "255" "$1" "link: not found" return 255 fi if [ -e "$2" ]; then Report "2" "$2" "symlink" rm -f $2 else Report "0" "$2" "symlink" fi ln -s "$1" "$2" echo "$2" >> $MANIFEST return 0 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = log comment # $2 = echo it? log() { echo "$1" >> $LOG if [ "$2" = "y" ]; then echo -ne "$COLOR_DARK_GREY: COLOR_LIGHT_GREY" echo "$1" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements pause() { local x echo echo -ne "$COLOR_RED" echo -n "!" echo -e "$COLOR_LIGHT_GREY Press ENTER or RETURN to continue, or ctrl-c to quit." read x < /dev/tty } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = required util require() { if [ -e "$1" ]; then Report "1" "$1" "required" return 0 elif which "$1" > /dev/null ; then Report "1" "$1" "required" return 0 else Report "254" "$1" "required, but not found" return 254 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements root() { if [ ! $UID -eq 0 ]; then echo "INSTALL: insufficient privilege (must be root)" exit 1 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = default hierarchy # $2 = root directory of package target() { local targetdir local x if [ $UID -eq 0 ]; then if [ -z "$TARGETDIR" ]; then x="YES" echo echo -ne "$COLOR_RED" echo -ne "!" echo -ne "$COLOR_LIGHT_GREY " echo "Where do you want to install the package to?" echo -ne "$COLOR_RED! $COLOR_LIGHT_GREY" echo "(Press ENTER for $1/$2)" read targetdir < /dev/tty if [ -z $targetdir ]; then TARGETDIR="$1/$2" else TARGETDIR="$targetdir" x="NO" fi else TARGETDIR="$1/$2" fi TARGETBIN="/usr/local/bin" TARGETLIB="/usr/local/lib" TARGETMAN="/usr/local/man" else TARGETDIR="$HOME/$2" TARGETBIN="$HOME/bin" TARGETLIB="$HOME/lib" TARGETMAN="$HOME/man" x="NO" fi export TARGETBIN export TARGETDIR export TARGETLIB export TARGETMAN echo -ne "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo "Target destination is $TARGETDIR" if [ "$x" = "YES" ]; then pause fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = title title() { echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" echo -ne "$COLOR_LIGHT_GREY" echo -e "Installing '$COLOR_WHITE$1$COLOR_LIGHT_GREY'" echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # this is where the fun begins LOG="README.install" MANIFEST="INSTALLed" # if no arguements, show usage and quit if [ "$1" = "" ]; then Usage exit 0 fi # okay, time to ditch the old log file if [ -e $LOG ]; then rm -f $LOG fi if [ -e $MANIFEST ]; then rm -f $MANIFEST fi # do they want to force the issue? if [ "$1" = "-f" ]; then FORCED=0 shift else FORCED=1 fi # make sure the target is unset if [ -n "$TARGETDIR" ]; then unset TARGETDIR fi # right, now work through arguements ... for x in $@ ; do if [ -r .MANIFEST/$x ]; then Report "0" "$x" "package" . .MANIFEST/$x if [ -e $MANIFEST ]; then install -d $HOME/.INSTALLed install -m 640 $MANIFEST $HOME/.INSTALLed/$x rm $MANIFEST fi else Report "255" "$x" "package not found" fi done echo echo -en "$COLOR_WHITE" echo -ne "INSTALL" echo -e "$COLOR_LIGHT_GREY: Installation is complete" # do we have a log file? if [ -s $LOG ]; then echo -e "Please read $COLOR_WHITE$LOG$COLOR_LIGHT_GREY for further information." fi # that's it folks! 0.1.1/modules/ 40750 765 144 0 5600311362 11637 5ustar ac3slhusers0.1.1/modules/Users/ 40750 765 144 0 5600311260 12735 5ustar ac3slhusers0.1.1/modules/Users/AA120777 765 144 0 5577720410 20673 2/var/adm/sysman/bin/AuthorInfoustar ac3slhusers0.1.1/modules/Users/User.menu100640 765 144 767 5577720417 14656 0ustar ac3slhusersDialog --menu "Please select an option." 11 71 4 \ " INFO " " Show Author Information " \ " CREATE " " Create A New User " \ " DELETE " " Delete A User (Or Two) " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " CREATE " ]; then ./AddANewUser fi if [ "$MenuLine" = " DELETE " ]; then ./DeleteAUser fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/Users/README.module100750 765 144 2417 5600311254 15210 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : USERS : Create/Destroy Users :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Users - A Module For The System Manager" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "Currently, this module only provides options to create and delete" comment "users on a local system. However, I plan to expand this to be" comment "of far more use to networked systems." endinfo require useradd if [ $? -eq 254 ]; then log "You need to install the program 'useradd', which is used by this module." log "useradd is part of the Shadow Passwords suite. You do NOT need to be" log "using shadow passwords - you just need this utility." log fi require userdel if [ $? -eq 254 ]; then log "You need to install the program 'userdel', which is used by this module." log "userdel is part of the Shadow Passwords suite. You do NOT need to be" log "using shadow passwords - you just need this utility." log fi target /var/adm sysman 0.1.1/modules/Users/AddANewUser100750 765 144 13202 5577425403 15122 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function Aborted() { Abort "User will not be created." } function GetUserName() { while [ 0 ]; do Dialog --inputbox "Please enter the user name (ALPHANUMERICS only) :" 8 71 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then UserName="`cat $SysmanFile1`" InfoBox "Making sure that $UserName doesn't exist ..." grep ^$UserName: /etc/passwd > $SysmanFile1 if [ -s $SysmanFile1 ]; then MsgBox "$UserName exists. Please select a different user name." else return 0 fi else Aborted return 1 fi done } function GetRealName() { Dialog --inputbox "Please enter their real name (ALPHANUMERICS only) :" 8 71 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then RealName="`cat $SysmanFile1`" return 0 else Aborted return 1 fi } function GetInitialGroup() { SelectGroup "OneOfAll" "Which group will be $UserName's main group?" "$SysmanFile1" "$InitialGroup" if [ -s $SysmanFile1 ]; then InitialGroup="`cat $SysmanFile1`" return 0 else Aborted return 1 fi } function GetHomeDir() { Dialog --inputbox "Please enter where $UserName's home directory will be created,\nor press ENTER for $HomeDir" 9 71 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then HomeDir="`cat $SysmanFile1`" fi return 0 } function GetInitialShell() { if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 fi cat /etc/shells | while read x; do echo -n "$x $x " >> $SysmanFile1 done Dialog --menu "Please select $UserName's shell." 20 71 13 `cat $SysmanFile1` 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then Shell="`cat $SysmanFile1`" return 0 else Aborted return 1 fi } function GetOtherGroups() { SelectGroup "ManyOfAll" "Which groups will $UserName belong to?" "$SysmanFile1" "$GroupList" if [ -s $SysmanFile1 ]; then GroupList="`cat $SysmanFile1`" return 0; else Aborted return 1 fi } function GetUID() { if YesOrNo "Do you want to $UserName to have a particular user ID?" ; then Dialog --inputbox "Enter the user ID number, or press ENTER for the default." 8 71 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then UserID="`cat $SysmanFile1`" return fi fi UserID="" } function GetDefaults() { InitialGroup="users" GroupList="users" HomeDir="/home/users" } function main() { GetDefaults while [ 0 ]; do GetUserName ; if [ $? -eq 1 ]; then return ; fi GetRealName ; if [ $? -eq 1 ]; then return ; fi GetInitialGroup ; if [ $? -eq 1 ]; then return ; fi GetOtherGroups ; if [ $? -eq 1 ]; then return ; fi GetHomeDir ; if [ $? -eq 1 ]; then return ; fi GetInitialShell ; if [ $? -eq 1 ]; then return ; fi GetUID ; while [ 0 ]; do Dialog --menu "Please select an option." 16 71 9 \ " USERNAME " " $UserName " \ " REALNAME " " $RealName " \ " INITIALGROUP " " $InitialGroup " \ " GROUPS " " $GroupList " \ " HOMEDIR " " $HomeDir " \ " SHELL " " $Shell " \ " USERID " " $UserID " \ " CREATE " " Create This User " \ " ABORT " " Quit And Don't Create " 2> $SysmanFile1 if [ ! -s $SysmanFile1 ]; then Aborted return fi MenuSelection="`cat $SysmanFile1`" case "$MenuSelection" in " USERNAME ") GetUserName ; if [ $? -eq 1 ]; then return ; fi ;; " REALNAME ") GetRealName ; if [ $? -eq 1 ]; then return ; fi ;; " INITIALGROUP ") GetInitialGroup ; if [ $? -eq 1 ]; then return ; fi ;; " GROUPS ") GetOtherGroups ; if [ $? -eq 1 ]; then return ; fi ;; " HOMEDIR ") GetHomeDir ; if [ $? -eq 1 ]; then return ; fi ;; " SHELL ") GetInitialShell ; if ] $? -eq 1 ]; then return ; fi ;; " USERID ") GetUID ;; " CREATE ") InfoBox "Creating $UserName ... please wait" echo -n "useradd -d $HomeDir/$UserName -g $InitialGroup -m -s $Shell -c \"$RealName\" " > $SysmanFile1 if [ ! "$GroupList" = "" ]; then echo -n "-G \"`echo $GroupList | tr "\040" ","`\" " >> $SysmanFile1 fi if [ ! "$UserID" = "" ]; then echo -n "-u $UserID" >> $SysmanFile1 fi echo "$UserName" >> $SysmanFile1 . $SysmanFile1 if [ -f $HomeDir/$UserName.tar.gz ]; then if YesOrNo "Restore $UserName's saved files?" ; then InfoBox "Restoring files ... please wait" pushd . > /dev/null cd $HomeDir tar zxf $UserName.tar.gz cd $UserName find . ! -user "root" -exec chown $UserName.$InitialGroup {} \; MsgBox "Files have been restored." else MsgBox "Files have not been restored." fi else MsgBox "Files have not been restored." fi clear echo "Please set $UserName's password" passwd $UserName if YesOrNo "Do you want to create another user?" ; then break else return fi ;; " ABORT ") Aborted return ;; *) return ;; esac done done } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : CREATE : Create A New User :$0" exit ;; --SysmanAuthor) echo "CREATE : Create A New User" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/Users/DeleteAUser100750 765 144 3276 5577425422 15155 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk # $1 = Username to nail function DeleteThatUser() { UserDetails="`grep ^$1: /etc/passwd`" HomeDir="`echo $UserDetails | cut -d : -f 6`" if YesOrNo "Do you really want to delete $1?" ; then if YesOrNo "Archive $1's files (in $HomeDir)?" ; then InfoBox "Archiving $1's files ... please wait" tar cfP $HomeDir.tar $HomeDir 2> /dev/null gzip -9 $HomeDir.tar fi if YesOrNo "Delete $1's files (in $HomeDir)?" ; then InfoBox "Removing $1's files ... please wait" rm -rf $HomeDir fi if YesOrNo "Locate and remove $1's files (in /)?" ; then InfoBox "Lauching background find & rm ... please wait" find / -user "$1" -exec rm -f {} \; & fi InfoBox "Removing $1 ... please wait" userdel $1 MsgBox "$1 is history." else Abort "$1 will not be deleted." fi } function main() { SelectUser "ManyOfAll" "Please select a user(s) to delete." "$SysmanFile1" "" if [ ! -s $SysmanFile1 ]; then return fi MenuSelection="`cat $SysmanFile1`" for x in $MenuSelection ; do DeleteThatUser "$x" done } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : DELETE : Delete A User (Or Two) :$0" exit ;; --SysmanAuthor) echo "DELETE : Delete A User From The System" echo "Copyright (c) Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/Users/Root.menu100640 765 144 767 5577720355 14664 0ustar ac3slhusersDialog --menu "Please select an option." 11 71 4 \ " INFO " " Show Author Information " \ " CREATE " " Create A New User " \ " DELETE " " Delete A User (Or Two) " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " CREATE " ]; then ./AddANewUser fi if [ "$MenuLine" = " DELETE " ]; then ./DeleteAUser fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/Sysman/ 40750 765 144 0 5600316452 13116 5ustar ac3slhusers0.1.1/modules/Sysman/AA120777 765 144 0 5577720401 21044 2/var/adm/sysman/bin/AuthorInfoustar ac3slhusers0.1.1/modules/Sysman/README.module100750 765 144 1214 5600310624 15353 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : SYSMAN : Configure The System Manager :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Configuring The System Manager" author "Stuart Herbert" "S.Herbert@sheffield.ac.uk" comment comment "This module provides functions for maintaining the System Manager" comment "itself." endinfo target /var/adm sysman 0.1.1/modules/Sysman/User.menu100640 765 144 1140 5577720407 15030 0ustar ac3slhusersDialog --menu "Please select an option." 12 71 5 \ " INFO " " Show Author Information " \ " MANIFEST " " Build Installation Manifest " \ " REMOVE " " Remove A Module " \ " UPDATE " " Update The System Manager " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " MANIFEST " ]; then ./Manifest fi if [ "$MenuLine" = " REMOVE " ]; then ./RemoveModule fi if [ "$MenuLine" = " UPDATE " ]; then ./UpdateMenus fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/Sysman/Manifest100750 765 144 4112 5600316445 14707 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk MANIFEST="/var/adm/sysman/.MANIFEST" function SpodThroughModules() { local Manifest local x echo "#! /bin/bash" > $MANIFEST/$2 echo "# Generated by MANIFEST" >> $MANIFEST/$2 echo "# See INSTALL for details of format" >> $MANIFEST/$2 echo "" >> $MANIFEST/$2 if [ "$2" != "base" ]; then echo "depend -d /var/adm/sysman/$3" >> $MANIFEST/$2 echo "if [ \$? -eq 254 ]; then" >> $MANIFEST/$2 echo " log \"You must install the 'base' module of the System Manager\" y " >> $MANIFEST/$2 echo " log \"before installing this module.\" y " >> $MANIFEST/$2 echo " log \"\" y " >> $MANIFEST/$2 echo " exit" >> $MANIFEST/$2 echo "fi" >> $MANIFEST/$2 fi if [ -r README.module ]; then cat README.module >> $MANIFEST/$2 fi echo "dir \$TARGETDIR/$1 755 y" >> $MANIFEST/$2 for x in * ; do if [ -d $x ]; then cd $x SpodThroughModules "$1/$x" "$x" "$1" cd .. elif [ -L $x ]; then echo > /dev/null elif [ -x $x ]; then echo "file $1/$x /var/adm/sysman/$1/$x 755" >> $MANIFEST/$2 elif [ "$x" != "Root.menu" -a "$x" != "User.menu" ]; then echo "file $1/$x /var/adm/sysman/$1/$x 644" >> $MANIFEST/$2 fi done } function main() { InfoBox "Building MANIFEST files ... please wait" pushd . > /dev/null cd /var/adm/sysman/modules SpodThroughModules "modules" "base" cat $MANIFEST/Sysman >> $MANIFEST/base rm -f $MANIFEST/Sysman popd > /dev/null } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : MANIFEST : Build Installation Manifest :$0" exit ;; --SysmanAuthor) echo "MANIFEST: Build a manifest of modules" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/Sysman/UpdateMenus100750 765 144 6100 5577715417 15411 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk # $1 = Menu Name # $2 = Grep Parameter # $3 = Menu Depth function SpodThroughModules() { local MenuLine local SpodLevel local x SpodLevel=`expr $3 + 1` if [ -s $1 ]; then rm -f $1 fi if [ -f "AA" ]; then rm -f AA fi ln -s $bin/AuthorInfo AA for x in * ; do if [ -d $x ]; then MenuLine="`./$x/README.module --SysmanInstall | grep "$2" `" elif [ -x $x -a "$x" != "README.module" ]; then MenuLine="`./$x --SysmanInstall | grep "$2" `" else MenuLine="" fi if [ -n "$MenuLine" ]; then Option="`echo $MenuLine | cut -d : -f 3`" Text="`echo $MenuLine | cut -d : -f 4`" echo "\"$Option\" \"$Text\" \\" >> $SysmanFile2 echo "if [ \"\$MenuLine\" = \"$Option\" ]; then" >> $SysmanFile3 if [ -d $x ]; then echo " cd $x" >> $SysmanFile3 else echo " ./$x" >> $SysmanFile3 fi echo "fi" >> $SysmanFile3 fi done if [ $SpodLevel -eq 1 ]; then echo "\" DONE \" \" Exit The System Manager \" \\" >> $SysmanFile2 echo "if [ \"\$MenuLine\" = \" DONE \" ]; then" >> $SysmanFile3 echo " break" >> $SysmanFile3 echo "fi" >> $SysmanFile3 else echo "\" END \" \" Return To Previous Menu \" \\" >> $SysmanFile2 echo "if [ \"\$MenuLine\" = \" END \" ]; then" >> $SysmanFile3 echo " cd .." >> $SysmanFile3 echo "fi" >> $SysmanFile3 fi if [ -s $SysmanFile2 ]; then MenuSize="`wc $SysmanFile2 | tr -s "\040" | cut -d " " -f 2`" DialogSize=`expr $MenuSize + 7` if [ $DialogSize -gt 20 ]; then DialogSize=20 fi echo "Dialog --menu \"Please select an option.\" $DialogSize 71 $MenuSize \\" > $SysmanFile1 cat $SysmanFile2 >> $SysmanFile1 echo "2> \$SysmanFile1" >> $SysmanFile1 echo "if [ -s \$SysmanFile1 ]; then" >> $SysmanFile1 echo " MenuLine=\"\`cat \$SysmanFile1\`\" " >> $SysmanFile1 echo "else" >> $SysmanFile1 echo " break" >> $SysmanFile1 echo "fi" >> $SysmanFile1 cat $SysmanFile3 >> $SysmanFile1 cp -f $SysmanFile1 $1 rm -f $SysmanFile1 $SysmanFile2 $SysmanFile3 fi for x in * ; do if [ -d $x ]; then cd $x SpodThroughModules "$1" "$2" "$SpodLevel" cd .. fi done } function main() { pushd . > /dev/null cd /var/adm/sysman/modules InfoBox "Rebuilding menus ... please wait" SpodThroughModules "Root.menu" "[Yy] : [YyNn]" 0 SpodThroughModules "User.menu" "[NnYy] : [Yy]" 0 popd > /dev/null } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : UPDATE : Update The System Manager :$0" exit ;; --SysmanAuthor) echo "UPDATE : Rebuild The System Manager's Menus" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/Sysman/Root.menu100640 765 144 1140 5577720347 15040 0ustar ac3slhusersDialog --menu "Please select an option." 12 71 5 \ " INFO " " Show Author Information " \ " MANIFEST " " Build Installation Manifest " \ " REMOVE " " Remove A Module " \ " UPDATE " " Update The System Manager " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " MANIFEST " ]; then ./Manifest fi if [ "$MenuLine" = " REMOVE " ]; then ./RemoveModule fi if [ "$MenuLine" = " UPDATE " ]; then ./UpdateMenus fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/Sysman/RemoveModule100750 765 144 2511 5577511723 15556 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function RemoveIt() { pushd . > /dev/null cd /var/adm/sysman REMOVE $1 popd > /dev/null } function main() { InfoBox "Making list of modules ... please wait" if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 fi pushd . > /dev/null cd /var/adm/sysman/install/MANIFEST for x in * ; do echo -n "$x $x off " >> $SysmanFile1 done popd > /dev/null Dialog --checklist "Please select a module(s) to remove." 20 71 13 `cat $SysmanFile1` 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1 | tr -d "\042"`" clear for x in $MenuLine ; do RemoveIt $x done MsgBox "You should now select UPDATE to rebuild the menus." else Abort "No modules will be removed." fi } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : REMOVE : Remove A Module :$0" exit ;; --SysmanAuthor) echo "REMOVE : Remove A Module" echo "Copyright (c) Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/AA120777 765 144 0 5577720356 17603 2/var/adm/sysman/bin/AuthorInfoustar ac3slhusers0.1.1/modules/Software/ 40750 765 144 0 5600310602 13425 5ustar ac3slhusers0.1.1/modules/Software/InstallTar100750 765 144 5410 5577427103 15547 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function InstallATar() { local TarName if [ "`echo $1 | cut -c 1`" = "/" ]; then TarName="$1" else TarName="$SysmanStartDir/$1" fi echo "This tar file will create the following :" > $SysmanFile1 echo "" >> $SysmanFile1 if YesOrNo "$1 : is this a compressed file?" ; then Compressed="YES" else Compressed="NO" fi InfoBox "Examining file ... please wait" if [ "$Compressed" = "YES" ]; then tar ztf $TarName | sort | $bin/ParseTar >> $SysmanFile1 else tar tf $TarName | sort | $bin/ParseTar >> $SysmanFile1 fi echo "" >> $SysmanFile1 echo "wherever you install it!!" >> $SysmanFile1 TextBox $SysmanFile1 YesOrNo "Do you want to install $1?" if [ $? = 1 ]; then MsgBox "$1 skipped" return fi Dialog --inputbox "Where do you want to install $1?\n\ (Just press ENTER for $SysmanStartDir)" 9 71 2> $SysmanFile1 if [ ! -s $SysmanFile1 ]; then TargetDir="$SysmanStartDir" else Temp="`cat $SysmanFile1`" if [ "`echo $Temp | cut -c 1`" = "/" ]; then TargetDir="$Temp" else TargetDir="$SysmanStartDir/$Temp" fi fi echo $TargetDir if [ ! -d $TargetDir ]; then Abort "Directory doesn't exist" return fi pushd . > /dev/null cd $TargetDir InfoBox "Installing $1 into $SysmanStartDir ... please wait" if [ "$Compressed" = "YES" ]; then tar -zxf $TarName else tar -xf $TarName fi popd > /dev/null MsgBox "$1 has been installed" } function main() { local FileList local x if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 fi touch $SysmanFile1 pushd . > /dev/null cd $SysmanStartDir for x in * ; do if [ -f $x ]; then `echo -n "$x $x off " >> $SysmanFile1` fi done popd > /dev/null FileList="`cat $SysmanFile1`" rm -f $SysmanFile1 Dialog --checklist "Which files do you wish to install?" 20 71 13 $FileList 2> $SysmanFile1 if [ ! -s $SysmanFile1 ]; then return fi FileList="`cat $SysmanFile1`" for x in $FileList ; do InstallATar "`echo $x | tr -d "\042" `" done } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : TAR : Install A Tar :$0" exit ;; --SysmanAuthor) echo "TAR : Install A Tar" echo "Copyright (c) 1994 Stuart Herbert" exit ;; --SysmanManifest) exit ;; *) InstallATar $1 ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/Software/AA120777 765 144 0 5577720375 21376 2/var/adm/sysman/bin/AuthorInfoustar ac3slhusers0.1.1/modules/Software/README.module100750 765 144 2316 5600310600 15671 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : SOFTWARE : Managing Software :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "The Software Module" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "Currently, this module merely provides a useful script for installing" comment "any third-party .tar(.gz) type file. Future releases will seek to" comment "integrate support for the Slackware PKGTOOL system." comment comment "For the C shell, add the following alias to your /etc/csh.login :" comment comment " alias InstallTar sysman modules/Software ./InstallTar" comment comment "(or equivalent for sh-like shells, in /etc/profile) so that you" comment "can call this module directly." endinfo target /var/adm sysman file bin/ParseTar $TARGETDIR/bin/ParseTar 755 dir $TARGETDIR/src 755 y dir $TARGETDIR/src/Software 755 y file src/Software/ParseTar.c $TARGETDIR/src/Software/ParseTar.c 755 0.1.1/modules/Software/User.menu100640 765 144 613 5577720400 15325 0ustar ac3slhusersDialog --menu "Please select an option." 10 71 3 \ " INFO " " Show Author Information " \ " TAR " " Install A Tar " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " TAR " ]; then ./InstallTar fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/Software/Root.menu100640 765 144 613 5577720340 15335 0ustar ac3slhusersDialog --menu "Please select an option." 10 71 3 \ " INFO " " Show Author Information " \ " TAR " " Install A Tar " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " TAR " ]; then ./InstallTar fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/User.menu100640 765 144 1247 5577720365 13571 0ustar ac3slhusersDialog --menu "Please select an option." 13 71 6 \ " INFO " " Show Author Information " \ " NEWS " " Local News System " \ " SOFTWARE " " Managing Software " \ " SYSMAN " " Configure The System Manager " \ " USERS " " Create/Destroy Users " \ " DONE " " Exit The System Manager " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " NEWS " ]; then cd News fi if [ "$MenuLine" = " SOFTWARE " ]; then cd Software fi if [ "$MenuLine" = " SYSMAN " ]; then cd Sysman fi if [ "$MenuLine" = " USERS " ]; then cd Users fi if [ "$MenuLine" = " DONE " ]; then break fi 0.1.1/modules/News/ 40750 765 144 0 5600310437 12555 5ustar ac3slhusers0.1.1/modules/News/ReadTheNews100750 765 144 3247 5577425256 15002 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function TestForNewNews() { local x if [ -f $HOME/.sysman.news ]; then for x in /var/news/* ; do if [ -f $x -a -r $x -a $x -nt $HOME/.sysman.news ]; then echo "News has changed since you last read it. Type 'news' to read all about it." return fi done else for x in /var/news/* ; do if [ -f $x -a -r $x ]; then echo "You have never read the news. Type 'news' to read all about it." return fi done fi } function main() { local ReadNews ReadNews="FALSE" if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 ; fi touch $SysmanFile1 if [ -f $HOME/.sysman.news ]; then for x in /var/news/* ; do if [ -f $x -a -r $x -a $x -nt $HOME/.sysman.news ]; then TextBox "$x" ReadNews="TRUE" fi done else for x in /var/news/* ; do if [ -f $x -a -r $x ]; then TextBox "$x" ReadNews="TRUE" fi done fi if [ "$ReadNews" = "TRUE" ]; then touch $HOME/.sysman.news else Abort "There is no new news!" fi } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : NEW : Read New News :$0" exit ;; --SysmanAuthor) echo "NEW : Read Any New News" echo "Copyright (c) 1994 Stuart Herbert" exit ;; --test) TestForNewNews exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/News/README.module100750 765 144 3133 5600310434 15016 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : NEWS : Local News System :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Local News System Module" author "Stuart Herbert" "S.Herbert@sheffield.ac.uk" comment comment "This module provides for a local news service, where individual news" comment "items can be sent to individual groups as required." comment comment "As supplied, all users can add to the news. If you wish to restrict" comment "this, create a group called 'news', put everyone who can send news" comment "into it, and then 'chgrp new /var/adm/news' and" comment "'chmod 664 /var/adm/news' so that only members of the group can add" comment "to it." endinfo pause require /bin/ash if [ $? -eq 254 ]; then log "You do not have /bin/ash on your system. Either download this using ftp" log "from sunsite.unc.edu (in /pub/Linux/system/Shells), or you will have to" log "alter /usr/local/bin/testfornews to call a different shell." log log "/bin/ash is used because it is significantly smaller than /bin/bash" log fi target /var/adm sysman file install/testfornews $TARGETBIN/testfornews 755 if [ $? -eq 0 ]; then log "In /etc/csh.login, and /etc/profile, add a line to call" log "$TARGETBIN/testfornews, so that when users log in, they are informed" log "if there is any new news." log fi 0.1.1/modules/News/AA120777 765 144 0 5577720365 20517 2/var/adm/sysman/bin/AuthorInfoustar ac3slhusers0.1.1/modules/News/User.menu100640 765 144 1207 5577720374 14501 0ustar ac3slhusersDialog --menu "Please select an option." 13 71 6 \ " INFO " " Show Author Information " \ " ADD " " Add To The News " \ " EDIT " " Edit The News " \ " OLD " " Read Old News " \ " NEW " " Read New News " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " ADD " ]; then ./AddToTheNews fi if [ "$MenuLine" = " EDIT " ]; then ./EditTheNews fi if [ "$MenuLine" = " OLD " ]; then ./ReadAllNews fi if [ "$MenuLine" = " NEW " ]; then ./ReadTheNews fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/News/AddToTheNews100750 765 144 5652 5577425224 15117 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function main() { local MenuSelection local NewsFile if [ ! -w /var/adm/news ]; then Abort "You are not permitted to add to the news" return fi echo "--- Width Of Display --- Width Of Display --- Width Of Display ----" > $SysmanFile1 echo "Subject : " >> $SysmanFile1 if [ -f $HOME/.sig ]; then cat $HOME/.sig >> $SysmanFile1 fi if [ "$EDITOR" = "" ]; then vi $SysmanFile1 else $EDITOR $SysmanFile1 fi while [ 0 ]; do Dialog --menu "Please select an option." 10 71 3 \ " EDIT " " Edit Your News Item " \ " POST " " Post Your News Item " \ " QUIT " " Abandon Your News Item " 2> $SysmanFile2 if [ -s $SysmanFile2 ]; then MenuSelection="`cat $SysmanFile2`" case "$MenuSelection" in " EDIT ") if [ "$EDITOR" = "" ]; then vi $SysmanFile1 else $EDITOR $SysmanFile1 fi ;; " POST ") break ;; *) return ;; esac else return fi done Dialog --menu "Who Is The Item For?" 9 71 2 \ " EVERYONE " " Item Is For All Users " \ " GROUP " " Item Is For A Particular Group " 2> $SysmanFile2 if [ -s $SysmanFile2 ]; then MenuSelection="`cat $SysmanFile2`" else MenuSelection=" EVERYONE " fi if [ "$MenuSelection" = " GROUP " ]; then SelectGroup "OneOfMine" "Which group is the item for?" "$SysmanFile2" if [ -s $SysmanFile2 ]; then MenuSelection="`cat $SysmanFile2`" NewsFile="/var/news/$MenuSelection" else MenuSelection="" NewsFile="/var/news/All.Users" fi else MenuSelection="" NewsFile="/var/news/All.Users" fi InfoBox "Adding news item ... please wait" RealName="`grep ^$USER: /etc/passwd | cut -d : -f 5 | cut -d , -f 1`" echo "------------------------------------[`date +"%l:%M %p"`]--[`date +"%a %d %b %Y"`]--" > $SysmanFile3 echo "From : ($RealName) $USER" >> $SysmanFile3 if [ ! "$MenuSelection" = "" ]; then `echo "For : Group '$MenuSelection'" >> $SysmanFile3` fi tail +2 $SysmanFile1 >> $SysmanFile3 if [ -r $NewsFile ]; then `cat $NewsFile >> $SysmanFile3` fi `cat $SysmanFile3 > $NewsFile` if [ ! "$MenuSelection" = "" ]; then chgrp $MenuSelection $NewsFile chmod 660 $NewsFile else chmod 664 $NewsFile fi touch $NewsFile MsgBox "News item has been added" } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : ADD : Add To The News :" exit ;; --SysmanAuthor) echo "ADD : Add A News Item" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/News/ReadAllNews100750 765 144 1710 5577425312 14754 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function main() { local ReadNews ReadNews="FALSE" if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 ; fi touch $SysmanFile1 for x in /var/news/* ; do if [ -f $x -a -r $x ]; then ReadNews="TRUE" TextBox $x fi done if [ "$ReadNews" = "TRUE" ]; then touch $HOME/.sysman.news else Abort "There is no news!" fi } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : OLD : Read Old News :" exit ;; --SysmanAuthor) echo "OLD : Read Any News" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/News/EditTheNews100750 765 144 2505 5577425274 15010 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function main() { local MenuLine local x if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 ; fi touch $SysmanFile1 pushd . > /dev/null cd /var/news for x in * ; do if [ -f $x -a -r $x -a -w $x ]; then echo -n "$x $x off " >> $SysmanFile1 fi done popd > /dev/null if [ -s $SysmanFile1 ]; then MenuList="`cat $SysmanFile1`" Dialog --checklist "Which news do you want to edit?" 22 71 15 $MenuList 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuList="`cat $SysmanFile1 | tr -d "\042"`" for x in $MenuList ; do if [ "$EDITOR" = "" ]; then vi $x else $EDITOR $x fi done fi else Abort "You don't have the right to edit the news" fi } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : EDIT : Edit The News :$0" exit ;; --SysmanAuthor) echo "EDIT : Edit The News" echo "Copyright (c) 1994 Stuart Herbert" exit ;; esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks 0.1.1/modules/News/Root.menu100640 765 144 1207 5577720333 14501 0ustar ac3slhusersDialog --menu "Please select an option." 13 71 6 \ " INFO " " Show Author Information " \ " ADD " " Add To The News " \ " EDIT " " Edit The News " \ " OLD " " Read Old News " \ " NEW " " Read New News " \ " END " " Return To Previous Menu " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " ADD " ]; then ./AddToTheNews fi if [ "$MenuLine" = " EDIT " ]; then ./EditTheNews fi if [ "$MenuLine" = " OLD " ]; then ./ReadAllNews fi if [ "$MenuLine" = " NEW " ]; then ./ReadTheNews fi if [ "$MenuLine" = " END " ]; then cd .. fi 0.1.1/modules/README.module100750 765 144 5502 5600311357 14111 0ustar ac3slhusers#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "The System Manager" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "The System Manager" comment "An Administration Tool For UNIX" comment comment "This is version 0.1.1 of The System Manager. It was developed on" comment "Linux 1.0.8 using the Slackware distribution. It is released under" comment "the GNU General Public License v2." comment comment "This module contains all the documentation for The System Manager" comment "plus the base scripts required by all other modules." endinfo comment comment "PLEASE NOTE :" comment " This software is of ALPHA quality. If you do not know what" comment " that means, stop right here!" comment comment " YOU USE THIS SOFTWARE ENTIRELY AT YOUR OWN RISK. If you" comment " do not like this, stop right here!" comment pause require dialog if [ $? -eq 254 ]; then log "Dialog, by Savio Lam, is not installed on your machine." log log "You need to download dialog. There is a copy on sunsite.unc.edu" log "in /pub/Linux/utils/shell. Look for version 0.4, which has some" log "extra features required by The System Manager." log else log "You have dialog installed on your machine." log log "However, please check to ensure that this is dialog version 0.4" log "or later. If your copy of dialog does not support the --radiolist" log "and --backtitle options, you will find that sysman does not work." log "I uploaded dialog-0.4 to sunsite.unc.edu - it should have ended up" log "in /pub/Linux/utils/shell." log fi target "/var/adm" "sysman" log "Now you have installed sysman, use INSTALL to install any other" log "modules, and then type the following :" log log "cd $TARGETDIR ; sysman modules/Sysman ./UpdateMenus" log log "which will build the System Manager's menus. In future, you can" log "rebuild the menus from inside the System Manager." log log "Simply type 'sysman' to get started." log comment comment "Creating base directories" comment dir $TARGETDIR 755 y dir $TARGETDIR/bin 755 y dir $TARGETDIR/doc 755 y dir $TARGETDIR/src 755 y dir $TARGETDIR/.MANIFEST 755 y comment comment "Installing base files" comment file sysman $TARGETDIR/sysman 755 link $TARGETDIR/sysman $TARGETBIN/sysman file TEMPLATE $TARGETDIR/TEMPLATE 755 file bin/AuthorInfo $TARGETDIR/bin/AuthorInfo 755 file bin/ParseMod $TARGETDIR/bin/ParseMod 755 0.1.1/modules/Root.menu100640 765 144 1247 5577720323 13570 0ustar ac3slhusersDialog --menu "Please select an option." 13 71 6 \ " INFO " " Show Author Information " \ " NEWS " " Local News System " \ " SOFTWARE " " Managing Software " \ " SYSMAN " " Configure The System Manager " \ " USERS " " Create/Destroy Users " \ " DONE " " Exit The System Manager " \ 2> $SysmanFile1 if [ -s $SysmanFile1 ]; then MenuLine="`cat $SysmanFile1`" else break fi if [ "$MenuLine" = " INFO " ]; then ./AA fi if [ "$MenuLine" = " NEWS " ]; then cd News fi if [ "$MenuLine" = " SOFTWARE " ]; then cd Software fi if [ "$MenuLine" = " SYSMAN " ]; then cd Sysman fi if [ "$MenuLine" = " USERS " ]; then cd Users fi if [ "$MenuLine" = " DONE " ]; then break fi 0.1.1/doc/ 40750 765 144 0 5600320070 10730 5ustar ac3slhusers0.1.1/doc/INSTALL100644 765 144 66455 5600320007 12123 0ustar ac3slhusers INSTALL - An Installation System For UNIX Version 1.0 Stuart Herbert, S.Herbert@Sheffield.ac.uk ABSTRACT The UNIX operating system, more than any other, has long enjoyed a tradition of developers creating software which is freely available to anyone who cares to download it. The Free Software Foundation is an organisation which is dedicated to furthering this tradition. However, installing such software is often a process done by hand. This paper introduces INSTALL, a software solution which can be distributed with software to provide an automated means of installing software. This solution has been placed under the GNU General Public License. Copyright (c) 1994 Stuart Herbert Permission is granted to copy and distribute verbatim copies of this paper provided the copyright and this permission notice are preserved on all copies. Anyone seeking to distribute material derived from this paper should contact the author for permission to do so. All trademarks are the property of their owners. Conventions In This Paper References to sections are contained inside parenthesis, and are referenced by number; e.g. (1.2) references section 1.2 of this paper. References to the annotated bibliography are contained in square brackets, and are referenced by number; e.g. [1] references reference number 1 of the annotated bibliography. Brief Glossary o distribution A collection of files which are released as a single entity; normally as some form of tape archive (.tar file). o file hierarchy All files and sub-directories contained within a directory. o image Any file which can be executed by the user; normally resulting from a compilation of source code. o manifest A list of the contents of a distribution. Introduction Status Of This Paper This is the first draft of this paper, which includes an implementation of INSTALL. This paper will be distributed initially with The System Manager, and to certain USENET news groups and ftp sites, in an effort to gauge public reaction, and future revisions are expected to follow. Organisation Of This Paper o 1. Background An outline of the problems which currently exist, and the objectives which the solution aims to address. o 2. Architecture An detailed explaination of the architecture of the solution. o 3. Defined Functions The functions supplied to a manifest file are explained, and the differences of behaviour between the functions supplied by INSTALL and by INFO are noted. o 4. Annotated Bibliography A (limited) list of sources for further information. Content List 1. Background. 1.1 General Issues. 1.2 Specific Problems. 1.3 Criteria. 1.4 History. 1.5 Proof-Of-Concept. 2. Architecture. 2.1 Overview. 2.2 Manifest Files 2.3 INSTALL 2.4 INFO 2.5 REMOVE 2.6 Other Considerations 2.6.1 Inherant Flaws 2.6.2 Strategy For Success 3 Defined Functions. 3.1 Overview 3.2 Function List. 3.2.1 author() 3.2.2 comment() 3.2.3 depend() 3.2.4 dir() 3.2.5 endinfo() 3.2.6 file() 3.2.7 link() 3.2.8 log() 3.2.9 pause() 3.2.10 require() 3.2.11 root() 3.2.12 target() 3.2.13 title() 3.3 Error Codes. 4 Annotated Bibliography 4.1 Overview 4.2 [1] : Bourne Again SHell (/bin/bash) Manual Page 4.3 [2] : The GNU General Public License 1. Background. 1.1 General Issues. This paper documents INSTALL, a freely distributable software solution which aims to provide an automated way for users and system administrators alike to install third-party software onto a UNIX system, and to remove it afterwards. INSTALL is aimed squarely for adoption by software developers. It provides tools for creating an installation manifest, for actually installing the software, and for removing the software at a later date. The motivation behind INSTALL comes from a number of areas o The availability of free implementations of UNIX means that the number of system administrators who have only a rudimentary knowledge of maintaining a UNIX system is very much on the increase. This cross-section of the UNIX population is in need of assistance. USENET newsgroups which offer that assistance, such as comp.os.linux.help, often fail to deliver simply because of the sheer number of people seeking such help. o Experienced system administrators often spend a significant proportion of their time either installing or removing software. This process can be protracted, tedious, and prone to error, especially removal; software which has long enjoyed a place on a file store may consist of files which are not obviously connected with the software, and which may escape the attention of whoever is removing the software. o Users often download and use software which meets their specific needs; the local system administration may not desire to install the software for all users. On large systems, if the system administrators were to install every piece of software their users wanted, they would have little time for anything else. By providing a means for users to install software in their own filestore, and for the system administration to be aware of software so installed, a good working compromise can be achieved. One can also look to non-UNIX platforms, such as Microsoft Windows, where limited installation systems are supplied with distributions, for further evidence to support the proposal of an automated installation solution. This paper, and the proposed solution, arose out of development work on an administration tool aimed at users of Linux, a free UNIX implementation. It represents several months of work by several local administrators, each with several years worth of experience, on examining issues related to the administration of systems supporting up to several thousand users. As proof-of-concept, the solution has been integrated into the aforementioned administration tool to provide a means for third party developers to release 'drop in modules' for that tool. It is expected that feedback from that project will form the bulk of evidence used in the evolution of the solution. 1.2 Specific Problems. The following points were considered of primary urgency, and are listed in no particular order. o On systems catering for the diverse needs of a large number of users, centrally installed software adds to the number of files contained on the /usr file hierarchy. It is currently left to administrators to provide local methods of keeping track of any software added to the /usr file hierarchy. One strategy to minimise the impact of adding software is to ensure that such software is placed inside the /usr/local file hierarchy. However, considerable amounts of software require files to be placed outside of this hierarchy, in /etc, or elsewhere. o When adding files to the /usr hierarchy, one is very much dependant on being supplied with sufficient documentation to make sure that one knows when specific files must be placed in specific locations. Documentation (perhaps rightly) often assumes an understanding of where certain types of file naturally belong; those whose background knowledge is not as thorough as anticipated are at a disadvantage here. One can indignantly claim that this is a problem which should be solved by training, rather than by software. However, the availability of free implementations of UNIX, sold on CD-ROM at low cost and high volume, means that there is a whole new generation of system administrators who do not have access to experienced personnel from who they can learn. o It can often arise that a distribution will rely on prior installation of other, unrelated distributions. In these cases, one is dependant on being supplied with sufficient documentation to indicate that this so. o When preparing a distribution for release, writing documentation (especially documentation which provides a measure of 'hand holding') is a tedious task which one is often tempted to leave out. In addition, the following problems arise when considering any implementation of a software solution. o Any solution will only be a success if it is adopted by a large number of third-party developers. (History shows that the technical merit of a solution is very much a secondary requirement for success.) o The solution must prove portable between different flavours of UNIX. A large amount of new software is targetted at several UNIX implementations, with one distribution including support for all target UNIX flavours. o The solution must prove highly flexible, being able to provide batch automation and interactive use. o It should be practical to include the solution with distributions. These issues play a significant role in the design of the final solution. 1.3 Criteria. From the above problems and considerations, the following criteria was decided upon. o Provide a solution to all of the problems in (1.2) which does not place undue burdens upon software developers. o Provide a proof-of-concept release, which will permit validation of the suitability of the solution. 1.4 History. The adoption of the World Wide Web by the University Of Sheffield as the means to implement a Campus Wide Information Service brought about the reality that, to remain effective, the local user group was required to branch out from Novell Netware into the world of UNIX. Due to the nature of the sources of funding, the user group was put into the position whereby it could only secure suitable hardware to be a UNIX server at a date after the group was due to lose its experienced administration team. In addition, the group was forced to chose a free implementation of UNIX, which meant that the incoming administration team would be almost completely without local help. In response, the outgoing administration team sought to develop a framework which would allow for the development of user-friendly software which could walk an inexperienced user through many tasks. The framework allows for 'modules' to be added and removed easily, and it was this 'drop in' concept which lead to the requirement for a proper installation system. In addition, there was concern at the ability of the incoming administration team to maintain a UNIX system while they accumulated sufficient knowledge and experience. While this concern cannot be met in the short term, by developing a solution for the long term, we can help ease the pressures faced in future years during the learning period. 1.5 Proof-Of-Concept. As mentioned in (1.1), the current emphasis is upon proving the concept. The System Manager was chosen as a suitable test, becase o The System Manager requires the ability to install and remove distributions in an easy and efficient manner. o The System Manager is targeted at software developers for a popular implementation of UNIX (Linux). o The System Manager is targeted at a large user base which is more used to DOS than to UNIX, thus allowing a test of how useful the solution actually is to the very users who need it most. Feedback from The System Manager will form the first body of evidence which will be used in the evolution of the solution. If this test proves satisfactory, the solution will be positioned in the UNIX community as a stand-alone, viable proposition. 2. Architecture. 2.1 Overview. The solution consists of the following. o A manifest This is a list of what files require installing where. To provide as much flexibility as possible, the manifest is a script for the /bin/bash shell, which makes use of supplied functions to perform the installation. The manifest is supplied by the author of the distribution. o INSTALL This is a script for the /bin/bash shell, which defines the functions used within a manifest. It is also responsible for creating the list of installed files, which is used by the REMOVE script. o INFO This is a script for the /bin/bash shell, which defines the functions used within a manifest. Because many functions are defined to do nothing, INFO is suitable for examining a manifest file without having to perform an installation. o REMOVE This is a script for the /bin/bash shell, which uses the information created by INSTALL to reverse an installation at a later date. This architecture was inspired by the way Makefiles have been extended to become Imakefiles, and particularly the Linux kernel configuration script by raymondc@microsoft.com. Imakefiles provide a set of variables and functions which are used to perform the conditional compilation; the C preprocessor is drawn upon to provide part of the conditional execution. In contrast, the Linux configuration script simply exports a set of defined functions, and calls a second script to perform the actual configuration. This approach has greater simplicity than using the C preprocessor, and can be adapted to provide greater flexibility. That flexibility comes from the ability to redefine the behaviour of the functions in (3) depending upon the task at hand. The approach taken has been to define at most two different behaviours, where one is always a no-operation. This means that programmers are not subjected to having the functions proving useless because their behaviour cannot be relied upon. As explained in (2.2), the special function `endinfo` has been provided to allow the programmer to assume what is actually happening. 2.2 Manifest Files A manifest file is a shell script for the /bin/bash shell, which is called from within INSTALL, INFO or any other such utility. Because the file is called using the `.` command, the file need not have its permissions set as executable. When called with no parameters, a manifest file should attempt to use the functions definied in (3) to install a distribution. The behaviour of a manifest file when called with command line parameters is undefined. A manifest file will generally follow the following structure. o Call `title` and `author` to identify the distribution. o Make repeated calls to `comment` to display some information about the distribution. o Call `endinfo` to tell INFO to stop parsing the manifest. All code after a call to `endinfo` can assume that an installation is to take place. o Test for any other distributions which are required, using `depend` and `require`. If these tests fail, then add a message to the log file, and perhaps exit. o Compile any source code, format any documentation or execute any other processes required to create the files to be installed. o Call `target` to determine where to install any files. o Create any directories which are required. o Install files and symbolic links. 2.3 INSTALL INSTALL is a script for the shell /bin/bash, which defines and exports the functions defined in (3), and then uses the `.` command to call the specified manifest files. When called with no parameters, INSTALL displays a list of manifest files available for installation, and then exits. INSTALL looks for manifest files in the directory './.MANIFEST'. By changing directory, one can therefore obtain different lists of manifest files. This strategy was chosen to allow each distribution to supply an independant set of manifest lists. One should include INSTALL in a distribution, and place it in the top directory created by extracting files from the distribution. For example, if `tar zxf INSTALL.tar.gz` creates INSTALL/ and places all files inside 'INSTALL/', then the following should be included in a distribution. INSTALL/INSTALL (a) INSTALL/.MANIFEST/ (b) where (a) is the INSTALL script definied as part of this solution, and (b) contains the manifest files used to install the distribution. The user can then `cd INSTALL` `INSTALL` to obtain a list of manifests to choose from, and then `INSTALL [-f] [ [-f] ...]` to actually install, where the switch '-f' ensures that any existing files are overwritten (default behaviour is to skip files which already exist). Once the installation process is complete, a list of installed files is saved in the user's home directory '~/.INSTALLed/' for use by REMOVE at a later date. The contents of this directory can also be examined by system administrators to build a list of software installed by users; popular packages can then be considered for installation centrally. 2.4 INFO INFO is a script for /bin/bash, which defines and exports the functions defined in (3), and then uses the `.` command to call the specified manifest files. When called with no parameters, INFO displays a list of manifest files available for examination. INFO defines most of the functions in (3) as no-operations, and provides the function `endinfo` to allow a manifest file to indicate that it has finished providing the user with information about itself. Like INSTALL, INFO looks in the '.MANIFEST/' directory for any available manifest files. While INSTALL should be included in a distribution, INFO, because of its more limited application, is only recommended for inclusion where the distribution supplies many manifest files. 2.5 REMOVE REMOVE is a shell script for the /bin/bash shell which attempts to remove an INSTALLed package. During the installation process, INSTALL creates a file inside '~/.INSTALLed' which is a list of all files and directories which REMOVE should attempt to remove for each distribution. REMOVE parses each specified file twice. o The first pass identifies files to be removed. Files are only removed if they are not listed in any of the other files inside '~/.INSTALLed'. o The second pass identifies directories to be removed. Directories are only removed if they are found to contain no files. If the superuser wishes to REMOVE distributions installed by other users, he or she should use the `su` command to become that user, and then use REMOVE. As with INSTALL, it is recommended that REMOVE is included with all distributions. 2.6 Other Considerations 2.6.1 Inherant Flaws The danger of using automated installation is that the procedure is open to abuse, and this is a serious problem for the superuser. However, consider the following. o There currently exists numerious ways in which any malicious intent could be realised; a trojan horse could be placed within a distribution, the 'install' target of a Makefile could cause damage, etc. etc. INSTALL is by no means unique in having this flaw. o The supplied INSTALL script could itself be modified to act maliciously. This can be prevented by having centrally installed the INSTALL, INFO and REMOVE scripts. As the current working directory should NEVER be placed anywhere but last within the PATH, this prevents the problem. o System administration normally includes the requirement of writing shell scripts, and /bin/sh compatible shells are generally considered the most suitable for the job. This means that it can be considered reasonable for most administrators to read manifest files before using INSTALL. It is general recommended practice that the superuser NEVER executes anything from a non-trusted source unless they have examined it first. 2.6.2 Strategy For Success In (1.2), it was noted that work is required to ensure the success of INSTALL. o The shell /bin/bash was chosen because it is available across many platforms, helping to ensure compatability (as opposed to /bin/sh, which can differ in capability depending upon the vendor). o The solution has been placed under the GNU General Public License [2], to ensure that the solution is freely available and has unrestricted distribution. o The initial release of the solution has been targeted at users of a free implementation of UNIX. The users of Linux are normally willing to examine any new software presented to them (this is perhaps due to their nature; most run Linux as a pastime, and they therefore have more time to spend examining new software than would otherwise be the case). o If the solution proves popular, an attempt should be made to freely transfer the copyright to the Free Software Foundation. It cannot be denied that software distributed by the Free Software Foundation enjoys success on many UNIX platforms, and this may prove to be the key in securing the long term use of INSTALL et. al. 3 Defined Functions. 3.1 Overview The solution provides a series of shell functions which can be used to perform specific tasks. The functions below are definied for INSTALL and INFO. 3.2 Function List. The following functions are available inside MANIFEST files. o author o comment o depend o dir o endinfo o file o link o log o pause o require o root o target o title 3.2.1 author() This function takes two parameters. o Author's name o Author's address A copyright message, crediting the author, is displayed. 3.2.2 comment() This function takes two parameters. o A text string o 'y' if output to be logged The text string is echoed to the screen, and is also added to the log file if the second parameter is a 'y' or a 'Y'. 3.2.3 depend() This function takes two parameters. o A switch to a `test` [1] statement o A file or directory name The specified test is performed upon the specified file or directory, and a value of 254 is returned if the test fails. NOTE: This function does nothing inside INFO. 3.2.4 dir() This function takes three parameters. o The name of a directory o The permissions for the directory o 'y' if the directory should be considered for REMOVEing The specified directory is created (and any leading directories if they do not exist) and its permissions are set to those specified. If the specified directory already exists, the operation is aborted, and a value of 255 is returned. If the third parameter is 'y' or 'Y', the directory is added to the list of files which REMOVE will attempt to remove. REMOVE will only remove a specified directory if it has managed to empty the directory first. NOTE: This function does nothing inside INFO. 3.2.5 endinfo() This function requires no arguements. This function exits the shell script. NOTE: This function does nothing inside INSTALL. 3.2.6 file() This function takes three arguements. o A file to copy. o The destination name of the file. o The permissions of the destination file. The named file is copied as the destination file, and its permissions are set as specified. If the destination file exists, the operation is aborted, and the value 255 is returned. NOTE: This function does nothing inside INFO. 3.2.7 link() This function takes two parameters. o A file or directory which is to be linked. o The destination of the link. The symbolic link is created. If the specified destination exists, the operation is aborted, and the value 255 is returned. NOTE: This function does nothing inside INFO. 3.2.8 log() This function takes two parameters. o A text string. o 'y' if the output is to be echoed to the screen. The text string is added to the log file, and if the second parameter is 'Y' or 'y', the string is echoed to the screen. NOTE: This function does nothing inside INFO. 3.2.9 pause() This function takes no parameters. The user is prompted to press ENTER or RETURN to continue, or to press ctrl-c to abort. If the user presses ctrl-c, this function does not return. NOTE: This function does nothing inside INFO. 3.2.10 require() This function takes one parameter. o A utility which is required by the distribution. The existance of the utility is tested for, first by seeing if the file exists, and then by seeing whether the utility can be found within the PATH. If both tests fail, the value 254 is returned. 3.2.11 root() This function takes no parameters. If the user is not root, or equivalent, the function does not return. NOTE: This function does nothing inside INFO. 3.2.12 target() This function takes two parameters. o The recommended hierarchy where the distribution should install to. o The sub-directory inside the recommended hierarchy where the distribution should install to. This function sets no less than four variables. o TARGETBIN is the directory where any images should go; this directory will normally be within the user's PATH. (Default is /usr/local/bin if root, or ~/bin otherwise) o TARGETDIR is the directory where the distribution should go; this may or may not be the directory recommended by the call to this function. (Default is $1/$2 if root, or ~/$2 otherwise) o TARGETLIB is the directory where library files should go. (Default is /usr/local/lib if root, or ~/lib otherwise) o TARGETMAN is the directory where manual pages should go. (Default is /usr/local/man if root, or ~/man otherwise) This function may be altered by local system administrators to suite local conditions, and during this function the user may or may not be prompted to recommend any target directory. NOTE: It is currently left to the MANIFEST script to ensure that these directories exist. NOTE: This function does nothing inside INFO. 3.2.13 title() This function takes one parameter. o A text string. The text string is prominently displayed on the screen. 3.3 Error Codes. Several functions return error codes, the meaning of which is always the following. o 255 The function discovered that a specified file or directory already exists, and that the operation was therefore aborted. The user is informed that the specified file or directory has been 'skipped', and an entry to that effect is also added to the installation log file. o 254 The function discovered that a specified file or directory does not exist, and that the operation was therefore aborted. The user is informed that a 'warning' has been generated, and an entry to that effect is also added to the installation log file. o 1 The function discovered that a specified test succeeded. The user is informed that the specified file or directory has been 'found', but no entry is added to the installation log file. o 0 The function completed its specified action successfully. When creating files, directories, and symbolic links, the user is informed that such entities have been 'added', but no entry is added to the installation log file. 4 Annotated Bibliography 4.1 Overview The references mentioned here should be consulted as extra sources of information. 4.2 [1] : Bourne Again SHell (/bin/bash) Manual Page The shell /bin/bash is an sh-compatible shell which has been chosen as most suitable for use in the solution. If one wishes to adopt the solution and include INSTALL and manifests with distributions, one must be familiar with programming for /bin/bash. 4.3 [2] : The GNU General Public License This license, which at the time of writing stands at version 2, grants certain rights to users of software, and also ensures that those rights cannot be curtailed in any manner. 0.1.1/doc/README100640 765 144 11321 5600312151 11725 0ustar ac3slhusersThe System Manager - Copyright (c) 1994 Stuart Herbert ===================================================================== README : Introducing The System Manager ===================================================================== == Introduction ===================================================== The System Manager is an administration tool for UNIX. It provides an interface between the user and standard UNIX commands. It is copyrighted under version 2 of the GNU General Public License. This is the README for version 0.1.1. This version is ALPHA quality software, and has been released to test proof-of- concept. -- NOTE : -- This software is a FRAMEWORK for building a user- friendly front-end to UNIX administration. By itself it does little of interest. However, it provides a potential starting point. ---- == Where To Get It ================================================== The System Manager has been uploaded to sunsite.unc.edu, into /pub/Linux/Incoming - hopefully it will eventually move into /pub/Linux/ALPHA. == Content ========================================================== The base distribution contains * System Manager module manager This provides support for separate modules; a module is a separate program which provides support for a given purpose. * Example modules Creating new users, deleting users, changing a user's details, a local news facility, tar installation, module installation. * TEMPLATE module This module is a framework in which you can add your own code, so that you can create new modules which can be distributed with your application. * Documentation Documentation on writing modules. A bit ropey, but I'd rather get this out now for people to give me some feedback than sit on it until the docs are polished. (One of the reasons that this is ALPHA is because the documentation still needs a *lot* of work.) == Required Utilities =============================================== The following utilities are required. * dialog I recently uploaded 'dialog-0.4' to sunsite.unc.edu, which includes some new options. If you already have dialog (it comes with Slackware), please get this later version (or else some things won't work!), and if you don't have dialog, you'll need to get it. Look in /pub/Linux/utils/shell on sunsite.unc.edu, once it has moved from /pub/Linux/Incoming. * useradd, usermod, userdel, groupadd, groupmod, groupdel These are part of the shadow passwords suite. YOU DO NOT NEED TO BE USING SHADOW PASSWORDS. Because there is little support for shadow passwords, the User module is written to work with normal passwords BUT you still need these utilities if you want to use the User module. == Optional Utilities =============================================== * /bin/ash This neat, and very small (especially when compared to bash :) sh-compatible shell is used to launch a script to test for new news when a user logs in. If you don't have it, you can use bash instead, but using ash speeds up logging in a bit on my low-end hardware. == A Note To Developers ============================================= The System Manager provides support for YOU to write self- containe 'modules'. These modules can be used as a front-end to powerful commands (see Users module), or to implement a new facility (see News module), or to provide a front-end to configuring software. I don't recommend that developers start supporting the System Manager until it enters BETA testing. (I don't expect the code to change much, but at the moment, the documentation is minimal.) In addition, the System Manager should port to many other UNIX platforms; I intend to see just how many :-) == Copyright ======================================================== The base distribution is copyright (c) 1994 Stuart Herbert, and is released under version 2 of the GNU General Public License. If you like it, please distribute like crazy. == PS =============================================================== Send flames to /dev/null. I think Linux needs tools like this; even if this doesn't work out, perhaps having working code will spur someone on to do better things. Constructive critism is most welcome - I'd be especially keen on ideas for providing users with 'tutorial' info so that they can learn just what the System Manager is doing on their behalf, so that they learn how to use various UNIX commands. Any features which would help module writers - let me know. And, of course, bugs (and bug fixes :) are welcome. ===================================================================== Stuart Herbert - S.Herbert@Sheffield.ac.uk 0.1.1/doc/Introduction100640 765 144 16065 5577731157 13513 0ustar ac3slhusersThe System Manager, An Admin Tool For UNIX ============================================================================== Introduction For Developers ============================================================================== == Introduction ============================================================== The System Manager is a collection of 'modules', individual programs which provide support for specific tasks. This file is an overview to the System Manager, and this should be of interest to developers. (Stuart's note : This documentation sucks. If there's anything you're not sure about, look at the supplied modules, or mail me. My main priority before this becomes BETA is to write some decent documentation.) == Directory Structure ======================================================= The System Manager has a standard directory layout : * /var/adm/sysman/bin This directory contains any utilities required by your module. * /var/adm/sysman/install This directory should only contain the sub-directory MANIFEST. (Stuart's note : This directory is used by distributions to hold files which will be installed into the /usr/ hierarchy by the INSTALL script.) * /var/adm/sysman/install/MANIFEST This directory contains MANIFEST files which are built automatically by the System Manager. These files are used for REMOVEing installed modules; you can also distribute them with the INSTALL script to simplify installing your module. * /var/adm/sysman/modules This directory contains all the modules, one sub-directory for each module. * /var/adm/sysman/src This directory can be used to provide the user with the source code to any supporting utilities (needless to say, this is optional). == Contents Of A Module ====================================================== The directory /var/adm/sysman/modules contains all installed modules. Each module is a separate sub-directory, which contains a file called 'README.module', any programs which are to be linked into the module's menu, and any data files these programs require. IT IS A REQUIREMENT THAT EVERY EXECUTABLE FILE INSIDE A MODULE'S DIRECTORY CORRECTLY HONOUR THE FOLLOWING PARAMETERS : --SysmanAuthor The program should echo to the screen some 'blurb' about who wrote the program and what it does. The 'INFO' option on every menu uses this parameter to find out about the contents of the module, by calling each program with the --SysmanAuthor parameter. --SysmanInstall The program should echo a valid menu string (explained below) which is used by the UPDATE software to rebuild the System Manager's menus. As a consequence of this, any program required by your module, but which itself won't be directly available from the menus, should be placed in /var/adm/sysman/bin. -- NOTE : -- Any parameters starting with the string '--Sysman' are reserved for future use by The System Manager. ---- == README.module ============================================================= This is a /bin/bash shell script which has three purposes : * To supply the menu entry for the module When called with '--SysmanInstall', the script should echo a set of valid menu information, and then exit. * To supply information to the user When called with '--SysmanAuthor', the script should use the functions 'title', 'author' and 'comment' to provide a blurb about itself, and then call 'endinfo'. (As you will see later, when called with '--SysmanAuthor', a README.module file calls /var/adm/sysman/bin/ParseMod, which defines the INSTALL functions (see INSTALL.functions) so that most of them don't do anything. The script will then drop through into the same code as used for the last requirement.) * To provide a MANIFEST for use by INSTALL When called with no parameters, the script should use the INSTALL functions (see INSTALL.functions) to install the module. The script should check for any required support utilities, and install any files which ARE NOT contained in the same directory as the script itself. The code required to install files which are contained in the same directory as the script is automatically generated by the MANIFEST option. Please read the file 'INSTALL.functions' for information about the functions provided for use inside a MANIFEST. == Menu Strings ============================================================== A menu string has the following syntax : Root : Users : Name : Description :$0 where * Root This field is a 'Y' or a 'y' if the string defines an entry in the menus used by the user 'root', or 'N' or 'n' otherwise. * Users This field is a 'Y' or a 'y' if the string defines an entry in the menus used by non-root users, or 'N' or 'n' otherwise. * Name This field contains a UNIQUE, one word identifier which is used to distinguish this menu entry from all other entries on the same menu. The identifiers 'INFO', 'BACK' and 'DONE' are reserved for use by the System Manager. * Description This field contains a short description which is shown on the menu to explain what the entry is for. * $0 This will be substituted for the name of the program echoing the menu entry. (Stuart's note : This currently is unused, but please include it for future compatibility) Normally, the only program inside a module which echos two menu strings will be the README.module script, which may want to provide different NAME and DESCRIPTION for each type of user (root or non-root). However, any program can echo two menu strings. -- EXAMPLE -- #! /bin/bash # # Example menu string handler if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : N : EDIT : Edit A User's Details :$0" echo "N : Y : EDIT : Edit Your Details :$0" exit ;; ... esac fi # done ---- In the example above, when called with the parameter '--SysmanInstall', two menu strings are echoed, one for root, and one for non-root users. == Functions Available ======================================================= Although the programs which make up a module are not required to be shell scripts, there are functions available to those programs which *are* shell scripts. (Stuart's note : please read the 'sysman' script to see what variables and functions are available, and what they do.) == Distributing Modules ====================================================== Once you have written your module, and you've run the MANIFEST option of the SYSMAN module, you simply need to do the following to create a distribution : tar zcf mymodule.tar.gz modules/MyModule INSTALL \ install/MANIFEST/MyModule + any other files your module requires. When a user extracts the tar file, they will be able to run the INSTALL script to install your module correctly. (Stuart's note : Perhaps I should provide a module to create a distribution for any given module?) ============================================================================== Stuart Herbert - S.Herbert@Sheffield.ac.uk 0.1.1/doc/INSTALL.functions100640 765 144 13412 5577450543 14135 0ustar ac3slhusersLinux - POSIX On A PC For FREE ============================================================================== INSTALL - A Script For Packages ============================================================================== == Introduction ============================================================== INSTALL is a script for the shell /bin/bash, which can be distributed with your software. It allows users not only to install your software, but also to REMOVE it afterwards if they so wish. INSTALL is inspired by the Linux kernel configuration script by raymondc@microsoft.com, and is released under the GNU General Public License version 2 (see COPYING for further details). == How It Works ============================================================== The script INSTALL creates a set of shell functions, which are described later. After this, files specified as command line parameters are 'sourced' using the . command. These files are also shell scripts, which make use of the defined shell functions to perform the actual installation. INSTALL expects to find any specified files in the directory > ./install/MANIFEST/ and, it is for this reason that the files are called MANIFESTS. Given the command line > INSTALL base INSTALL will source the file ./install/MANIFEST/base. During installation, INSTALL may create a file called 'README.install'. This file is the log file, and the user will be prompted to read it once the INSTALLation is complete. When called with no parameters, INSTALL lists the available MANIFEST files. == REMOVE ==================================================================== REMOVE is a sister script for INSTALL; it will REMOVE a specified package. REMOVE will only remove file() and link() entries - it specifically leaves directories alone. If you want to allow users to REMOVE your software (and there is no reason why you shouldn't), make sure that your MANIFEST script installs the REMOVE script, and the MANIFEST script. If the shell variable TARGET is where all your files are being installed to, then > INSTALL sysman where the MANIFEST file 'sysman' includes the following > TARGET="/var/adm/sysman" # base directory to install to > > dir $TARGET/install 755 > dir $TARGET/install/MANIFEST 755 > file install/REMOVE $TARGET/REMOVE 755 > file install/MANIFEST/sysman $TARGET/install/MANIFEST/sysman 755 makes sure that 'cd /var/adm/sysman ; REMOVE sysman' will work. NOTE that REMOVE, like INSTALL, looks for MANIFEST files in ./install/MANIFEST. So, the MANIFEST file used for installing 'sysman' should be in ./install/MANIFEST, relative to where you put REMOVE. == Defined Functions ========================================================= The following functions are created by INSTALL for use within MANIFEST files : * author
Displays the string 'Copyright ()'. * comment [ y ] Displays the string ': '. If the 'y' parameter is present, the string is also added to the installation log file. * dir Creates , and uses chmod to change it's permissions to . If exists, a warning is displayed, and error code 255 is returned. * file Uses cp to copy the file as file , and uses chmod to change 's permissions to . If exists, a warning is displayed, and error code 255 is returned. * info [ y ] Displays the string ': '. If the 'y' parameter is present, the string is also added to the installation log file. (See below for explaination of the difference between comment and info). * link Create a symbolic link. If exists, a warning is displayed, and error code 255 is returned. * log [ y ] Add to the installation log file. If the 'y' parameter is present, the string ': ' is also echoed to the screen. * pause Prompts the user to press ENTER or RETURN to continue, or to press ctrl-c to quit. Useful if you want to give the user a chance to stop the installation. * require Uses the 'which' command to attempt to locate . If cannot be found, a warning is displayed and the error code 254 is returned. * title Displays the string <title> on the screen in a highly visual way. Useful to let the user know what they are installing. == comment Versus info ======================================================= Both the 'comment' and 'info' functions appear to be exactly the same, and as far as INSTALL is concerned, they are. However, MANIFEST files can be generated by The System Manager for it's own modules, and it is here that the two functions differ. (INSTALL was written as a by-product of the System Manager. It will be interesting to see which outlives the other :-) Under the System Manager, each 'module' has an accompanying file called 'README.module'. This file is used to create a MANIFEST file so that you can distribute your modules. It is also used to allow the user to see who wrote the module. When the user is seeing who wrote a module, the 'README.module' file is parsed, with the functions 'title', 'author' and 'info' being the only ones which do anything. This means that 'comment' does not work. This allows you to include a big blurb at the top of a README.module to say what your module is about, which will be shown by both INSTALL and the System Manager. Any later comments, perhaps explaining how to compile something, will only be shown by INSTALL. ============================================================================== Stuart Herbert - S.Herbert@Sheffield.ac.uk ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/sysman����������������������������������������������������������������������������������������100750 � 765 � 144 � 17256 5577343454 11603� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk set -h #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = Message to display function Abort() { if [ "$SysmanDialog" = "0.3" ]; then dialog --title "OPERATION ABORTED" --msgbox "\n$1" 7 71 else dialog --title "OPERATION ABORTED" --backtitle "$SysmanBackTitle" --msgbox "\n$1" 7 71 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $@ = Command line function Dialog() { if [ "$SysmanDialog" = "0.3" ]; then dialog --title "$SysmanTitle" "$@" else dialog --title "$SysmanTitle" --backtitle "$SysmanBackTitle" "$@" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = Message to display function InfoBox() { Dialog --infobox "\n$1" 5 71 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = Menu to display function Menu() { while [ 0 ]; do . $1 done } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = Message to display function MsgBox() { Dialog --msgbox "\n$1" 7 71 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = OneOfAll, ManyOfAll, OneOfMine, ManyOfMine # $2 = Message To Display # $3 = File to dump it into # $4 = Already selected groups function SelectGroup() { local x local y if [ -f $3 ]; then rm -f $3 fi touch $3 InfoBox "Creating list of groups ... please wait" case "$1" in "OneOfAll") sort /etc/group | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --radiolist "$2" 20 71 13 $MenuLine 2> $3 ;; "ManyOfAll") sort /etc/group | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --checklist "$2" 20 71 13 $MenuLine 2> $3 ;; "OneOfMine") sort /etc/group | grep $USER | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --radiolist "$2" 20 71 13 $MenuLine 2> $3 ;; "ManyOfMine") sort /etc/group | grep $USER | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --checklist "$2" 20 71 13 $MenuLine 2> $3 ;; *) Abort "Unknown option $1" return esac if [ -s $3 ]; then MenuLine="`cat $3 | tr -d "\042" `" `echo "$MenuLine" > $3` fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = OneOfAll, ManyOfAll # $2 = Message To Display # $3 = File to dump it into # $4 = Already selected users function SelectUser() { local x local y if [ -f $3 ]; then rm -f $3 fi touch $3 InfoBox "Creating list of users ... please wait" case "$1" in "OneOfAll") sort /etc/passwd | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --radiolist "$2" 20 71 13 $MenuLine 2> $3 ;; "ManyOfAll") sort /etc/passwd | while read x; do MenuLine="`echo $x | cut -s -d : -f 1`" if [ "$4" = "" ]; then `echo -n "$MenuLine $MenuLine off ">> $3` else for y in $4 ; do if [ "$MenuLine" = "$y" ]; then `echo -n "$MenuLine $MenuLine on " >> $3` else `echo -n "$MenuLine $MenuLine off ">> $3` fi done fi done MenuLine="`cat $3`" Dialog --checklist "$2" 20 71 13 $MenuLine 2> $3 ;; *) Abort "Unknown option $1" return esac if [ -s $3 ]; then MenuLine="`cat $3 | tr -d "\042" `" `echo "$MenuLine" > $3` fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = File to display function TextBox() { Dialog --textbox "$1" 20 76 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = Question to ask function YesOrNo() { Dialog --yesno "\n$1" 7 71 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # exported functions export -f Abort # Display abort dialog export -f Dialog # Call dialog(1) export -f InfoBox # Display dialog box and continue export -f Menu # Walk the menu files export -f MsgBox # Display dialog and wait for OK export -f SelectGroup # Select a group(s) export -f SelectUser # Select a user(s) export -f TextBox # Display a file export -f YesOrNo # Ask a question #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # create some variables # directory where required support binaries live bin="/var/adm/sysman/bin" #SysmanDialog="0.3" # uncomment this if using v0.3 SysmanDialog="0.4" # I use v0.4, which I uploaded to # sunsite.unc.edu # temporary files, for whatever use we can find. # there must be a better way to create these than calling RANDOM :-) SysmanFile1="/tmp/sysman.$USER.$RANDOM" SysmanFile2="/tmp/sysman.$USER.$RANDOM" SysmanFile3="/tmp/sysman.$USER.$RANDOM" # directory where the user ran this SysmanStartDir="`pwd`" # current version number SysmanVersion="0.1.1" # title for dialog boxes SysmanBackTitle="The System Manager v$SysmanVersion (June 1994) - $USER@$HOST" SysmanTitle="The System Manager" #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # exported variables export bin export SysmanBackTitle export SysmanDialog # you shouldn't need this export SysmanFile1 export SysmanFile2 export SysmanFile3 export SysmanStartDir export SysmanTitle #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # ok, let's get down to business pushd . > /dev/null # we change directory cd /var/adm/sysman if [ $# -eq 0 ]; then # no command line parameters cd modules if [ $UID -eq 0 ]; then # you're root Menu Root.menu # run root's menu else Menu User.menu # run non-root's menu fi else cd "$1" # change to specified directory shift # get rid of $1 "$@" # execute the command line fi #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # clear up behind up for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/TEMPLATE��������������������������������������������������������������������������������������100750 � 765 � 144 � 1363 5577417613 11453� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk function main() { } # main code if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "YN : YN : NAME : DESCRIPTION :$0" exit ;; --SysmanAuthor) echo "$0: DESCRIPTION" echo "Copyright (c) Spods Anonymous" exit ;; --SysmanManifest) echo "Destination Dir : Permissions" exit ;; *) echo "Your parameter handing HERE" esac else main fi # clean up here for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do if [ -f $x ]; then rm -f $x ; fi done # that's it, folks �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/src/������������������������������������������������������������������������������������������ 40750 � 765 � 144 � 0 5574471360 10775� 5����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/src/Software/��������������������������������������������������������������������������������� 40750 � 765 � 144 � 0 5574471371 12571� 5����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/src/Software/InstallTar/���������������������������������������������������������������������� 40750 � 765 � 144 � 0 5574473600 14643� 5����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/src/Software/InstallTar/main.c����������������������������������������������������������������100640 � 765 � 144 � 1051 5574473451 16032� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include <string.h> void main(void) { char LastLine[1024]; char ThisLine[1024]; char c; char *d; int i=0; LastLine[0]='\0'; ThisLine[0]='\0'; while ((c=getchar())!=EOF) { switch (c) { case '\n' : if ((d=strrchr(ThisLine,(int)'/'))!=NULL) *d='\0'; if (strcmp(LastLine,ThisLine)!=0) { strcpy(LastLine,ThisLine); printf("%s\n",LastLine); } i=0; ThisLine[0]='\0'; break; default : ThisLine[i++]=c; ThisLine[i]='\0'; } } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/src/Software/InstallTar/ParseTar��������������������������������������������������������������100750 � 765 � 144 � 41017 5574473467 16445� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ d�����������° ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������è“��¸-���»����Í€£\ `‹D$£4 `·��Pè„��ƒÄè¼��è+���Pè‘�`[¸���Í€ë÷�%s �U‰åì ��èæ��Ç…ô÷ÿÿ����Æ…�üÿÿ�Æ…�øÿÿ�¡@ `9D `wh< `èG��`ƒÄ‰Àƒøÿu ë‹@ `Šÿ@ `ë°ÿˆÀˆ…ÿ÷ÿÿ<ÿ„î���Š…ÿ÷ÿÿ< téŸ���j/…�øÿÿPèv �`ƒÄ‰À‰…ø÷ÿÿƒ½ø÷ÿÿ�t ‹…ø÷ÿÿÆ��…�øÿÿP…�üÿÿPèÞ �`ƒÄ‰À…Àt*…�øÿÿP…�üÿÿPèÒ �`ƒÄ…�üÿÿPhT���èž�`ƒÄÇ…ô÷ÿÿ����Æ…�øÿÿ�ë9…�øÿÿ‰Â•ô÷ÿÿŠÿ÷ÿÿˆ ÿ…ô÷ÿÿ…�øÿÿ‰Â•ô÷ÿÿÆ�éÔþÿÿ‰ì]ÃU‰åS¡x��ƒøÿu1Àƒ=|���t@ƒ<…|���uõ‰Ã…Ût‹x��ÿÐKuô‹]ü‰ì]ÃU‰åS»H��ƒ=H���t‹ƒÃÿЃ;�uôhÈ��èVÿÿ_‹]ü‰ì]ÃU‰åƒ=���uÇ�����è¥ÿÿÿ‰ì]ÃS¸���‹\$Í€…À}÷Ø£��¸ÿÿÿÿ[Ã[ÃS¸V���‹\$Í€…À}÷Ø£��¸ÿÿÿÿ[Ã[ÃS¸���‹\$‹L$ ‹T$Í€…À}÷Ø£��¸ÿÿÿÿ[Ã[ÃS¸[���‹\$‹L$ Í€…À}÷Ø£��¸ÿÿÿÿ[Ã[Ã/lib/ld.so�: can't load dynamic linker '/lib/ld.so' � statically linked �ƒì8UWVS‹l$L‹\$Pƒ=<���„´���ÇD$D �ðbhJ��èâþÿÿƒÄ…Àt[‹|$¾U��ü¹ ���ó¥f¥…Àt€8�t@€8�uú+P‹SjèÙþÿÿƒÄ j*D$PjèÈþÿÿƒÄ h€���èZþÿÿƒÄëñhP��h4��‹T$\R‹SD$ P¸���…í¸���P‹D$\ÿЋT$,R‹T$,RèµþÿÿƒÄ ë&|$¾��ü¹���ó¥…í+jD$PjèMþÿÿƒÄ …íj�èÝýÿÿƒÄëô[^_]ƒÄ8Ãìf‹T$f…Òuºr��Ù|$f‹D$f%Àðf‰D$‰Ðf%?f‹T$f Ðf‰D$Ùl$ƒÄÃUWVS‹l$‹|$1Û9€��v ¾„��WU‹T$R‹ÿÐƒÄ ƒÆC9€��wæ[^_]Ãlibc.so.4�DLL Jump 4.5pl24���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Óëþ ������������������������,��6�����` ��ð`���ü�� ���������ø?�`����������l��0��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@���!������P���3���������F������T���W������T���f������T���x������È��������È��������È��¢���d���È��Á���d���È��Í���€�������ï���€���������€�������(��€�������A��€�������_��€�������£��€�������ç��€���������€�������'��€�������D��€�������`��€�������r��€�������…��€�������ž��€�������Ë��€�������æ��€���������€�������$��€�������0��€�������Y��€�������z��€������� ��€�������Ï��€�������ð��€�������!��€�������I��€�������p��€�������š��€�������Ä��€�������ç��€������� ��€�������/��€�������E��€�������}��€�������¯��€�������×��€�W�����ä��€�‚�����î��€�µ�����ù��€�3�������€�4�������€�5�������€�6�����$��€�7�����/��€�8�����:��€�9�����E��€�;�����P��€�E�����]��€�������†��€�l�����ª��€�.�����¿��$�È��Õ�� �¢����ì��$�§�����������$�¸X�������x��$�����x��3�����x��E��d���x��d��d���x��p��€�������’��€�������¤��€�������Ë��€�������ä��€���������€�������F��€�������Š��€�������¨��€�������Ê��€�������ç��€������� ��€������� ��€�������( ��€�������A ��€�������n ��€�������‰ ��€�������¥ ��€�������Ç ��€�������Ó ��€�������ü ��€������� ��€�������C ��€�������r ��€�������“ ��€�������Ä ��€�������ì ��€������� ��€�������= ��€�������g ��€�������Š ��€�������­ ��€�������Ò ��€�������è ��€������� ��€�������R ��€�������z ��€�W�����‡ ��€�‚�����‘ ��€�µ�����œ ��€�3�����¨ ��€�4�����² ��€�5�����½ ��€�6�����Ç ��€�7�����Ò ��€�8�����Ý ��€�9�����è ��€�;�����ó ��€�E������ ��€�������) ��€�l�����M ��€�.�����b �� �ø����v �����x�� �����x��Œ �����x��— �����x��¢ �����x��­ �����x��¸ �����x��à �����x��Î �����x��Ù �����x��é �����x��ò �����°��ÿ �����ð�������ð�������ð��)�����ð��4�����,��=�����0��R��������]������@��h�����LA `|�����H��‡�������–�����0�`«�����4��Á������`Ø����� ��ê�������`�������`�������`.�����°��:�����ø�`G�����È��Z�� ���x��i�����x��q������`{�����D��Š������`’�����x�`¥����� �`­�����ð��`¼������ �`È�������Û�����¨�`é����� �`ó������ �`û�����˜�������ˆ `!�����¨�`,��������4�����< `@�����d `N����� �`X�����x�`a�����(�`u�����`�`‰�����è��`–�����¸�`­�����Ô `º�����8�`Ç�����@�`Û�����H�`í������` �����€�`����� �`*�����(�`<�����X�`P����� �`]�����Ø�`d�����P�`w�����\ `„�� ���ˆ��Š�����P��¡�����ø�`½�����(�`Î�����ð��Û�������ì�����˜�`ü�����H�`�����p�`#����� ��1�����0�`C������`[�� ���€��k�����°�`z�����@�`Œ������`œ��������£�����˜�`«������`Ã����� ��Ù�������`å�����8�`ú�����Ð�`������d��������4 `�����l `�����x��&�� ���ˆ��+������`?�����X��G�����P�`_��/usr/lib/crt0.o�__entry�done�___shared_dummy__�___shared_dummy1__�/tmp/cca007421.o�gcc2_compiled.�___gnu_compiled_c�__main.o�gcc2_compiled.�___gnu_compiled_c�/home/jalod/gnu/src/gcc-2.5.8/�./libgcc2.c�int:t1=r1;-2147483648;2147483647;�char:t2=r2;0;127;�long int:t3=r1;-2147483648;2147483647;�unsigned int:t4=r1;0;-1;�long unsigned int:t5=r1;0;-1;�long long int:t6=r1;01000000000000000000000;0777777777777777777777;�long long unsigned int:t7=r1;0000000000000;01777777777777777777777;�short int:t8=r1;-32768;32767;�short unsigned int:t9=r1;0;65535;�signed char:t10=r1;-128;127;�unsigned char:t11=r1;0;255;�float:t12=r1;4;0;�double:t13=r1;8;0;�long double:t14=r1;12;0;�complex int:t15=s8real:1,0,32;imag:1,32,32;;�complex float:t16=r16;4;0;�complex double:t17=r17;8;0;�complex long double:t18=r18;12;0;�void:t19=19�reg_class:T20=eNO_REGS:0,AREG:1,DREG:2,\�CREG:3,BREG:4,Q_REGS:5,SIREG:6,\�DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\�FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,\�ALL_REGS:13,LIM_REG_CLASSES:14,;�machine_mode:T21=eVOIDmode:0,QImode:1,HImode:2,\�PSImode:3,SImode:4,PDImode:5,DImode:6,\�TImode:7,OImode:8,QFmode:9,HFmode:10,\�SFmode:11,DFmode:12,XFmode:13,TFmode:14,\�SCmode:15,DCmode:16,XCmode:17,TCmode:18,\�CQImode:19,CHImode:20,CSImode:21,\�CDImode:22,CTImode:23,COImode:24,\�BLKmode:25,CCmode:26,CCFPEQmode:27,\�MAX_MACHINE_MODE:28,;�mode_class:T22=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,\�MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,\�MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,;�ptrdiff_t:t1�size_t:t4�wchar_t:t3�UQItype:t11�SItype:t1�USItype:t4�DItype:t6�UDItype:t7�SFtype:t12�DFtype:t13�XFtype:t14�word_type:t1�DIstruct:T23=s8low:1,0,32;high:1,32,32;;�DIunion:t24=u8s:23,0,64;ll:6,0,64;;�func_ptr:t25=*26=f19�__do_global_dtors:F19�_exit_dummy_ref:G27=*1�__do_global_ctors:F19�_initialized.6�__main:F19�_exit.o�gcc2_compiled.�___gnu_compiled_c�/home/jalod/gnu/src/gcc-2.5.8/�./libgcc2.c�int:t1=r1;-2147483648;2147483647;�char:t2=r2;0;127;�long int:t3=r1;-2147483648;2147483647;�unsigned int:t4=r1;0;-1;�long unsigned int:t5=r1;0;-1;�long long int:t6=r1;01000000000000000000000;0777777777777777777777;�long long unsigned int:t7=r1;0000000000000;01777777777777777777777;�short int:t8=r1;-32768;32767;�short unsigned int:t9=r1;0;65535;�signed char:t10=r1;-128;127;�unsigned char:t11=r1;0;255;�float:t12=r1;4;0;�double:t13=r1;8;0;�long double:t14=r1;12;0;�complex int:t15=s8real:1,0,32;imag:1,32,32;;�complex float:t16=r16;4;0;�complex double:t17=r17;8;0;�complex long double:t18=r18;12;0;�void:t19=19�reg_class:T20=eNO_REGS:0,AREG:1,DREG:2,\�CREG:3,BREG:4,Q_REGS:5,SIREG:6,\�DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\�FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,\�ALL_REGS:13,LIM_REG_CLASSES:14,;�machine_mode:T21=eVOIDmode:0,QImode:1,HImode:2,\�PSImode:3,SImode:4,PDImode:5,DImode:6,\�TImode:7,OImode:8,QFmode:9,HFmode:10,\�SFmode:11,DFmode:12,XFmode:13,TFmode:14,\�SCmode:15,DCmode:16,XCmode:17,TCmode:18,\�CQImode:19,CHImode:20,CSImode:21,\�CDImode:22,CTImode:23,COImode:24,\�BLKmode:25,CCmode:26,CCFPEQmode:27,\�MAX_MACHINE_MODE:28,;�mode_class:T22=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,\�MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,\�MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,;�ptrdiff_t:t1�size_t:t4�wchar_t:t3�UQItype:t11�SItype:t1�USItype:t4�DItype:t6�UDItype:t7�SFtype:t12�DFtype:t13�XFtype:t14�word_type:t1�DIstruct:T23=s8low:1,0,32;high:1,32,32;;�DIunion:t24=u8s:23,0,64;ll:6,0,64;;�func_ptr:t25=*26=f19�_exit_dummy_decl:G1�__T00018.o�__T00051.o�__T00059.o�__T00122.o�__T00450.o�__T00452.o�__T00463.o�__D00120.o�__D00126.o�__fpu_control.o�__load.o�__setfpucw.o�printf.o�gcc2_compiled.�___gnu_compiled_c�set-init.o�__libc.o�__libc_CONFLICT_LIST�__GOT_SIZE�__PLT_SIZE�__LAST_DATA_ADDRESS�__T00320.o�___fpu_control�__IO_default_seekoff�___SHARED_LIBRARIES__�__IO_default_pbackfail�__exit_dummy_decl�__IO_switch_to_backup_area�__IO_free_backup_area�__IO_adjust_column�___setfpucw�__IO_sungetc�___do_global_dtors�___DTOR_LIST__�__edata�__IO_sync�___CTOR_LIST__�_strcmp�__IO_remove_marker�_strcpy�__IO_flush_all�__IO_printf�___do_global_ctors�___new_exitfn�__IO_setb�_printf�___load_shared_libraries�__IO_stdout_�__IO_sgetn�__etext�__IO_stdin_�___exit_funcs�__IO_init�_strrchr�__IO_unsave_markers�__IO_default_xsputn�___underflow�__IO_default_underflow�__IO_stderr_�__IO_link_in�__IO_default_setbuf�__IO_default_stat�__IO_switch_to_main_get_area�__IO_seekmark�__IO_default_read�__IO_default_seek�__IO_default_xsgetn�__IO_un_link�___brk�__IO_default_write�____brk_addr�__end�__SHARABLE_CONFLICTS__�__IO_flush_all_linebuffered�__IO_init_marker�___libc_init�__exit_dummy_ref�__IO_set_column�__IO_marker_difference�__IO_doallocbuf�___libc_4_524�__IO_least_marker�__IO_default_doallocate�___libc_subinit�__IO_sputbackc�__IO_marker_delta�__IO_get_column�_etext�_atexit�__IO_switch_to_get_mode�__NEEDS_SHRLIB_libc_4�___overflow�__IO_default_seekpos�_exit�_main�___environ�__IO_list_all�_edata�_end�__IO_default_finish�___main�__IO_nobackup_pbackfail������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/������������������������������������������������������������������������������������ 40750 � 765 � 144 � 0 5600320474 11457� 5����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/base��������������������������������������������������������������������������������100640 � 765 � 144 � 10342 5600316556 12440� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # Generated by MANIFEST # See INSTALL for details of format #! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "The System Manager" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "The System Manager" comment "An Administration Tool For UNIX" comment comment "This is version 0.1.1 of The System Manager. It was developed on" comment "Linux 1.0.8 using the Slackware distribution. It is released under" comment "the GNU General Public License v2." comment comment "This module contains all the documentation for The System Manager" comment "plus the base scripts required by all other modules." endinfo comment comment "PLEASE NOTE :" comment " This software is of ALPHA quality. If you do not know what" comment " that means, stop right here!" comment comment " YOU USE THIS SOFTWARE ENTIRELY AT YOUR OWN RISK. If you" comment " do not like this, stop right here!" comment pause require dialog if [ $? -eq 254 ]; then log "Dialog, by Savio Lam, is not installed on your machine." log log "You need to download dialog. There is a copy on sunsite.unc.edu" log "in /pub/Linux/utils/shell. Look for version 0.4, which has some" log "extra features required by The System Manager." log else log "You have dialog installed on your machine." log log "However, please check to ensure that this is dialog version 0.4" log "or later. If your copy of dialog does not support the --radiolist" log "and --backtitle options, you will find that sysman does not work." log "I uploaded dialog-0.4 to sunsite.unc.edu - it should have ended up" log "in /pub/Linux/utils/shell." log fi target "/var/adm" "sysman" log "Now you have installed sysman, use INSTALL to install any other" log "modules, and then type the following :" log log "cd $TARGETDIR ; sysman modules/Sysman ./UpdateMenus" log log "which will build the System Manager's menus. In future, you can" log "rebuild the menus from inside the System Manager." log log "Simply type 'sysman' to get started." log comment comment "Creating base directories" comment dir $TARGETDIR 755 y dir $TARGETDIR/bin 755 y dir $TARGETDIR/doc 755 y dir $TARGETDIR/src 755 y dir $TARGETDIR/.MANIFEST 755 y comment comment "Installing base files" comment file sysman $TARGETDIR/sysman 755 link $TARGETDIR/sysman $TARGETBIN/sysman file TEMPLATE $TARGETDIR/TEMPLATE 755 file bin/AuthorInfo $TARGETDIR/bin/AuthorInfo 755 file bin/ParseMod $TARGETDIR/bin/ParseMod 755 dir $TARGETDIR/modules 755 y file modules/README.module /var/adm/sysman/modules/README.module 755 #! /bin/bash # Generated by MANIFEST # See INSTALL for details of format depend -d /var/adm/sysman/modules if [ $? -eq 254 ]; then log "You must install the 'base' module of the System Manager" y log "before installing this module." y log "" y exit fi #! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : SYSMAN : Configure The System Manager :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Configuring The System Manager" author "Stuart Herbert" "S.Herbert@sheffield.ac.uk" comment comment "This module provides functions for maintaining the System Manager" comment "itself." endinfo target /var/adm sysman dir $TARGETDIR/modules/Sysman 755 y file modules/Sysman/Manifest /var/adm/sysman/modules/Sysman/Manifest 755 file modules/Sysman/README.module /var/adm/sysman/modules/Sysman/README.module 755 file modules/Sysman/RemoveModule /var/adm/sysman/modules/Sysman/RemoveModule 755 file modules/Sysman/UpdateMenus /var/adm/sysman/modules/Sysman/UpdateMenus 755 ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/News��������������������������������������������������������������������������������100640 � 765 � 144 � 4402 5600316514 12414� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # Generated by MANIFEST # See INSTALL for details of format depend -d /var/adm/sysman/modules if [ $? -eq 254 ]; then log "You must install the 'base' module of the System Manager" y log "before installing this module." y log "" y exit fi #! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : NEWS : Local News System :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Local News System Module" author "Stuart Herbert" "S.Herbert@sheffield.ac.uk" comment comment "This module provides for a local news service, where individual news" comment "items can be sent to individual groups as required." comment comment "As supplied, all users can add to the news. If you wish to restrict" comment "this, create a group called 'news', put everyone who can send news" comment "into it, and then 'chgrp new /var/adm/news' and" comment "'chmod 664 /var/adm/news' so that only members of the group can add" comment "to it." endinfo pause require /bin/ash if [ $? -eq 254 ]; then log "You do not have /bin/ash on your system. Either download this using ftp" log "from sunsite.unc.edu (in /pub/Linux/system/Shells), or you will have to" log "alter /usr/local/bin/testfornews to call a different shell." log log "/bin/ash is used because it is significantly smaller than /bin/bash" log fi target /var/adm sysman file install/testfornews $TARGETBIN/testfornews 755 if [ $? -eq 0 ]; then log "In /etc/csh.login, and /etc/profile, add a line to call" log "$TARGETBIN/testfornews, so that when users log in, they are informed" log "if there is any new news." log fi dir $TARGETDIR/modules/News 755 y file modules/News/AddToTheNews /var/adm/sysman/modules/News/AddToTheNews 755 file modules/News/EditTheNews /var/adm/sysman/modules/News/EditTheNews 755 file modules/News/README.module /var/adm/sysman/modules/News/README.module 755 file modules/News/ReadAllNews /var/adm/sysman/modules/News/ReadAllNews 755 file modules/News/ReadTheNews /var/adm/sysman/modules/News/ReadTheNews 755 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/Software����������������������������������������������������������������������������100640 � 765 � 144 � 3455 5600320471 13276� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # Generated by MANIFEST # See INSTALL for details of format depend -d /var/adm/sysman/modules if [ $? -eq 254 ]; then log "You must install the 'base' module of the System Manager" y log "before installing this module." y log "" y exit fi #! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : SOFTWARE : Managing Software :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "The Software Module" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "Currently, this module merely provides a useful script for installing" comment "any third-party .tar(.gz) type file. Future releases will seek to" comment "integrate support for the Slackware PKGTOOL system." comment comment "For the C shell, add the following alias to your /etc/csh.login :" comment comment " alias InstallTar sysman modules/Software ./InstallTar" comment comment "(or equivalent for sh-like shells, in /etc/profile) so that you" comment "can call this module directly." endinfo target /var/adm sysman dir $TARGETDIR/src 755 y dir $TARGETDIR/src/Software/InstallTar 755 y file src/Software/InstallTar/ParseTar $TARGETDIR/src/Software/InstallTar/ParseTar 755 file src/Software/InstallTar/main.c $TARGETDIR/src/Software/InstallTar/main.c 644 link src/Software/InstallTar/ParseTar $TARGETDIR/bin/ParseTar 755 dir $TARGETDIR/modules/Software 755 y file modules/Software/InstallTar /var/adm/sysman/modules/Software/InstallTar 755 file modules/Software/README.module /var/adm/sysman/modules/Software/README.module 755 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/INSTALL�����������������������������������������������������������������������������100640 � 765 � 144 � 2601 5600320030 12571� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # # This is an example manifest for use with INSTALL and INFO title "An Example Manifest" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" # blurb goes here comment comment "Welcome to INSTALL, a software solution to installing and maintaining" comment "distributions." comment # call `endinfo` to tell INFO to stop here endinfo # right, if we get here, we're doing an install comment "Are you sure that you wish to install this package?" pause # if we get here, the user has agreed to install it. target "/usr/doc" "INSTALL" # I want to install into /usr/doc/INSTALL dir "$TARGETDIR" 755 y # I only need these two dir "$TARGETBIN" 755 # install files file bin/INSTALL $TARGETDIR/INSTALL 755 file bin/INFO $TARGETDIR/INFO 755 file bin/REMOVE $TARGETDIR/REMOVE 755 # we want to format the paper, and then install it comment comment "Please wait - formatting documentation" comment pr -h " INSTALL Version 1.0 - Copyright (c) 1994 Stuart Herbert " < doc/INSTALL > doc/paper file doc/paper $TARGETDIR/paper 644 # use links to add programs to the local bin dir link $TARGETDIR/INSTALL $TARGETBIN/INSTALL link $TARGETDIR/INFO $TARGETBIN/INFO link $TARGETDIR/REMOVE $TARGETBIN/REMOVE # add to log file, for the user to read once install has finished log "Please read the file $TARGETDIR/paper for " log "documentation about INSTALL." # that'll do nicely �������������������������������������������������������������������������������������������������������������������������������0.1.1/.MANIFEST/Users�������������������������������������������������������������������������������100640 � 765 � 144 � 3445 5600316537 12614� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # Generated by MANIFEST # See INSTALL for details of format depend -d /var/adm/sysman/modules if [ $? -eq 254 ]; then log "You must install the 'base' module of the System Manager" y log "before installing this module." y log "" y exit fi #! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "Y : Y : USERS : Create/Destroy Users :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "Users - A Module For The System Manager" author "Stuart Herbert" "S.Herbert@Sheffield.ac.uk" comment comment "Currently, this module only provides options to create and delete" comment "users on a local system. However, I plan to expand this to be" comment "of far more use to networked systems." endinfo require useradd if [ $? -eq 254 ]; then log "You need to install the program 'useradd', which is used by this module." log "useradd is part of the Shadow Passwords suite. You do NOT need to be" log "using shadow passwords - you just need this utility." log fi require userdel if [ $? -eq 254 ]; then log "You need to install the program 'userdel', which is used by this module." log "userdel is part of the Shadow Passwords suite. You do NOT need to be" log "using shadow passwords - you just need this utility." log fi target /var/adm sysman dir $TARGETDIR/modules/Users 755 y file modules/Users/AddANewUser /var/adm/sysman/modules/Users/AddANewUser 755 file modules/Users/DeleteAUser /var/adm/sysman/modules/Users/DeleteAUser 755 file modules/Users/README.module /var/adm/sysman/modules/Users/README.module 755 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/README.module���������������������������������������������������������������������������������100754 � 765 � 144 � 1350 5600310052 12431� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # # The System Manager # An Administration Tool For UNIX # # Copyright (c) 1994 Stuart Herbert # Released under the GNU GPL v2 # # Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk if [ -n "$1" ]; then case "$1" in --SysmanInstall) echo "YN : YN : NAME : DESCRIPTION :$0" exit ;; --SysmanAuthor) source /var/adm/sysman/bin/ParseMod ;; esac fi title "My Module" author "Spods Anonymous" "spod@spod.org" comment comment "Your blurb here ..." endinfo # stop here if --SysmanAuthor # any requirements here target "/var/adm" "sysman" # want to install to /var/adm/sysman # install any special files here # after this line is added to the MANIFEST by the auto-manifest maker. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0.1.1/INSTALL���������������������������������������������������������������������������������������100750 � 765 � 144 � 20307 5600321044 11340� 0����������������������������������������������������������������������������������������������������ustar �ac3slh��������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/bash # # INSTALL : Install a package # # This script was written to install packages for The System Manager # and was inspired by the Linux kernel configure script by # raymondc@microsoft.com (well, I think it's a neat hack :-) # # I'm sure this script can be used for any general purpose installation, # and I hope it'll catch on big-time. Let me say that again, louder. # # PLEASE USE THIS SCRIPT TO PROVIDE AN INSTALLATION SYSTEM FOR YOUR OWN # SOFTWARE. PLEASE USE THIS SCRIPT ON AS MANY UNIX PLATFORMS AS POSSIBLE. # PLEASE MAKE USE OF IT'S SISTER SCRIPT, REMOVE, TO PROVIDE A WAY TO REMOVE # YOUR SOFTWARE. # # Please send comments/suggestions/bug fixes to S.Herbert@sheffield.ac.uk #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- set -h COLOR_BLACK="\033[0;30m" COLOR_RED="\033[1;31m" COLOR_GREEN="\033[1;32m" COLOR_YELLOW="\033[1;33m" COLOR_BLUE="\033[1;34m" COLOR_CYAN="\033[1;36m" COLOR_LIGHT_GREY="\033[0;37m" COLOR_DARK_GREY="\033[1;30m" COLOR_WHITE="\033[1;37m" #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = succeed/found/forced/warning/fail (0/1/2/254/255) # $2 = general report # $3 = fail report # $4 = don't log skipped entries Report() { if [ "$1" -eq 255 ]; then echo -ne "$COLOR_RED" echo -n "Skipping" if [ -z "$4" ]; then echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi echo "(Use INSTALL -f <package> to force installation)" >> $LOG fi elif [ "$1" -eq 254 ]; then echo -ne "$COLOR_YELLOW" echo -n "Warning " echo -n "Skipping : $2" >> $LOG if [ -n "$3" ]; then echo " ($3)" >> $LOG fi elif [ "$1" -eq 2 ]; then echo -ne "$COLOR_YELLOW" echo -n "Forced " elif [ "$1" -eq 1 ]; then echo -ne "$COLOR_CYAN" echo -n "Found " else echo -ne "$COLOR_GREEN" echo -n "Adding " fi echo -ne "$COLOR_LIGHT_GREY" echo -n " : $2" if [ ! "$3" = "" ]; then echo " ($3)" else echo "" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements Usage() { if [ -d .MANIFEST ]; then echo "INSTALL: Install a package" echo "Packages available for installation are :" echo "" ls .MANIFEST echo "" echo "Type 'INSTALL [ -f ] <package> ...' to install a package or two." else echo "INSTALL: Directory .MANIFEST does not exist." fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = author name # $2 = author address author() { echo -en "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo -e "Copyright (c) $COLOR_WHITE$1$COLOR_LIGHT_GREY ($2)" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = comment # $2 = log it? comment() { echo -ne "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo "$1" if [ "$2" = "y" -o "$2" = "Y" ]; then echo $1 >> $LOG fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $2 = directory/file # $1 = test depend() { if [ $1 $2 ]; then echo > /dev/null else Report "254" "$1" "required, but not found" return 254 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = directory # $2 = permissions # $3 = consider directory for deletion? dir() { if [ -e "$1" ]; then Report "255" "$1" "dir: exists" "N" if [ "$3" = "y" -o "$3" = "Y" ]; then echo "$1/" >> $MANIFEST fi return 255 else Report "0" "$1/" "mode : $2" install -m "$2" -d "$1" if [ "$3" = "y" -o "$3" = "Y" ]; then echo "$1/" >> $MANIFEST fi return 0 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements endinfo() { echo > /dev/null } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = source # $2 = dest # $3 = permissions file() { if [ -e "$2" ]; then if [ $FORCED -eq 1 ] ; then Report "255" "$2" "file: exists" return 255 fi fi if [ ! -e "$1" ]; then Report "255" "$2" "file: $1 not found" return 255 fi if [ -e "$2" ]; then Report "2" "$2" "mode : $3" else Report "0" "$2" "mode : $3" fi install -m "$3" "$1" "$2" echo "$2" >> $MANIFEST return 0 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = file to link to # $2 = link link() { if [ -e "$2" ]; then if [ $FORCED -eq 1 ]; then Report "255" "$2" "link: exists" return 255 fi fi if [ ! -e "$1" ]; then Report "255" "$1" "link: not found" return 255 fi if [ -e "$2" ]; then Report "2" "$2" "symlink" rm -f $2 else Report "0" "$2" "symlink" fi ln -s "$1" "$2" echo "$2" >> $MANIFEST return 0 } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = log comment # $2 = echo it? log() { echo "$1" >> $LOG if [ "$2" = "y" ]; then echo -ne "$COLOR_DARK_GREY: COLOR_LIGHT_GREY" echo "$1" fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements pause() { local x echo echo -ne "$COLOR_RED" echo -n "!" echo -e "$COLOR_LIGHT_GREY Press ENTER or RETURN to continue, or ctrl-c to quit." read x < /dev/tty } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = required util require() { if [ -e "$1" ]; then Report "1" "$1" "required" return 0 elif which "$1" > /dev/null ; then Report "1" "$1" "required" return 0 else Report "254" "$1" "required, but not found" return 254 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # no arguements root() { if [ ! $UID -eq 0 ]; then echo "INSTALL: insufficient privilege (must be root)" exit 1 fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = default hierarchy # $2 = root directory of package target() { local targetdir local x if [ $UID -eq 0 ]; then x="YES" echo echo -ne "$COLOR_RED" echo -ne "!" echo -ne "$COLOR_LIGHT_GREY " echo "Where do you want to install the package to?" echo -ne "$COLOR_RED! $COLOR_LIGHT_GREY" echo "(Press ENTER for $1/$2)" read targetdir < /dev/tty if [ -z $targetdir ]; then TARGETDIR="$1/$2" else TARGETDIR="$targetdir" fi TARGETBIN="/usr/local/bin" TARGETLIB="/usr/local/lib" TARGETMAN="/usr/local/man" else TARGETDIR="$HOME/$2" TARGETBIN="$HOME/bin" TARGETLIB="$HOME/lib" TARGETMAN="$HOME/man" x="NO" fi export TARGETBIN export TARGETDIR export TARGETLIB export TARGETMAN echo -ne "$COLOR_DARK_GREY: $COLOR_LIGHT_GREY" echo "Target destination is $TARGETDIR" if [ "$x" = "YES" ]; then pause fi } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # $1 = title title() { echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" echo -ne "$COLOR_LIGHT_GREY" echo -e "Installing '$COLOR_WHITE$1$COLOR_LIGHT_GREY'" echo -e "$COLOR_DARK_GREY--*-- --*-- --*-- --*-- --*--" } #--*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- --*-- # this is where the fun begins LOG="README.install" MANIFEST="INSTALLed" # if no arguements, show usage and quit if [ "$1" = "" ]; then Usage exit 0 fi # okay, time to ditch the old log file if [ -e $LOG ]; then rm -f $LOG fi if [ -e $MANIFEST ]; then rm -f $MANIFEST fi # do they want to force the issue? if [ "$1" = "-f" ]; then FORCED=0 shift else FORCED=1 fi # make sure the target is unset if [ -n "$TARGETDIR" ]; then unset TARGETDIR fi # right, now work through arguements ... for x in $@ ; do if [ -r .MANIFEST/$x ]; then Report "0" "$x" "package" . .MANIFEST/$x if [ -e $MANIFEST ]; then install -d $HOME/.INSTALLed install -m 640 $MANIFEST $HOME/.INSTALLed/$x rm $MANIFEST fi else Report "255" "$x" "package not found" fi done echo echo -en "$COLOR_WHITE" echo -ne "INSTALL" echo -e "$COLOR_LIGHT_GREY: Installation is complete" # do we have a log file? if [ -s $LOG ]; then echo -e "Please read $COLOR_WHITE$LOG$COLOR_LIGHT_GREY for further information." fi # that's it folks! ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������