[Lunar-commits] <lunar> theedge: create a normal `make install` package out of this.
Auke Kok
sofar at foo-projects.org
Sun Jun 24 00:06:27 CEST 2012
commit a44d7aa8bd78c662ebb7e8c626ca220be790faa0
Author: Auke Kok <sofar at foo-projects.org>
Date: Sat Jun 23 15:06:27 2012 -0700
theedge: create a normal `make install` package out of this.
I stripped a few README's out of this. Other than that, it's
a 1:1 conversion of all the material in theedge.
---
Makefile | 75 +
bin/lvu | 1562 --------------------
blacklist/blacklist.Alpha | 12 +
blacklist/blacklist.PowerPC | 13 +
blacklist/blacklist.SPARC | 9 +
blacklist/blacklist.x86 | 6 +
compilers/c++ | 10 +
compilers/cc | 10 +
compilers/g++ | 10 +
compilers/gcc | 10 +
compilers/ld | 10 +
compilers/make | 10 +
doc/COPYING-2.0 | 353 +++++
doc/CREDITS | 157 ++
doc/core-documentation/Reference_Directory.html | 29 +
.../_etc_lunar_local_config.html | 227 +++
doc/core-documentation/etc_lunar_config.html | 426 ++++++
doc/core-documentation/purpose.html | 29 +
doc/gpl.html | 553 +++++++
doc/module-example/BUILD | 42 +
doc/module-example/CONFIGURE | 29 +
doc/module-example/CONFLICTS | 11 +
doc/module-example/DEPENDS | 31 +
doc/module-example/DETAILS | 47 +
doc/module-example/POST_INSTALL | 10 +
doc/module-example/PRE_REMOVE | 3 +
doc/module-example/README | 124 ++
doc/module-example/init.d/README | 5 +
doc/module-example/init.d/ntp | 30 +
doc/module-example/init.d/pure-ftpd | 24 +
doc/module-example/init.d/sshd | 29 +
doc/module-example/pam.d/README | 4 +
doc/module-example/pam.d/chfn | 7 +
doc/module-example/pam.d/chsh | 8 +
doc/module-example/pam.d/ftp | 10 +
doc/module-example/pam.d/gdm | 6 +
doc/module-example/pam.d/passwd | 5 +
doc/module-example/pam.d/samba | 5 +
doc/module-example/pam.d/shadow | 7 +
doc/module-example/pam.d/su | 8 +
doc/module-example/profile.d/example.rc | 10 +
doc/module-example/services | 8 +
doc/module-example/xinetd.d/README | 6 +
doc/module-example/xinetd.d/exim | 15 +
doc/module-example/xinetd.d/proftpd | 13 +
doc/module-example/xinetd.d/pure-ftpd | 14 +
etc/config | 133 ++
etc/dialogrc | 111 ++
etc/lunar/config | 133 --
etc/lunar/dialogrc | 111 --
etc/lunar/local/README | 8 -
etc/lunar/local/depends/README | 2 -
etc/lunar/mirrors/GNOME | 18 -
etc/lunar/mirrors/GNU | 107 --
etc/lunar/mirrors/KDE | 82 -
etc/lunar/mirrors/KERNEL | 482 ------
etc/lunar/mirrors/LRESORT | 9 -
etc/lunar/mirrors/SFORGE | 31 -
etc/lunar/mirrors/XFREE86 | 44 -
etc/lunar/mirrors/XORG | 47 -
install | 22 +-
lib/lsb/init-functions | 467 ------
libs/README | 2 +
libs/aliases.lunar | 82 +
libs/build.lunar | 442 ++++++
libs/check.lunar | 171 +++
libs/config.lunar | 137 ++
libs/connect.lunar | 79 +
libs/depends.lunar | 425 ++++++
libs/download.lunar | 223 +++
libs/edit.lunar | 92 ++
libs/init.lunar | 66 +
libs/kernel.lunar | 95 ++
libs/locking.lunar | 126 ++
libs/logging.lunar | 108 ++
libs/main.lunar | 363 +++++
libs/messages.lunar | 236 +++
libs/misc.lunar | 220 +++
libs/modules.lunar | 646 ++++++++
libs/moonbase.lunar | 97 ++
libs/optimize.lunar | 68 +
libs/plugins.lunar | 129 ++
libs/prune.lunar | 86 ++
libs/queue.lunar | 88 ++
libs/recovery.lunar | 127 ++
libs/sizes.lunar | 56 +
libs/sources.lunar | 219 +++
libs/temp.lunar | 41 +
libs/tracking.lunar | 128 ++
libs/uniqid.lunar | 54 +
libs/updatelog.lunar | 118 ++
libs/useradd.lunar | 115 ++
libs/view.lunar | 26 +
man/lcrash.8 | 61 +
man/lfirsttime.8 | 308 ++++
man/lget.8 | 105 ++
man/lin.8 | 168 +++
man/lrm.8 | 113 ++
man/lunar.8 | 168 +++
man/lvu.1 | 312 ++++
man/moonbase.5 | 133 ++
menu/alias.menu | 85 ++
menu/dmodule.menu | 55 +
menu/download.menu | 320 ++++
menu/integrity.menu | 61 +
menu/license.menu | 71 +
menu/mirrors.menu | 83 ++
menu/moonbase.menu | 47 +
mirrors/GNOME | 18 +
mirrors/GNU | 107 ++
mirrors/KDE | 82 +
mirrors/KERNEL | 482 ++++++
mirrors/LRESORT | 9 +
mirrors/SFORGE | 31 +
mirrors/XFREE86 | 44 +
mirrors/XORG | 47 +
misc/excluded | 12 +
misc/init-functions | 467 ++++++
misc/protected | 134 ++
misc/solo | 8 +
misc/sustained | 35 +
misc/unset.sh | 103 ++
plugins/build-zpatches.plugin | 80 +
plugins/check-find.plugin | 54 +
plugins/check-ldd.plugin | 48 +
plugins/check-md5sum.plugin | 52 +
plugins/check-symlinks.plugin | 56 +
plugins/configd.plugin | 37 +
plugins/download-file.plugin | 24 +
plugins/download-generic.plugin | 82 +
plugins/initd.plugin | 88 ++
plugins/optimize-wrappers.plugin | 70 +
plugins/postbuild-generic.plugin | 113 ++
plugins/unpack-generic.plugin | 48 +
plugins/verify-md5.plugin | 32 +
plugins/verify-sha1.plugin | 32 +
plugins/verify-sha256.plugin | 32 +
prog/lget | 119 ++
prog/lin | 257 ++++
prog/lrm | 370 +++++
prog/lsh | 19 +
prog/lunar | 840 +++++++++++
prog/lvis | 63 +
prog/lvu | 1562 ++++++++++++++++++++
sbin/lget | 119 --
sbin/lin | 257 ----
sbin/lrm | 370 -----
sbin/lsh | 19 -
sbin/lunar | 840 -----------
sbin/lvis | 63 -
usr/share/doc/lunar/COPYING-2.0 | 353 -----
usr/share/doc/lunar/CREDITS | 157 --
.../core-documentation/Reference_Directory.html | 29 -
.../_etc_lunar_local_config.html | 227 ---
.../lunar/core-documentation/etc_lunar_config.html | 426 ------
.../doc/lunar/core-documentation/purpose.html | 29 -
usr/share/doc/lunar/gpl.html | 553 -------
usr/share/doc/lunar/module-example/BUILD | 42 -
usr/share/doc/lunar/module-example/CONFIGURE | 29 -
usr/share/doc/lunar/module-example/CONFLICTS | 11 -
usr/share/doc/lunar/module-example/DEPENDS | 31 -
usr/share/doc/lunar/module-example/DETAILS | 47 -
usr/share/doc/lunar/module-example/POST_INSTALL | 10 -
usr/share/doc/lunar/module-example/PRE_REMOVE | 3 -
usr/share/doc/lunar/module-example/README | 124 --
usr/share/doc/lunar/module-example/init.d/README | 5 -
usr/share/doc/lunar/module-example/init.d/ntp | 30 -
.../doc/lunar/module-example/init.d/pure-ftpd | 24 -
usr/share/doc/lunar/module-example/init.d/sshd | 29 -
usr/share/doc/lunar/module-example/pam.d/README | 4 -
usr/share/doc/lunar/module-example/pam.d/chfn | 7 -
usr/share/doc/lunar/module-example/pam.d/chsh | 8 -
usr/share/doc/lunar/module-example/pam.d/ftp | 10 -
usr/share/doc/lunar/module-example/pam.d/gdm | 6 -
usr/share/doc/lunar/module-example/pam.d/passwd | 5 -
usr/share/doc/lunar/module-example/pam.d/samba | 5 -
usr/share/doc/lunar/module-example/pam.d/shadow | 7 -
usr/share/doc/lunar/module-example/pam.d/su | 8 -
.../doc/lunar/module-example/profile.d/example.rc | 10 -
usr/share/doc/lunar/module-example/services | 8 -
usr/share/doc/lunar/module-example/xinetd.d/README | 6 -
usr/share/doc/lunar/module-example/xinetd.d/exim | 15 -
.../doc/lunar/module-example/xinetd.d/proftpd | 13 -
.../doc/lunar/module-example/xinetd.d/pure-ftpd | 14 -
usr/share/man/man1/lvu.1 | 312 ----
usr/share/man/man5/moonbase.5 | 133 --
usr/share/man/man8/lcrash.8 | 61 -
usr/share/man/man8/lfirsttime.8 | 308 ----
usr/share/man/man8/lget.8 | 105 --
usr/share/man/man8/lin.8 | 168 ---
usr/share/man/man8/lrm.8 | 113 --
usr/share/man/man8/lunar.8 | 168 ---
var/lib/lunar/compilers/c++ | 10 -
var/lib/lunar/compilers/cc | 10 -
var/lib/lunar/compilers/g++ | 10 -
var/lib/lunar/compilers/gcc | 10 -
var/lib/lunar/compilers/ld | 10 -
var/lib/lunar/compilers/make | 10 -
var/lib/lunar/excluded | 12 -
var/lib/lunar/functions/README | 2 -
var/lib/lunar/functions/aliases.lunar | 82 -
var/lib/lunar/functions/build.lunar | 442 ------
var/lib/lunar/functions/check.lunar | 171 ---
var/lib/lunar/functions/config.lunar | 137 --
var/lib/lunar/functions/connect.lunar | 79 -
var/lib/lunar/functions/depends.lunar | 425 ------
var/lib/lunar/functions/download.lunar | 223 ---
var/lib/lunar/functions/edit.lunar | 92 --
var/lib/lunar/functions/init.lunar | 66 -
var/lib/lunar/functions/kernel.lunar | 95 --
var/lib/lunar/functions/locking.lunar | 126 --
var/lib/lunar/functions/logging.lunar | 108 --
var/lib/lunar/functions/main.lunar | 363 -----
var/lib/lunar/functions/messages.lunar | 236 ---
var/lib/lunar/functions/misc.lunar | 220 ---
var/lib/lunar/functions/modules.lunar | 646 --------
var/lib/lunar/functions/moonbase.lunar | 97 --
var/lib/lunar/functions/optimize.lunar | 68 -
var/lib/lunar/functions/plugins.lunar | 129 --
var/lib/lunar/functions/prune.lunar | 86 --
var/lib/lunar/functions/queue.lunar | 88 --
var/lib/lunar/functions/recovery.lunar | 127 --
var/lib/lunar/functions/sizes.lunar | 56 -
var/lib/lunar/functions/sources.lunar | 219 ---
var/lib/lunar/functions/temp.lunar | 41 -
var/lib/lunar/functions/tracking.lunar | 128 --
var/lib/lunar/functions/uniqid.lunar | 54 -
var/lib/lunar/functions/updatelog.lunar | 118 --
var/lib/lunar/functions/useradd.lunar | 115 --
var/lib/lunar/functions/view.lunar | 26 -
var/lib/lunar/menu/alias.menu | 85 --
var/lib/lunar/menu/dmodule.menu | 55 -
var/lib/lunar/menu/download.menu | 320 ----
var/lib/lunar/menu/integrity.menu | 61 -
var/lib/lunar/menu/license.menu | 71 -
var/lib/lunar/menu/mirrors.menu | 83 --
var/lib/lunar/menu/moonbase.menu | 47 -
var/lib/lunar/plugins/build-zpatches.plugin | 80 -
var/lib/lunar/plugins/check-find.plugin | 54 -
var/lib/lunar/plugins/check-ldd.plugin | 48 -
var/lib/lunar/plugins/check-md5sum.plugin | 52 -
var/lib/lunar/plugins/check-symlinks.plugin | 56 -
var/lib/lunar/plugins/configd.plugin | 37 -
var/lib/lunar/plugins/download-file.plugin | 24 -
var/lib/lunar/plugins/download-generic.plugin | 82 -
var/lib/lunar/plugins/initd.plugin | 88 --
var/lib/lunar/plugins/optimize-wrappers.plugin | 70 -
var/lib/lunar/plugins/postbuild-generic.plugin | 113 --
var/lib/lunar/plugins/unpack-generic.plugin | 48 -
var/lib/lunar/plugins/verify-md5.plugin | 32 -
var/lib/lunar/plugins/verify-sha1.plugin | 32 -
var/lib/lunar/plugins/verify-sha256.plugin | 32 -
var/lib/lunar/protected | 134 --
var/lib/lunar/solo | 8 -
var/lib/lunar/sustained | 35 -
var/lib/lunar/unset.sh | 103 --
var/state/lunar/blacklist.Alpha | 12 -
var/state/lunar/blacklist.PowerPC | 13 -
var/state/lunar/blacklist.SPARC | 9 -
var/state/lunar/blacklist.x86 | 6 -
260 files changed, 15320 insertions(+), 15269 deletions(-)
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9e46817
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,75 @@
+
+bin_PROGS = prog/lvu prog/lvis prog/lsh
+sbin_PROGS = prog/lin prog/lrm prog/lunar prog/lget
+
+plug_LIBS = $(shell ls -1 plugins/*)
+core_LIBS = $(shell ls -1 libs/*)
+menu_LIBS = $(shell ls -1 menu/*)
+
+etc = etc/config etc/dialogrc
+mirrors = $(shell ls -1 mirrors/*)
+blacklist = $(shell ls -1 blacklist/*)
+compilers = $(shell ls -1 compilers/*)
+mans = $(shell ls -1 man/*)
+
+all:
+
+.PHONY:
+install: .PHONY
+ install -d $(DESTDIR)/etc/lunar
+ for F in $(etc) ; do \
+ install $$F $(DESTDIR)/etc/lunar/ ; \
+ done
+ install -d $(DESTDIR)/etc/lunar/local/depends
+ install -d $(DESTDIR)/var/lib/lunar/menu
+ for F in $(menu_LIBS) ; do \
+ install $$F $(DESTDIR)/var/lib/lunar/menu/ ; \
+ done
+ install -d $(DESTDIR)/var/lib/lunar/functions
+ for F in $(core_LIBS) ; do \
+ install $$F $(DESTDIR)/var/lib/lunar/functions/ ; \
+ done
+ install -d $(DESTDIR)/var/lib/lunar/plugins
+ for F in $(plug_LIBS) ; do \
+ install $$F $(DESTDIR)/var/lib/lunar/plugins/ ; \
+ done
+ install -d $(DESTDIR)/bin
+ for F in $(bin_PROGS) ; do \
+ install $$F $(DESTDIR)/bin/ ; \
+ done
+ install -d $(DESTDIR)/sbin
+ for F in $(sbin_PROGS) ; do \
+ install $$F $(DESTDIR)/sbin/ ; \
+ done
+ install -d $(DESTDIR)/etc/lunar/mirrors
+ for F in $(mirrors) ; do \
+ install $$F $(DESTDIR)/etc/lunar/mirrors/ ; \
+ done
+ install -d $(DESTDIR)/var/state/lunar
+ for F in $(blacklist) ; do \
+ install $$F $(DESTDIR)/var/state/lunar/ ; \
+ done
+ install -d $(DESTDIR)/var/lib/lunar/compilers ; \
+ for F in $(compilers) ; do \
+ install $$F $(DESTDIR)/var/lib/lunar/compilers/ ; \
+ done
+ install -d $(DESTDIR)/var/lib/lunar
+ install misc/excluded $(DESTDIR)/var/lib/lunar/
+ install misc/protected $(DESTDIR)/var/lib/lunar/
+ install misc/solo $(DESTDIR)/var/lib/lunar/
+ install misc/sustained $(DESTDIR)/var/lib/lunar/
+ install misc/unset.sh $(DESTDIR)/var/lib/lunar/
+ install -d $(DESTDIR)/lib/lsb
+ install misc/init-functions $(DESTDIR)/lib/lsb/
+ install -d $(DESTDIR)/var/log/lunar/compile
+ install -d $(DESTDIR)/var/log/lunar/install
+ install -d $(DESTDIR)/var/log/lunar/md5sum
+ install -d $(DESTDIR)/var/log/lunar/queue
+ for F in $(mans) ; do \
+ EXT=`echo $$F | sed 's/.*[.]//'` ; \
+ install -d $(DESTDIR)/usr/share/man/man$$EXT ; \
+ install $$F $(DESTDIR)/usr/share/man/man$$EXT/ ; \
+ done
+ # easy way out for the docs:
+ install -d $(DESTDIR)/usr/share/doc/lunar
+ cp -av doc $(DESTDIR)/usr/share/doc/lunar/
diff --git a/bin/lvu b/bin/lvu
deleted file mode 100755
index 4293624..0000000
--- a/bin/lvu
+++ /dev/null
@@ -1,1562 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# lvu - view Lunar module information #
-# #
-############################################################
-# Original gaze written by Brian Peterson #
-# Copyright 2001 by Brian Peterson #
-############################################################
-# gaze is part of the sorcery spell management utility #
-# This version contains none of Brian Peterson's source #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS the gaze script of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# Parts Copyrighted Auke Kok 2003 under GPLv2 #
-# Parts Copyrighted Stefan Wold 2007-2009 under GPLv2 #
-# #
-############################################################
-
-help() {
-cat << EOF
-LVU -- Lunar View utility (for viewing just about everything in Lunar-Linux)
-
-Usage: lvu [general options] [command [command parameters]]
-
-GENERAL OPTIONS:
-
--d | --debug Enables debug messages
--h | --help Displays this help text
--v | --verbose Increases the level of message output
-
-Commands:
-
-Invoke lvu with desired command followed by arguments.
-Please note that anything in brackets [ ] is optional.
-
-Command Arguments Description
-
-what module display a module's description
-short module display a module's short description
-where module display a module's section
-cd module change directory to module and execs a new shell
-alien discover untracked files
-from path/file discover what installed a given file
-leafs display installed modules that have no explicit
- dependencies on them
-orphans display installed modules that are missing
- dependencies
-conflicts display conflicting files
-held display held modules
-exiled display exiled modules
-expired display a list of modules which need an update
-info module display terse summary information about module
-
-search "phrase" searches all modules long descriptions for phrase.
-service port|acronym displays modules that provide that service
-
-website module display a module's website
-install module display an install log
-size [module] find and show installed size of a module
- or ALL (slow)
-installed [module] display installed modules/version of module
-missing display installed but deleted modules from moonbase
-compile module display a compile log
-compiler module display the compiler version used
-links module display a list of modules that this module links to
-sources [module] display source files for a module
-urls [module] display all URLs for a module
-maintainer module display maintainer for a module
-version module display version of module in moonbase
-
-new module attempt to create a new module from scratch
-edit module copy a module to zlocal for editing
-diff module view changes on edited module
-submit module attempt to submit a module to the lunar ML
-unedit module delete zlocal copy of a module
-
-sum [module] display checksums
-md5sum [module] display md5sums
-
-export make snapshot of box's configuration.
-import snapshot restores an exported snapshot.
-
-section [section] display moonbase sections
-moonbase display text listing of the moonbase
-html display html listing of the moonbase
-updatelog display summary log of previous lunar update
-activity [module] display main log file
-
-newer 20030801 display available modules newer than Aug 01, 2003
-older 20030101 display modules installed before Jan 01, 2003
-
-voyeur [delay|module] peak into module compilation
-
-pam display installed modules that are Linux-PAM aware
-
-depends module displays installed modules that explicitly or
- recursively depend on this module.
-tree module displays a tree of the module's dependencies
-stree module same as 'tree' but highly abbreviated
-eert module same as 'tree' but reverse and installed deps only
-leert module full reverse dependency tree
-
-\$MODULE_SCRIPT module will print the module script for that module
-EOF
-}
-
-
-export_snapshot() {
- SNAPSHOT=snapshot-$HOSTNAME-$(date -u +%Y%m%d)
- tar cjfP "/root/$SNAPSHOT.tar.bz2" $CONFIG_CACHE $MODULE_STATUS
- message "${MESSAGE_COLOR}Snapshot ${DEFAULT_COLOR}${FILE_COLOR}$SNAPSHOT${DEFAULT_COLOR}${MESSAGE_COLOR} created.${DEFAULT_COLOR}"
-}
-
-
-import_snapshot() {
- SNAPSHOT=$1
- SOURCE_DIRECTORY=$BUILD_DIRECTORY/snapshot
-
- if [ -f "$1" ] ; then
- ( mk_source_dir $SOURCE_DIRECTORY )
- tar xj -C $SOURCE_DIRECTORY -f $SNAPSHOT 2> /dev/null
- cd $SOURCE_DIRECTORY
-
- message "${MESSAGE_COLOR}Restoring lunar configuration${DEFAULT_COLOR}"
- cp -a etc/lunar /etc
-
- for LINE in $(cat .$MODULE_STATUS) ; do
- LIST="$LIST $(echo $LINE | cut -d: -f1)"
- done
- verbose_msg "Sorting update queue"
- QUEUE=$(sort_by_dependency $LIST)
-
- message "${MESSAGE_COLOR}The following modules will be installed:${DEFAULT_COLOR}"
- TMP_QUEUE=$(temp_create "install-queue")
- for MOD in $QUEUE ; do
- echo $MOD >>$TMP_QUEUE
- echo $MOD
- done
-
- if query "Do you wish to edit the install queue ? " n ; then
- edit_file $TMP_QUEUE
- fi
-
- QUEUE=$(cat $TMP_QUEUE)
- temp_destroy $TMP_QUEUE
-
- if [ -n "$QUEUE" ] ; then
- lin -p $QUEUE
- fi
-
- cd /
- rm_source_dir $SOURCE_DIRECTORY
-
- else
- message "${PROBLEM_COLOR}Unable to find snapshot ${DEFAULT_COLOR}${FILE_COLOR}\"$SNAPSHOT\"${DEFAULT_COLOR}"
- false
- fi
-}
-
-
-checksum() {
- for FILE in $(cat $1 | files) ; do
- sum -s $FILE
- done
-}
-
-
-md5sum_files() {
- for FILE in $(cat $1 | files) ; do
- md5sum $FILE
- done
-}
-
-
-alien() {
- message "In a few minutes I will print files found on this disk that were not" 1>&2
- message "installed by lunar. This is not a security feature! Files could still" 1>&2
- message "be lurking undetected on this box." 1>&2
-
- TMP_FOUND=$(temp_create "lvu.found")
- TMP_KNOWN=$(temp_create "lvu.known")
-
- message "Discovering ambient files..." 1>&2
- find $TRACKED | files | grep -v -f "$EXCLUDED" | grep -v -f "$PROTECTED" | sort | uniq > $TMP_FOUND
- message "Discovering installed files..." 1>&2
- ( cat $INSTALL_LOGS/* ; ls $INSTALL_CACHE/* ; ls $SOURCE_CACHE/*
- )| files | sort | uniq > $TMP_KNOWN
-
- diff -B -a -d $TMP_FOUND $TMP_KNOWN | grep -e "^< " | cut -c 3-
-
- temp_destroy $TMP_FOUND
- temp_destroy $TMP_KNOWN
-}
-
-
-lvu_catalog() {
- echo "Lunar Moonbase for $(date -u)"
-
- (( COUNT=0 ))
-
- for SECTION in $(list_sections); do
- echo
- echo "-------------------------------------------------"
- echo "SECTION: $SECTION"
- echo "-------------------------------------------------"
- for MODULE in $(list_modules $SECTION); do
- echo $MODULE
- (( COUNT++ ))
- done
- done
-
- echo
- echo "Total modules: $COUNT"
-}
-
-
-lvu_catalog_html() {
-
- echo "<html><head><title>Lunar Moonbase for $(date -u)</title>"
- echo "<meta http-equiv=\"Pragma\" content=\"no-cache\"></head>"
- echo "<body>"
-
- echo "<table align=\"center\" border=5>"
-
- echo "<tr><th colspan=5><font color=maroon size=+1>"
- echo "Lunar Moonbase<br>$(date -u)"
- echo "</font></th></tr>"
-
- echo "<tr>"
- echo "<th>Module</th>"
- echo "<th>Version</th>"
- echo "<th>Updated</th>"
- echo "<th>Website</th>"
- echo "<th>Maintainer</th>"
- echo "</tr>"
-
- (( COUNT=0 ))
-
- for SECTION in $(list_sections); do
- (( SECTION_COUNT=0 ))
- echo "<tr><th colspan=5><font color="maroon">$SECTION</font></th></tr>"
- for MODULE in $(list_modules $SECTION); do
- (
- run_details $MODULE &> /dev/null
- echo "<tr>"
- if [ ${#MODULE} -gt 15 ]; then
- MODULE="<font size=-1>$MODULE</font>"
- fi
- echo "<td>$MODULE</td>"
- echo "<td><font size=-1>$VERSION</font></td>"
- echo "<td><font size=-1>$UPDATED</font></td>"
-
- WEBSITE=$WEB_SITE
- if [ ${#WEB_SITE} -lt 20 ]; then
- SHRINK="<font size=-1>"
- UNSHRINK="</font>"
- elif [ ${#WEB_SITE} -lt 30 ]; then
- SHRINK="<font size=-2>"
- UNSHRINK="</font>"
- else
- WEBSITE="$(echo $WEB_SITE | cut -c-30)..."
- SHRINK="<font size=-3>"
- UNSHRINK="</font>"
- fi
-
- if [ "$WEB_SITE" != "unknown" ]; then
- echo "<td> $SHRINK"
- echo "<a href=\"$WEB_SITE\" target=\"_blank\">$WEBSITE</a>"
- echo "$UNSHRINK </td>"
- else
- echo "<td></td>"
- fi
-
- if [ -z "$MAINTAINER" ]; then
- MAINTAINER="maintainer at lunar-linux.org"
- fi
-
- echo "<td><font size=-1>"
- echo "<a href=\"mailto:$MAINTAINER\">$MAINTAINER</a>"
- echo "</font></td>"
- echo "</tr>"
- )
- (( COUNT++ ))
- (( SECTION_COUNT++ ))
- done
- echo "<tr><th colspan=5>Modules in $SECTION section: $SECTION_COUNT</th></tr>"
- done
-
- echo "<tr><th colspan=5>Total modules: $COUNT</th></tr>"
- echo "</table></body></html>"
-}
-
-
-newer() {
- if [ ! -z "$1" ] ; then
- if [ -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
- if [ "$1" -gt "20010101" -a "$1" -lt "20310101" ] ; then
- for MODULE in $(list_moonbase) ; do
- run_details $MODULE
- if [ "$ENTERED" -gt "$1" ] ; then
- echo $MODULE
- fi
- done
- fi
- fi
- fi
-}
-
-
-older() {
- if [ ! -z "$1" ] ; then
- if [ -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
- if [ "$1" -gt "20010101" -a "$1" -lt "20310101" ] ; then
- for LINE in $(cat $MODULE_STATUS) ; do
- LIN_DATE=$(echo $LINE | cut -d: -f2)
- if [ "$LIN_DATE" -gt "$1" ] 2>/dev/null ; then
- true
- else
- echo $LINE | cut -d: -f1
- fi
- done
- fi
- fi
- fi
-}
-
-
-show_module_component() {
- SCRIPT_DIRECTORY=$MOONBASE/$(find_section $2)/$2
- if [[ -e "$SCRIPT_DIRECTORY/$1.$PLATFORM" ]]; then
- cat "$SCRIPT_DIRECTORY/$1.$PLATFORM"
- elif [[ -e "$SCRIPT_DIRECTORY/$1" ]] ; then
- cat "$SCRIPT_DIRECTORY/$1"
- fi
-}
-
-
-find_active_lin() {
- for FILE in $(ls /var/lock/installing.* 2>/dev/null) ; do
- if [ -d /proc/$(cat $FILE) ] ; then
- echo $FILE | sed "s:/var/lock/installing.::"
- return 0
- fi
- done
- false
-}
-
-
-follow_active_lin() {
- if [ -f /var/lock/installing.$1 -a -d /proc/$(cat /var/lock/installing.$1) ] ; then
- if [ -f $TMPDIR/lunar.lin.$(cat /var/lock/installing.$1).$1.compile-log.* ] ; then
- tail -f $TMPDIR/lunar.lin.$(cat /var/lock/installing.$1).$1.compile-log.* --follow=name --pid=$(cat /var/lock/installing.$1) 2>/dev/null
- fi
- fi
-}
-
-
-voyeur() {
- if [ -n "$1" ] && ! find_section $1 > /dev/null ; then
- (( DEFAULT_DELAY = $1 * 60 ))
- shift 1
- fi
-
- for MODULE in $@ ; do
- follow_active_lin $MODULE
- done
-
- DEFAULT_DELAY=${DEFAULT_DELAY:-60}
-
- while true ; do
- if ! ACTIVE_MODULE=$(find_active_lin) ; then
- message "${MESSAGE_COLOR}Waiting ${DEFAULT_DELAY} seconds for a lin to begin.${DEFAULT_COLOR}"
- for (( DELAY=DEFAULT_DELAY ; DELAY > 0 ; DELAY-- )); do
- if ACTIVE_MODULE=$(find_active_lin) ; then
- break
- else
- sleep 1
- fi
- done
- fi
-
- if [ -z "$ACTIVE_MODULE" ] ; then
- break
- else
- follow_active_lin $ACTIVE_MODULE
- fi
- done
-}
-
-
-show_leafs() {
- for MODULE in $(list_installed) ; do
- if ! cut -d : -f2- $DEPENDS_STATUS | grep "^$MODULE:" | grep -q ":on:"; then
- echo $MODULE
- fi
- done
-}
-
-
-show_orphans() {
- for MODULE in $(list_installed) ; do
- debug_msg "checking \"$MODULE\""
- for LINE in $(grep "^${MODULE}:" $DEPENDS_STATUS) ; do
- DEPENDS=$(echo $LINE | cut -d: -f2)
- OPTIONAL=$(echo $LINE | cut -d: -f4)
- if ! module_installed $DEPENDS ; then
- if [ "$OPTIONAL" == "required" ]; then
- echo "$MODULE: $DEPENDS is missing"
- fi
- fi
- done
- done
-}
-
-show_conflicts() {
- declare -A conflicts
- declare -A conflicts2
-
- TMP_CONFLICTS=$(temp_create "conflicts")
- TMP_CONFLICTS2=$(temp_create "conflicts")
- for MODULE in $(list_installed); do
- VERSION=$(installed_version $MODULE)
- cat $INSTALL_LOGS/$MODULE-$VERSION | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
- grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/\|/lib/modules\|/site-packages/\|/lib/perl5" |
- while read LINE; do
- [ ! -d "$LINE" ] && echo "${MODULE} ${LINE}" >> $TMP_CONFLICTS
- done
- done
-
- sort -k 2,2 < $TMP_CONFLICTS | uniq -D -f 1 > $TMP_CONFLICTS2
- while read MOD FILE; do
- if [ -z "${conflicts[$FILE]}" ]; then
- conflicts[$FILE]=$MOD
- else
- conflicts[$FILE]+=",$MOD"
- fi
- done < $TMP_CONFLICTS2
-
- for i in ${!conflicts[@]}; do
- var=${conflicts[$i]}
- if [ -z "${conflicts2[$var]}" ]; then
- conflicts2[$var]="$i"
- else
- conflicts2[$var]+=" $i"
- fi
- done
-
- for i in ${!conflicts2[@]}; do
- echo -e "${MESSAGE_COLOR}Conflicting file(s) for modules ${MODULE_COLOR}${i//,/, }${DEFAULT_COLOR}:"
- for i in ${conflicts2[$i]}; do
- echo -e " ${FILE_COLOR}$i${DEFAULT_COLOR}"
- done
- echo
- done
-
- trap "rm -f $TMP_CONFLICTS $TMP_CONFLICTS2 ; exit" INT TERM KILL EXIT
-}
-
-show_depends() {
- if ! echo "$DONE" | grep -q "$1"; then
- DONE="$DONE $1"
-
- grep ":$1:" $DEPENDS_STATUS | while read LINE ; do
- MODULE=${LINE%%:*}
- STATUS=$(echo $LINE | cut -d : -f3)
-
- if [ "$STATUS" == "on" ]
- then echo $MODULE
- show_depends $MODULE
- fi
-
- done
- fi
-}
-
-
-# function: show_tree
-# usage: show_tree <module>
-# purpose: show a tree of the module's dependencies (recursive)
-function show_tree() {
- debug_msg "show_tree ($@)"
-
- # Make sure the module exists, print a message and return 1 if it doesn't
- SECTION=$(find_section $1)
- if [ -z "$SECTION" ] ; then
- error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${PROBLEM_COLOR} in ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
- return 1
- fi
-
- # create dependency tracking file if needed
- if [ -z "$TMP_SEEN" ] ; then
- export TMP_SEEN=$(temp_create "seen")
- export FLAG=1
- trap "rm -f $TMP_SEEN ; exit" INT TERM KILL
- fi
-
- run_depends() {
- # local definitions
- function depends() {
- debug_msg "depends ($@)"
- DEP=$(NEVER_ASK=1 unalias $1)
- echo "+$DEP"
- }
-
- optional_depends() {
- debug_msg "optional_depends ($@)"
- DEP=$(NEVER_ASK=1 unalias $1)
- echo "-$DEP"
- }
-
- debug_msg "run_depends ($@)"
- SECTION=$(find_section $1)
- SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
- CPU_ARCH=$(uname -m | sed 's/i[456]86/i386/')
- if has_module_file $1 DEPENDS ; then
- run_module_file $1 DEPENDS
- fi
- }
-
- if [ -z "$1" ] ; then
- help
- exit 1
- fi
-
- # gather dependencies, sorted by 1) required, 2) optional, and
- # alphabetically too
- unset ALL
- DEPS=$(run_depends $1 | sort | uniq)
- for DEP in $DEPS ; do
- if [ ${DEP:0:1} == "+" ] ; then
- ALL="$DEP $ALL"
- else
- ALL="$ALL $DEP"
- fi
- done
- DEPS=$ALL
-
- # show hit list:
- if [ "$CUR" == "-" ] ; then
- if module_installed $1 ; then
- RES="${MODULE_COLOR}[$1]${DEFAULT_COLOR}: "
- else
- if [ -n "$SHORTTREE" ] ; then
- return
- fi
- RES="${LRM_COLOR}[$1]${DEFAULT_COLOR}: "
- fi
- else
- RES="${MODULE_COLOR}$1${DEFAULT_COLOR}: "
- fi
-
- if [ -n "$DEPS" -o -z "$SHORTTREE" ] ; then
- # show all deps on the same line:
- for DEP in $DEPS ; do
- MOD=${DEP:1}
- case "${DEP:0:1}" in
- # required
- +)
- if module_installed $MOD ; then
- COL="${FILE_COLOR}"
- else
- COL="${PROBLEM_COLOR}"
- fi
- RES="$RES${COL}$MOD${DEFAULT_COLOR} "
- ;;
- # optional
- -)
- if module_installed $MOD ; then
- COL="${FILE_COLOR}"
- else
- COL="${LRM_COLOR}"
- fi
- RES="$RES${COL}[$MOD]${DEFAULT_COLOR} "
- ;;
- esac
- done
- RES="${INDENT}|--->${RES}"
- echo -e "${RES:5}"
- fi
-
- # I (sofar) suck:
- for DEP in $DEPS ; do
- LASTDEP=${DEP:1}
- done
-
- INDENT="$INDENT| "
- # and recurse:
- for DEP in $DEPS ; do
- grep -q "^$DEP$" $TMP_SEEN
- TEST=$?
- if [ "$TEST" == "1" -o -z "$SHORTTREE" ] ; then
- echo "$DEP" >> $TMP_SEEN
- CUR=${DEP:0:1}
- # note the FLAG= thingy here
- FLAG= show_tree ${DEP:1} 2> /dev/null
- fi
- done
- # don't try this at home:
- INDENT=${INDENT:0:((${#INDENT}-5))}
-
- if [ -n "$FLAG" ] ; then
- temp_destroy $TMP_SEEN
- unset TMP_SEEN
- fi
-}
-
-
-show_eert() {
- debug_msg "show_eert ($@)"
-
- # Make sure the module exists, print a message and return 1 if it doesn't
- SECTION=$(find_section $1)
- if [ -z "$SECTION" ] ; then
- error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${PROBLEM_COLOR} in ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
- return 1
- fi
-
- if [ -n "$SHORTTREE" ] ; then
- DEPENDS=$DEPENDS_STATUS
- else
- DEPENDS=$DEPENDS_CACHE
- fi
-
- show_rtree() {
- # we need to do an reverse tree for $1
- RDEPS=$(grep ":$1:" $DEPENDS | cut -d: -f1 | sort | uniq)
-
- if module_installed $1 ; then
- STR="${INDENT}^----${MODULE_COLOR}$1${DEFAULT_COLOR}: "
- else
- STR="${INDENT}^----${PROBLEM_COLOR}$1${DEFAULT_COLOR}: "
- fi
-
- for DEP in $RDEPS ; do
- REL=$(grep "^$DEP:$1:" $DEPENDS)
- CUR=$(echo $REL | cut -d: -f1)
- if echo $REL | grep -q :required: ; then
- if module_installed $DEP ; then
- STR="$STR${FILE_COLOR}$DEP ${DEFAULT_COLOR}"
- else
- STR="$STR${PROBLEM_COLOR}$DEP ${DEFAULT_COLOR}"
- fi
- else
- if module_installed $DEP ; then
- STR="$STR${FILE_COLOR}[$DEP] ${DEFAULT_COLOR}"
- else
- STR="$STR${LRM_COLOR}[$DEP] ${DEFAULT_COLOR}"
- fi
- fi
- done
-
- echo -e "${STR:5}"
-
- INDENT="$INDENT| "
- for RDEP in $RDEPS ; do
- FLAG= show_rtree $RDEP
- done
- INDENT="${INDENT:0:((${#INDENT}-5))}"
- }
-
- show_rtree $1
-
- if [ -n "$FLAG" ] ; then
- temp_destroy $TMP_DEPLIST
- fi
-}
-
-
-show_urls() { (
- # function overrides:
- plugin_call() { return 0 ; }
- download_url() {
- URL=$1
- if [ "${URL#${URL%?}}" != "/" ]; then
- URL="${URL}/"
- fi
- echo $URL$2
- return 1
- }
- connect() { return 0 ; }
-
- LRESORT_URL=
- FRESORT_URL=
- EXHAUSTIVE=on
- SILENT=on
- VERBOSE=off
- CLEAR_CACHE=off
-
- if [ -z "$1" ] ; then
- MODULES=$(list_moonbase|sort)
- else
- MODULES=$1
- fi
-
- for MODULE in $MODULES ; do
- download_module $MODULE | uniq
- done
-) }
-
-
-show_info() {
- if run_details $1 ; then
- echo "General Module Info"
- echo " Name: $MODULE"
- echo " Description: $SHORT"
- echo " Website: $WEB_SITE"
- echo " Lunar Version: $VERSION"
- echo " Last Updated: $UPDATED"
- echo " Section: $SECTION"
- echo -n " Restrictions: "
- if module_held $1 ; then
- echo -n "held "
- fi
- if module_exiled $1 ; then
- echo -n "exiled "
- fi
- if grep -qw $1 $SUSTAINED ; then
- echo -n "sustained "
- fi
- if grep -qw $1 $SOLO ; then
- echo -n "solo "
- fi
- echo
- if [ -e $MOONBASE/$SECTION/$MODULE/services ] ; then
- LINES="`wc -l $MOONBASE/$SECTION/$MODULE/services | cut -d' ' -f1`"
- echo -n " Provides Service"
- if [ 1 -lt $LINES ]; then
- echo "s:"
- echo "`cat $MOONBASE/$SECTION/$MODULE/services | sed "s:\t: :g" | sed 's:^: :g'`"
- else
- echo -n ": "
- echo "`cat $MOONBASE/$SECTION/$MODULE/services`"
- fi
- fi
-
- echo ""
- echo "Installation Info"
- if module_installed $1 ; then
- IVERSION=$(installed_version $1)
- echo -n " Installed Version: $IVERSION"
- if module_is_expired $1 ; then
- echo " (updated module available: $VERSION!)"
- else
- echo ""
- fi
- echo -n " Last compile time: "
- if module_installed "TimeDate" ; then
- CTIME=$(main compile $1 | grep 'Mark Compile ' | cut -d \" -f6 | perl -e 'use Date::Parse; my $start = <> ; my $stop = <> ; print str2time($stop) - str2time($start) . "\n";')
- echo "$((CTIME / 60))m$((CTIME % 60))s"
- else
- echo "(unable to calculate without \"TimeDate\" installed)"
- fi
- echo -n " Approx. Size: "
- main size $1
- echo -n " Files Installed: "
- main install $1 | wc -l
- else
- echo " Module not installed."
- fi
-
- echo ""
- ACTIVITY=$(view_file $ACTIVITY_LOG | awk "(\$3 == \"$1\")")
-
- if [ `echo "$ACTIVITY" | wc -l` -gt 10 ]; then
- ACTIVITY="`echo "$ACTIVITY" | tail -n10`"
- echo "Module Activity History (last 10)"
- else
- echo "Module Activity History"
- fi
- if [ -n "$ACTIVITY" ]; then
- echo "$ACTIVITY" | sed 's:^: :g'
- else
- echo " No past activity recorded for this module."
- fi
- fi
-}
-
-
-diff_module() {
- if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
- message "can't diff modules without ZLOCAL_OVERRIDES=on"
- exit 1
- fi
- if [ -z "$1" ]; then
- message "diff requires a single module name"
- exit 1
- fi
- if ! run_details $1 ; then
- message "diff requires an existing zlocal module"
- exit 1
- fi
- if ! echo $SECTION | grep -q zlocal ; then
- message "$1 is not a zlocal module, cannot diff"
- exit 1
- fi
- NZSECTION=$(ZLOCAL_OVERRIDES=off find_section $1)
- if [ "$SECTION" == "$NZSECTION" ] ; then
- # new module
- SECTION=zbeta
- echo diff /dev/null b/zbeta/$MODULE
- diff -Nur /var/empty $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
- grep -v ^diff | sed "s:/var/empty/:a/zbeta/$MODULE/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/zbeta/:g"
- else
- # modified module
- echo diff a/$NZSECTION/$MODULE b/$NZSECTION/$MODULE
- diff -Nur $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
- grep -v ^diff | sed "s:$MOONBASE/$NZSECTION/:a/$NZSECTION/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/$NZSECTION/:g"
- fi
-}
-
-submit_module() {
- # this code tries to send the module back to the mailinglist
- # as good as it gets
- if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
- message "You can't submit non-zlocal modules. Turn on ZLOCAL_OVERRIDES"
- message "and do \`lvu edit \$MODULE; lin moonbase\`"
- message "so that module changes can be tracked properly!"
- exit 1
- fi
- if [ -z "$1" ]; then
- message "submit requires a single module name."
- exit 1
- fi
- if [ ! -x /usr/bin/curl ]; then
- message "submit requires curl, please \`lin curl\`"
- exit 1
- fi
- if [ -z "$ADMIN" -o "$ADMIN" == "$USER" -o "$ADMIN" == "root" ]; then
- message "Please set ADMIN to your e-mail address: lunar set ADMIN \"me at my.mail.domain\""
- exit 1
- fi
- if [ -z "$REALNAME" ]; then
- REALNAME="getent passwd $USER | cut -d: -f5 | cut -d, -f1"
- if [ -z "$G_REALNAME" ]; then
- message "Please set REALNAME to your real name: lunar set REALNAME \"John Notdoe\""
- exit 1
- fi
- fi
- if ! run_details "$1" ; then
- message "submit requires an existing module"
- exit 1
- else
- if echo $SECTION | grep -q '^zlocal' ; then
- ZLOCAL_OVERRIDES=off SECTION=$(find_section $1)
- if echo $SECTION | grep -q '^zlocal' ; then
- unset SECTION
- fi
- else
- message "Please don't edit modules outside of the 'zlocal' section!"
- message "do this first: \`lvu edit \$MODULE ; lin moonbase\`"
- message "so that module changes can be tracked properly!"
- exit 1
- fi
-
- # sanity checks
- lvu diff $1 | diffstat -p0 -l | grep -e '.patch$' -e '.diff$' && (
- echo ""
- echo "Sanity check failed: patch files are not allowed inside moonbase"
- echo "Please submit your patch files to the lunar-dev mailinglist and"
- echo "Wait for one of the developers to upload them to \$PATCH_URL."
- echo "Once that is done you can resubmit using that URL for the patch(es)"
- exit 1
- )
-
-
- TMP_MSG=$(temp_create "submission")
- TMP_MSG2=$(temp_create "submission")
- (
- echo "$1: "
- echo ""
- echo ""
- echo "# type a changelog message here. The first line should start with"
- echo "# the module name and summarize your change. All lines starting with '#'"
- echo "# will be removed automatically. Example: 'foo: version update'."
- echo "# "
- echo "# PLEASE FORMAT THE FIRST LINE ACCORDING TO ABOVE NOTES!!! THANK YOU!!!"
- ) > $TMP_MSG
- edit_file $TMP_MSG
- sed -i '/^#/d' $TMP_MSG
- (
- head -n 1 $TMP_MSG | sed 's/^/Subject: /g'
- echo ''
- echo "From: $REALNAME <$ADMIN>"
- tail +2 $TMP_MSG
- echo '---'
- echo 'module:' $1
- echo "id: $UNIQID"
- echo "lvu submit: $1"
- echo "lvu: $(cat /bin/lvu | md5sum)"
- echo "uname -r: $(uname -r)"
- echo "kernel headers: $(installed_version kernel-headers-2.6)"
- echo "gcc: $(installed_version gcc)"
- echo "glibc: $(installed_version glibc)"
- echo ''
- echo '---'
- lvu diff $1 | diffstat -p1
- echo ''
- echo '---'
- lvu diff $1
- ) >> $TMP_MSG2
- cat $TMP_MSG2
- if query "Submit this module now?" y; then
- curl -F file=@$TMP_MSG2 -F module=$1 -F id=$UNIQID "http://www.lunar-linux.org/submit.php"
- temp_destroy $TMP_MSG2
- temp_destroy $TMP_MSG
- else
- message "Submission aborted. your submission was saved as $TMP_MSG2"
- fi
- fi
-}
-
-
-edit_module()
-{
- if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
- message "Cannot edit modules when ZLOCAL_OVERRIDES == off"
- message "Do this: \`lunar set ZLOCAL_OVERRIDES on\`"
- else
- if SECTION=$(find_section $1) ; then
- if echo $SECTION | grep -q ^zlocal; then
- message "Module \"$1\" is already in section \"zlocal\""
- message "unedit it first or edit the working copy"
- else
- cp -a $MOONBASE/$SECTION/$1 $MOONBASE/zlocal/
- # clean out SCM directories
- find $MOONBASE/zlocal/$1 -type d -name CVS -o -name .svn | xargs rm -rf
- message "Copied \"$1\" from \"$SECTION\""
- message "Edit your module in \"$MOONBASE/zlocal/$1\""
- fi
- else
- message "Can't find module \"$1\""
- fi
- fi
-}
-
-
-unedit_module()
-{
- if SECTION=$(find_section $1) ; then
- if echo $SECTION | grep -q ^zlocal; then
- rm -rf $MOONBASE/$SECTION/$1
- message "Removed \"$1\" from \"$SECTION\""
- else
- message "Module \"$1\" is not in section \"zlocal\""
- fi
- else
- message "Can't find module \"$1\""
- fi
-}
-
-
-new_module()
-{
- if [ -z "$1" ]; then
- echo "You have to give it a name - use \`lvu new $name\`"
- exit 1
- elif run_details $1 > /dev/null 2>&1 ; then
- echo "Module \"$1\" already exists, use \`lvu edit $1\` instead"
- exit 1
- fi
-
- MODULE=$1
-
- message "Paste the principal download URL for your application:"
- read URL
- echo
-
- message "Write a 1-line summary of the module. do NOT write something"
- message "like \"foo is a...\". Write something that describes it best:"
- read SHORT
- echo
-
- message "Paste the main website URL:"
- read WEB_SITE
- echo
-
- LONG=$(temp_create "lvu.new.$1")
- message "Paste 1 or 2 paragraphs of text that give a good description for $1:"
- message "Press CONTROL-D on an empty line when finished"
- cat - > $LONG
-
- ENTERED=$(date +%Y%m%d)
- UPDATED=$(date +%Y%m%d)
-
- SOURCE_URL="$(dirname $URL)/" # get url
- SOURCE=$(basename $URL) # get base
-
- if [ ! -f $SOURCE_CACHE/$SOURCE ] ; then
- if ! download_url $SOURCE_URL $SOURCE $SOURCE_CACHE ; then
- echo "Unable to download $URL"
- exit 1
- fi
- fi
-
- SHA1=$(sha1sum $SOURCE_CACHE/$SOURCE | cut -c1-40)
-
- VERSION=$(echo $SOURCE | sed "s/$MODULE//")
- VERSION=$(echo $VERSION | sed 's/^[-]//;s/^_//')
- VERSION=${VERSION/^_}
- VERSION=${VERSION/.tar}
- VERSION=${VERSION/.tgz}
- VERSION=${VERSION/.bz2}
- VERSION=${VERSION/.gz}
-
- SOURCE=$(echo $SOURCE | sed "s/$MODULE/\${MODULE}/")
- SOURCE=$(echo $SOURCE | sed "s/$VERSION/\${VERSION}/")
-
- if ! mkdir $MOONBASE/zlocal/$1 ; then
- message "Unable to create module folder in zlocal section"
- exit 1
- fi
- (
- cat <<EOFDETA
- MODULE=$MODULE
- VERSION=$VERSION
- SOURCE=$SOURCE
- SOURCE_URL=$SOURCE_URL
-EOFDETA
- if [ "$(tar tf $SOURCE_CACHE/$(basename $URL) | head -n 1)" != "$MODULE-$VERSION/" ]; then
- echo "SOURCE_DIRECTORY=\$BUILD_DIRECTORY/\$MODULE-\$VERSION"
- fi
- cat <<EOFDETB
- SOURCE_VFY=sha1:$SHA1
- WEB_SITE="$WEB_SITE"
- ENTERED=$ENTERED
- UPDATED=$UPDATED
- SHORT="$SHORT"
-cat <<EOF
-EOFDETB
- cat $LONG | fmt -72
- echo "EOF"
- ) > $MOONBASE/zlocal/$1/DETAILS
-
- message "Module \"$1\" created best-effort. You might have to \`lvu edit $1\" to make it work"
- message "Don't forget to create a DEPENDS file! (hint: use \`lvu links $1\`)"
- message "Don't forget to \`lvu submit $1\` if you think this module is useful to others!"
-}
-
-main() {
- case $1 in
- html)
- lvu_catalog_html
- ;;
-
- export)
- export_snapshot
- ;;
-
- import)
- import_snapshot $2
- ;;
-
- section)
- if [ -n "$2" ] ; then
- list_modules $2
- elif [ -z "$2" ] ; then
- list_sections
- fi
- ;;
-
- alien)
- alien
- ;;
-
- from)
- for MODULE in $(list_installed); do
- VERSION=$(installed_version $MODULE)
- if grep -q "$2" $INSTALL_LOGS/$MODULE-$VERSION ; then
- for FILE in $(grep "$2" $INSTALL_LOGS/$MODULE-$VERSION | cut -d: -f2) ; do
- echo "$MODULE:$FILE"
- done
- fi
- done
- ;;
-
- newer)
- newer $2
- ;;
-
- older)
- older $2
- ;;
-
- moonbase)
- lvu_catalog | view_file
- ;;
-
- leafs)
- show_leafs | sort | uniq
- ;;
-
- orphans)
- show_orphans
- ;;
-
- conflicts)
- show_conflicts
- ;;
-
- updatelog)
- if [ -e /var/log/lunar/update ]; then
- view_file /var/log/lunar/update
- else
- echo "No update log available."
- fi
- ;;
-
- activity)
- if [ -e $ACTIVITY_LOG ]; then
- if [ -z "$2" ]; then
- view_file $ACTIVITY_LOG
- else
- view_file $ACTIVITY_LOG | awk "(\$3 == \"$2\")"
- fi
- else
- echo "No update log available."
- fi
- ;;
-
- installed)
- if [ -z "$2" ] ; then
- grep -E ':(installed|held):' $MODULE_STATUS | view_file
- elif [ -n "$(installed_version $2)" ] ; then
- echo "$(installed_version $2)"
- else
- message "$2 is not installed"
- false
- fi
- ;;
-
- held)
- grep ":held:" $MODULE_STATUS | cut -d: -f1
- ;;
-
- exiled)
- grep ":exiled:" $MODULE_STATUS | cut -d: -f1
- ;;
-
- expired)
- for MODULE in $(list_expired_modules); do
- L=$(installed_version $MODULE)
- R=$(run_details $MODULE > /dev/null ; echo $VERSION)
-
- CL=( `echo $L | sed 's/[.]/ /g'` )
- CR=( `echo $R | sed 's/[.]/ /g'` )
-
- S="(equal)"
-
- for N in $(seq 0 $(( ${#CL[@]} - 1 ))); do
-
- TL="${CL[$N]}"
- TR="${CR[$N]}"
-
- if [ "$TL" == "$TR" ]; then
- continue
- fi
-
- if [ -z "$(echo $TL$TR | sed 's/[0-9]//g')" ] ; then
- # numerical
- if [ "$TL" -eq "$TR" ] ; then
- continue
- elif [ "$TL" -lt "$TR" ] ; then
- # normal upgrade
- S=""
- break
- else
- S="(downgrade)"
- break
- fi
- else
- # string order
- if [[ "$TL" < "$TR" ]] ; then
- # normal upgrade
- S=""
- break
- else
- S="(downgrade)"
- break
- fi
- fi
- done
-
- echo "$MODULE ($L -> $R) $S"
- done
- ;;
- failed)
- while read DATE COMMAND MODULE VERSION STATE JUNK ; do
- if [ "$STATE" == "failed" ] && [ "$COMMAND" == "lin" ] ; then
- # add to list of failed modules
- if ! echo "$FAILED" | grep -qw $MODULE ; then
- FAILED="$FAILED $MODULE "
- fi
- fi
- # no need to remove if $MODULE is not in the list - speeds things up
- if ! echo "$FAILED" | grep -qw "$MODULE" ; then
- continue
- fi
- if ([ "$STATE" == "success" ] && [ "$COMMAND" == "lin" ]) ||
- ([ "$STATE" == "success" ] && [ "$COMMAND" == "lrm" ]) ; then
- # remove from failed modules
- FAILED=`echo "$FAILED" | sed "s/ $MODULE //g"`
- fi
- done < $ACTIVITY_LOG
- for MODULE in $FAILED ; do
- echo $MODULE
- done
- ;;
-
- sum)
- if [ -n "$2" ] ; then
- if ! checksum "$INSTALL_LOGS/$2-$(installed_version $2)" ; then
- checksum "$INSTALL_LOGS/*"
- fi
- fi
- ;;
-
- md5sum)
- if [ -n "$2" ] ; then
- if ! md5sum_files "$INSTALL_LOGS/$2-$(installed_version $2)" ; then
- md5sum_files "$INSTALL_LOGS/*"
- fi
- fi
- ;;
-
- voyeur)
- shift 1
- voyeur $@
- ;;
-
- pam)
- find_pam_aware
- ;;
-
- sources)
- sources $2
- ;;
-
- urls)
- show_urls $2
- ;;
-
- maintainer)
- if run_details $2 ; then
- if [ -n "$MAINTAINER" ] ; then
- echo $MAINTAINER
- else
- echo maintainer at lunar-linux.org
- fi
- fi
- ;;
-
- DETAILS)
- show_module_component $1 $2
- ;;
-
- DEPENDS)
- show_module_component $1 $2
- ;;
-
- CONFIGURE)
- show_module_component $1 $2
- ;;
-
- CONFLICTS)
- show_module_component $1 $2
- ;;
-
- INSTALL)
- show_module_component $1 $22
- ;;
-
- PRE_BUILD)
- show_module_component $1 $2
- ;;
-
- BUILD)
- show_module_component $1 $2
- ;;
-
- POST_BUILD)
- show_module_component $1 $2
- ;;
-
- POST_INSTALL)
- show_module_component $1 $2
- ;;
-
- PRE_REMOVE)
- show_module_component $1 $2
- ;;
-
- POST_REMOVE)
- show_module_component $1 $2
- ;;
-
- search)
- grep -irle $2 "$MOONBASE" | grep DETAILS | sed "s;${MOONBASE}/\(.*\)/DETAILS;\1;"
- ;;
-
- service)
- cat $MODULE_INDEX | while read ENTRY ; do
- MOD=$(echo $ENTRY | cut -d: -f1)
- SEC=$(echo $ENTRY | cut -d: -f2)
- if [ -f $MOONBASE/$SEC/$MOD/services ] ; then
- echo $MOONBASE/$SEC/$MOD/services
- fi
- done | xargs egrep -l -i "$2" | sed "s;${MOONBASE}/\(.*\)/services;\1;"
- ;;
-
- depends)
- show_depends "$2" | sort | uniq
- ;;
-
- website)
- if [ -z "$2" ] ; then
- return 1
- else
- if run_details $2 ; then
- if [ -n "$WEB_SITE" ] ; then
- echo $WEB_SITE
- else
- echo "http://lunar-linux.org"
- fi
- fi
- fi
- ;;
-
- version)
- if [ -n "$2" ] ; then
- if run_details $2 ; then
- echo $VERSION
- fi
- fi
- ;;
-
- versions)
- if [ -n "$2" ] ; then
- if run_details $2 ; then
- echo "main-version $VERSION"
- fi
- if [ $(echo $MOONBASE/*/$2/*/DETAILS | wc -w) -lt 2 ] ; then
- message "${MESSAGE_COLOR} This module has no alt-versions${DEFAULT_COLOR}"
- exit 1
- fi
- for i in $MOONBASE/*/$2/*/DETAILS ; do
- x=`echo $i | sed 's:/DETAILS::'`
- run_details $2/`basename $x`
- echo "alt-version $VERSION"
- done
- fi
- ;;
-
- size)
- if [ -z "$2" ] ; then
- MODULES=$(list_installed)
- for MODULE in $MODULES ; do
- echo $MODULE $(find_module_size $MODULE)
- done
- else
- if module_installed $2 ; then
- find_module_size $2
- else
- message "${PROBLEM_COLOR}$2 is not installed${DEFAULT_COLOR}"
- fi
- fi
- ;;
-
- tree)
- show_tree "$2"
- ;;
-
- stree)
- SHORTTREE=1
- show_tree "$2"
- ;;
-
- eert)
- SHORTTREE=1
- show_eert "$2"
- ;;
-
- leert)
- show_eert "$2"
- ;;
-
- compile)
- if [ ! -z "$2" ]; then
- if run_details $2 ; then
- if [ -f $COMPILE_LOGS/$2-$(module_version $2).bz2 ] ; then
- view_file $COMPILE_LOGS/$2-$(module_version $2).bz2
- else
- VERSION=$(installed_version $2)
- view_file $COMPILE_LOGS/$2-$(installed_version $2).bz2 \
- "Compile log for $2 does not exist"
- fi
- fi
- fi
- ;;
-
- install)
- if run_details $2 ; then
- view_file $INSTALL_LOGS/$2-$(installed_version $2) \
- "Install log for $2 does not exist"
- fi
- ;;
-
- compiler)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- if [ ! -e $INSTALL_LOGS/$2-$(installed_version $2) ] ; then
- echo "Install log for $2 does not exist"
- return 1
- else
- cat $INSTALL_LOGS/$2-$(installed_version $2) | while read LINE ; do
- if file $LINE | grep -q "ELF " ; then
- echo -n "$LINE "
- strings -a $LINE | grep GCC: | sort -r | head -n 1
- fi
- done
- fi
- fi
- fi
- ;;
-
- links)
- [[ -z "$2" ]] && return 1
-
- REGEX=""
- for LINK in `lvu install $2 | xargs file | awk -F: '/ELF/ { print $1 }' | xargs ldd | egrep -v ':$' | cut -d' ' -f3 | sort | uniq`
- do
- if [[ -z $REGEX ]]
- then
- REGEX="($LINK)"
- else
- REGEX="${REGEX}|($LINK)"
- fi
- done
-
- pushd $INSTALL_LOGS >/dev/null
- egrep -l "$REGEX" *
- popd >/dev/null
- ;;
-
- what)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- run_module_file $2 DETAILS
- fi
- fi
- ;;
-
- short)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- echo "$SHORT"
- fi
- fi
- ;;
-
- where)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- echo $(find_section $2)
- fi
- fi
- ;;
-
- missing)
- for MODULE in $(list_installed) ; do
- if ! find_section $MODULE > /dev/null ; then
- echo "$MODULE"
- fi
- done
- ;;
-
- cd)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- cd $MOONBASE/$(find_section $2)/$2
- $SHELL
- fi
- fi
- ;;
-
- info)
- if [ ! -z "$2" ] ; then
- if run_details $2 ; then
- show_info $2
- fi
- fi
- ;;
-
- diff)
- diff_module $2
- ;;
-
- submit)
- submit_module $2
- ;;
-
- edit)
- edit_module $2
- ;;
-
- unedit)
- unedit_module $2
- ;;
- new)
- new_module $2
- ;;
-
- *)
- help
- ;;
-
- esac
-
-}
-
-
-
-. /etc/lunar/config
-
-GETOPT_ARGS=$(getopt -q -n lvu -o "dhv" -l "debug,help,verbose" -- "$@")
-
-if [ -z "$?" ] ; then
- help | view_file
- exit
-else
- eval set -- $GETOPT_ARGS
- export IFS="$STANDARD_IFS"
-
- set_priority
-
- while true ; do
- case "$1" in
- -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
- -h|--help ) help ; exit ;;
- -v|--verbose ) export VERBOSE="on" ; shift ;;
- --) shift ; break ;;
- *) help ; break ;;
- esac
- done
-
- main $@
-fi
-
diff --git a/blacklist/blacklist.Alpha b/blacklist/blacklist.Alpha
new file mode 100644
index 0000000..ee0350f
--- /dev/null
+++ b/blacklist/blacklist.Alpha
@@ -0,0 +1,12 @@
+binutils-sparc64
+bin86
+egcs64
+grub
+lilo
+nasm
+silo
+sparc-utils
+uClibc
+uml
+yaboot
+memtest86+
diff --git a/blacklist/blacklist.PowerPC b/blacklist/blacklist.PowerPC
new file mode 100644
index 0000000..8846277
--- /dev/null
+++ b/blacklist/blacklist.PowerPC
@@ -0,0 +1,13 @@
+aboot
+binutils-sparc64
+bin86
+egcs64
+e3
+grub
+lilo
+nasm
+silo
+sparc-utils
+uClibc
+uml
+memtest86+
diff --git a/blacklist/blacklist.SPARC b/blacklist/blacklist.SPARC
new file mode 100644
index 0000000..3228b91
--- /dev/null
+++ b/blacklist/blacklist.SPARC
@@ -0,0 +1,9 @@
+bin86
+e3
+grub
+lilo
+nasm
+uClibc
+uml
+yaboot
+memtest86+
diff --git a/blacklist/blacklist.x86 b/blacklist/blacklist.x86
new file mode 100644
index 0000000..25eebe7
--- /dev/null
+++ b/blacklist/blacklist.x86
@@ -0,0 +1,6 @@
+aboot
+binutils-sparc64
+egcs64
+silo
+sparc-utils
+yaboot
diff --git a/compilers/c++ b/compilers/c++
new file mode 100755
index 0000000..ba4f65c
--- /dev/null
+++ b/compilers/c++
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $CXX_EXT $PROG $@" >&2
+fi
+
+exec $CXX_EXT $PROG "$@"
+
diff --git a/compilers/cc b/compilers/cc
new file mode 100755
index 0000000..5859b44
--- /dev/null
+++ b/compilers/cc
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $CC_EXT $PROG $@" >&2
+fi
+
+exec $CC_EXT $PROG "$@"
+
diff --git a/compilers/g++ b/compilers/g++
new file mode 100755
index 0000000..3d3edfa
--- /dev/null
+++ b/compilers/g++
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $CXX_EXT $PROG $@" >&2
+fi
+
+exec $CXX_EXT $PROG "$@"
+
diff --git a/compilers/gcc b/compilers/gcc
new file mode 100755
index 0000000..5859b44
--- /dev/null
+++ b/compilers/gcc
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $CC_EXT $PROG $@" >&2
+fi
+
+exec $CC_EXT $PROG "$@"
+
diff --git a/compilers/ld b/compilers/ld
new file mode 100755
index 0000000..e543d88
--- /dev/null
+++ b/compilers/ld
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $PROG $@" >&2
+fi
+
+exec $PROG "$@"
+
diff --git a/compilers/make b/compilers/make
new file mode 100755
index 0000000..2820d8a
--- /dev/null
+++ b/compilers/make
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+ echo "++ $MAKE_EXT $PROG ${MAKES:+-j$MAKES} $@" >&2
+fi
+
+exec $MAKE_EXT $PROG ${MAKES:+-j$MAKES} "$@"
+
diff --git a/doc/COPYING-2.0 b/doc/COPYING-2.0
new file mode 100644
index 0000000..d538572
--- /dev/null
+++ b/doc/COPYING-2.0
@@ -0,0 +1,353 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange;
+or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free
+Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it
+does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show
+w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program
+into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with
+the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
diff --git a/doc/CREDITS b/doc/CREDITS
new file mode 100644
index 0000000..d48c3d7
--- /dev/null
+++ b/doc/CREDITS
@@ -0,0 +1,157 @@
+Lunar Credits:
+
+
+ -- Introduction
+
+Hundreds of people have contributed to Lunar-Linux and have made it what it is
+today. It would be impossible to keep a list of every single contribution that
+has been made, but without those small contributions, Lunar-Linux would not be
+what it is now, and we are grateful for them.
+
+Our eternal gratitude goes to Kyle Sallee, the original author of Sorcerer
+GNU Linux, who made it possible for us to work on this great concept and
+especially in the way we want to work on it -- cooperating in a team effort,
+together as a group. Since that moment Lunar-Linux has grown faster than
+ever.
+
+
+ -- Developers
+
+A few developers have spent enormous time on Lunar-Linux in the past, but
+are unfortunately not able to do so anymore. We miss their coding skills,
+and the pleasure of working together with these enthusiastic people. We
+hope to see them back in the future, there will always be a place in
+#lunar reserved for them:
+
+
+
+Name E-mail nickname
+---------------- ------------------------ -------------------
+Kagan Kongar kongar at tsrsb.org.tr kongar
+Rick Altherr kc8apf at kc8apf.net kc8apf
+Jason Jackson jacksonje at health.missouri.edu houkan
+Timo Kosig timo.kosig at gmx.de tiomo
+
+
+Your current Lunar Development team is:
+
+Name E-mail nickname
+---------------- ------------------------ -------------------
+Jan Eidtmann cmak at lunar-linux.org cmak
+Chuck Mead csm at lunar-linux.org csm
+Drew Swayze drew at lunar-linux.org evildrew
+Florin Braescu florin at lunar-linux.org florin
+Steven Michalske hardkrash at lunar-linux.org hardkrash
+Jasper Huijsmans jazman at lunar-linux.org jazman
+Jeff Hodges jmhodges at lunar-linux.org jmhodges
+Joel Vennin jol at lunar-linux.org jol
+Gerrit Germis lurch at lunar-linux.org lurch
+Moritz Heiber moe at lunar-linux.org Moe
+Jaime Buffery nestu at lunar-linux.org nestu
+Nick Hudson nhudson at lunar-linux.org nhudson
+Niki Guldbrand niki at lunar-linux.org niki
+Stefan Wold ratler at lunar-linux.org Ratler
+Rodney M. Brown r0dzilla at lunar-linux.org r0dzilla
+Auke Kok sofar at lunar-linux.org sofar
+Jon South striker at lunar-linux.org Striker
+Terry Chan tchan at lunar-linux.org tchan
+Aaron Watry watryac04 at lunar-linux.org Veerappan
+Jason Johnson xoritor at lunar-linux.org xoritor
+
+ -- Others
+
+Of course, there are many module writers, patch submitters, people submitting
+documentation, comments, or otherwise contributing to Lunar-Linux which names
+we have not forgotten (alphabetical by irc nickname):
+
+Name E-mail nickname
+---------------- ------------------------ -------------------
+Alan Mimms alanm at unforgettable.com alan
+Alex Chapman wrunt at hotmail.com alex
+Anders Bruun Olsen anders at bruun-olsen.net anders
+Andrew Davies kazami at ntlworld.com andrew
+artit artit at acj126.rh.psu.edu artit
+Arwed von Merkatz v.merkatz at gmx.net arwed
+Atani atani at atani-software.net atani
+Barak barak at wi.rr.com barak
+Bob Finch w9ya at amsat.org bfinch
+Bjorn Nitzler b.nitzler at umea.bonet.se bjorn
+Bachman Kharazmi bkw at lindesign.se bkw
+Brian Peterson brian.peterson at tcinternet.net brian
+Cal Evans cal at calevans.com cal
+Chris cwrobel at dccnet.com chris
+Christoph Steckelberg heffer at mailberlin.net christoph
+Christopher Church cchurch at cc.gatech.edu christopher
+Chuck Busby scarecrow.143 at attbi.com chuck
+Daniel dcmccal at clemson.edu daniel
+darookee darookee at darookee.net darookee
+David Chan davidchan at rcn.com david
+Milosz Tanski mtanksi at wideopenwest.com dem
+Daniel Nielsen djn at daimi.au.dk dnielsen
+doubletwist doubletwist at spack.nu doubletwist
+Eric Sandall sandalle at mail.wsu.edu eric
+Erik Søe Sørensen eriksoe at daimi.au.dk
+Vincent Vandeweijer v_vandeweijer at zonnet.nl evo_
+fasa tremon_r at epita.fr fasa
+ST LEE ftbee at hotmail.com ftbee
+Gareth Clay g.clay at warwick.ac.uk gareth
+Gerall Kahla gerall at chromebob.com gerall
+Charles Ballowe hangman at steelballs.org hangman
+Harley J Pig harleypig at harleypig.com harley
+Hendrik Visage hvisage at is.co.za hendrik
+Ladislav Hagara hgr at vabo.cz hgr
+Jan Sabbe jan.sabbe at student.kuleuven.ac.be jan
+Jason Overholt j.over at verizon.net jason
+j cr jcrowso at hotmail.com jcr
+Jean-Michel Smith jean at kcco.com jean-michel
+Jeff Schmidt jschmidt at fnal.gov jeff
+Jim Phillips jphillips at ergonet-ent.com jim
+Johan Warlander johan at warlander.com johan
+Joel Mayes joel_mayes at dingoblue.net.au joel
+Jon Svendsen jon-sven at frisurf.no jon
+Jonathan Evraire evraire at tuwg.com jonathan
+Joshua Books jbooks at real.com joshua
+Jyp j.y.p at wanadoo.fr jyp
+Kyle Risse krisse at kylerisse.com krisse
+Ladislav Hagara hgr at vaboo.cz ladislav
+Lasar Liepins lasar at liepins.de lasar
+Bob Johnson livewire_ at ameritech.net livewire
+Gáspár Ákos madar at www.hnp.hu madar
+Manolis Tzanidakis mtzanidakis at lycos.co.uk manolis
+Marc Greene eru at subdimension.com marc
+Mark Rushing mark at orbislumen.net mark
+Mike Dinitz mdinitz at Princeton.edu mike
+Nazadus nazadus at swbell.net nazadus
+Chris Newton baron at shutdown.com newton
+Nils Hjärpe nisse at aol.fi nils
+Paul Laws paul at moway.co.uk paul
+Paulo Almeida pamma at netcabo.pt paulo
+Philippe Namias pn at novadeck.net philippe
+P. Martin pmartin at pe.net pmartin
+Richard Snow richardsnow at mcc4u.com richard
+Rober Amble robert_amble at yahoo.com robert
+Robin Cook rcook at wyrms.net robin
+Russel Ingarm ringram at gargoylecc.com russel
+Sasha Andric sasha at goldnet.ca sasha
+Seppo Tamminen setammi at uusikaupunki.fi seppo
+Shawn shawn at digilliance.net shawn
+steve sja8rd at mizzou.edu sja8rd
+Steve Pinkham spinkham at bigfoot.com steve
+Sven Oliver Moll svolli at svolli.de svolli
+Target target at targ.dyndns.org target
+Thmoas Stewart thomas at stewarts.org.uk thomas
+Toby Oxborrow oxborrow at oxborrow.net toby
+Tom thomas at stewarts.org.uk tom
+Torgeir Ulvedal Nes torgeir at nes.ac torgeir
+trick gerry at c64.org trick
+Väinö Järvelä vaino.jarvela at pp.inet.fi vaino
+Wes Warner wes at lppcs.com wes
+
+ -- Epilogue
+
+Lastly, there are those whose names we have forgotten, and we are ashamed of
+not knowing exactly who has helped us in the past.
+
+If you feel that this list is incomplete or needs adjustment in any way, feel
+free to inform us at <maintainer at lunar-linux.org>.
+
diff --git a/doc/core-documentation/Reference_Directory.html b/doc/core-documentation/Reference_Directory.html
new file mode 100644
index 0000000..d045758
--- /dev/null
+++ b/doc/core-documentation/Reference_Directory.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>Reference Directory</title>
+ <meta name="author" content="Chuck Mead">
+</head>
+<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
+ link="#0000ff" alink="#000088" vlink="#ff0000">
+<h1>Reference Directory</h1>
+<br>
+<h2>Variable Definitions</h2>
+<br>
+<a
+ href="file:///home/csm/sandbox/theedge/usr/share/doc/lunar/core-documentation/etc_lunar_config.html">/etc/lunar/config</a>
+- the initial defines required for the entirety of the Lunar core
+toolset's operation.<br>
+<br>
+<a href="_etc_lunar_local_config.html">/etc/lunar/local/config</a> -
+local defines which may override settings in /etc/lunar/config.<br>
+<br>
+<br>
+<hr style="width: 100%; height: 2px;">© 2003, <a
+ href="http://lunar-linux.org">Lunar-Linux.org</a><br>
+Written by: Chuck Mead <csm at lunar-linux.org><br>
+Last edited: 16 Feb 2003
+</body>
+</html>
diff --git a/doc/core-documentation/_etc_lunar_local_config.html b/doc/core-documentation/_etc_lunar_local_config.html
new file mode 100644
index 0000000..7285fbb
--- /dev/null
+++ b/doc/core-documentation/_etc_lunar_local_config.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>/etc/lunar/local/config</title>
+ <meta name="author" content="Chuck Mead">
+</head>
+<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
+ link="#0000ff" alink="#000088" vlink="#ff0000">
+<h2>File Name: /etc/lunar/local/config</h2>
+<br>
+Contains initial defines which may override settings in
+/etc/lunar/config. These or the ones in /etc/lunar/config are
+required for the entirety of the Lunar core toolset's operation.<br>
+<br>
+<br>
+<h3>Global Variable Defines</h3>
+<td style="vertical-align: top;"> </td>
+<td style="vertical-align: top;">
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">
+ <h3>Define</h3>
+ </td>
+ <td style="vertical-align: top;">
+ <h3>Explanation</h3>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MOONBASE=/home/csm/sandbox/moonbase<br>
+ </td>
+ <td style="vertical-align: top;">Default location of the moonbase
+(overrides the entry in /etc/lunar/config).</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">GCCVER=3<br>
+ </td>
+ <td style="vertical-align: top;">Defining the gcc version used on
+the system. There are two gcc modules (gcc [which is gcc version 3, the
+default] and gcc2).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">FUZZY=on<br>
+ </td>
+ <td style="vertical-align: top;">Implements fuzzy logic to allow
+download file extensions to vary between bz2 and gz.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">LUNAR_MODULE=theedge<br>
+ </td>
+ <td style="vertical-align: top;">Variable defining which version
+of the Lunar core tools the system is using. May be "theedge" or
+"lunar". Lunar is mostly stable and theedge is the developer version.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ADMIN=csm<br>
+ </td>
+ <td style="vertical-align: top;">Identifies the local admin for
+system notices (normally sent via email).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">FIND_CHECK=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on the find_check()
+function in /sbin/lin. This looks for missing files which the package
+manager has recorded are present and notifies the user if something is
+missing.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MD5SUM_CHECK=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the
+md5sum_check() function in /sbin/lin.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">LDD_CHECK=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the
+ldd_check() function in /sbin/lin.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SYM_CHECK=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the
+sym_check() function in /sbin/lin.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">PROMPT_DELAY=10<br>
+ </td>
+ <td style="vertical-align: top;">Used by the set_delay() function
+in /sbin/lunar.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ARCHIVE=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) log archiving.
+Used by the archive() function in /var/lib/lunar/subroutines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">AUTOFIX=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the autofix
+mode for lunar update. Used by the upgrade_install_queue() function in
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">AUTOPRUNE=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the autoprune
+mode for lunar update. Used by the upgrade_install_queue() function in
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">KEEP_SOURCE=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the keep
+source mode for lin. Used by the lin_module() function in /sbin/lin and
+the default_pre_build() function in /var/lib/lunar/subroutines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MAIL_REPORTS=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the mailing of
+reports to the admin. Used by the report() function in
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">PRESERVE=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the
+preservation of running config files for modules. Used by the
+handle_config_files() function in /sbin/lrm and the
+reap_modified_file() function in /var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SOUND=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) audio feedback
+when using lunar core tools. Used by the sound() function in
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SUSTAIN=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the ability to
+remove modules which are "sustained". Used by the check_status()
+function in /sbin/lrm. When set to on this disallows removing of
+modules that would cause terrible malfunctions. eg glibc, gcc,
+and bash, to name some obvious ones.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">VIEW_REPORTS=off<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the report()
+function in /var/lib/lunar/subroutines. If set to on then you will be
+prompted whether to view reports before and after installation.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">VOYEUR=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) real time
+compiler output. Used by the activate_voyeur() function in /sbin/lin.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">REAP=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) the deletion
+of files when removing modules. Used by the reaper() function in
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">GARBAGE=on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) mass handling
+of documentation when installing modules. GARBAGE=on insures that the
+maximum amount of documentation will be gathered and store in
+/usr/share/docs/$module_name. It is used by the gather_docs() function
+in /var/lib/lunar/functions/postbuild.lunar.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">color on<br>
+ </td>
+ <td style="vertical-align: top;">Turns on (or off) color output
+from /sbin/lin. Used by the color() function in
+/var/lib/lunar/subroutines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">VERBOSE=on<br>
+ </td>
+ <td style="vertical-align: top;">Toggles verbose mode for
+/sbin/lget and /sbin/lrm. Used by the functions sedit(), unpack(),
+save_libraries(), release_saved_libraries(), rm_source_dir(),
+mk_source_dir(), validate_source_dir(), bad_flags(), patch_it(),
+default_pre_build(), default_config(), default_make(), default_build(),
+remove_module(), add_module(), and prune() in
+/var/lib/lunar/subroutines as well as run_module_file() in
+/var/lib/lunar/functions/modules.lunar and gather_docs(), and
+install_pam_confs() in /var/lib/lunar/functions/postbuild.lunar.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+</td>
+<hr style="width: 100%; height: 2px;">© 2003, <a
+ href="http://lunar-linux.org">Lunar-Linux.org</a><br>
+Written by: Chuck Mead <csm at lunar-linux.org><br>
+Last edited: 17 Feb 2003
+</body>
+</html>
diff --git a/doc/core-documentation/etc_lunar_config.html b/doc/core-documentation/etc_lunar_config.html
new file mode 100644
index 0000000..3bc6a87
--- /dev/null
+++ b/doc/core-documentation/etc_lunar_config.html
@@ -0,0 +1,426 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>/etc/lunar/config</title>
+ <meta name="author" content="Chuck Mead">
+ <meta name="description"
+ content="Contains the the initial defines required for the lunar core's operation.">
+</head>
+<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
+ link="#0000ff" alink="#000088" vlink="#ff0000">
+<h2>File Name: /etc/lunar/config </h2>
+<br>
+Contains the initial defines required for the entirety of the Lunar
+core toolset's operation.<br>
+<br>
+The following tables contain a list of global variables defined for use
+throughout the Lunar tool set. These are used by <a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lget">/sbin/lget</a>,<a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lin">/sbin/lin</a>,<a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lrm">/sbin/lrm</a>,<a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lunar">/sbin/lunar</a>,
+and <a href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lvu">/bin/lvu</a>
+and many of the <a href="#SUBROUTINES">subroutines</a> and <a
+ href="#FUNCTIONS">functions</a> which make up the toolset.<br>
+<br>
+<h3>Environmental Defines</h3>
+<br>
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">
+ <h3>Define</h3>
+ </td>
+ <td style="vertical-align: top;">
+ <h3>Explanation</h3>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a name="DIALOGRC"></a>DIALOGRC=/etc/lunar/dialogrc</td>
+ <td style="vertical-align: top;">Configuration file for the
+dialog binary used by the lunar core tools.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+<h3>Global Variable Defines</h3>
+<br>
+<table cellpadding="2" cellspacing="2" border="1"
+ style="text-align: left; width: 100%;">
+ <tbody>
+ <tr>
+ <td style="vertical-align: top;">
+ <h3>Define</h3>
+ </td>
+ <td style="vertical-align: top;">
+ <h3>Explanation</h3>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">CONFIG_CACHE=/etc/lunar/local</td>
+ <td style="vertical-align: top;">Directory containing configs
+which are system specific.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a name="LOCAL_CONFIG"></a>LOCAL_CONFIG=/etc/lunar/local/config<br>
+ </td>
+ <td style="vertical-align: top;">File containing system specific
+local defines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">DEPENDS_CONFIG=/etc/lunar/local/depends<br>
+ </td>
+ <td style="vertical-align: top;">Each file in this directory
+contains information about how the module was configured at install time.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">LOCAL_EXCLUDED=/etc/lunar/local/excluded<br>
+ </td>
+ <td style="vertical-align: top;">Local list of files that are
+excluded during a lin or lrm.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MIRRORS=/etc/lunar/mirrors<br>
+ </td>
+ <td style="vertical-align: top;">List of mirrors known to contain
+alternate download locations for sources.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">LUNAR_MODULES="lunar theedge"<br>
+ </td>
+ <td style="vertical-align: top;">Two versions of Lunar core tools.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">BUILD_DIRECTORY=/usr/src<br>
+ </td>
+ <td style="vertical-align: top;">The directory Lunar uses to
+build modules.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">DOCUMENT_DIRECTORY=/usr/share/doc<br>
+ </td>
+ <td style="vertical-align: top;">Location for documentation.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">EXCLUDED=/var/lib/lunar/excluded</td>
+ <td style="vertical-align: top;">Default list of files that are
+excluded during a lin or lrm.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=moonbase">MOONBASE</a>=/var/lib/lunar/moonbase<br>
+ </td>
+ <td style="vertical-align: top;">Default location of the moonbase
+(may be over ridden in /etc/lunar/local/config).<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">PROTECTED=/var/lib/lunar/protected<br>
+ </td>
+ <td style="vertical-align: top;">Contains a list of files that
+will not be removed.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SOLO=/var/lib/lunar/solo<br>
+ </td>
+ <td style="vertical-align: top;">List of modules which cannot be
+compiled while other modules are being installed.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a name="SUBROUTINES"></a>SUBROUTINES=/var/lib/lunar/subroutines<br>
+ </td>
+ <td style="vertical-align: top;">File containing core subroutines
+which are used by many of the core tools. It sources all of the files in <a
+ href="#FUNCTIONS">$FUNCTIONS</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;"><a name="FUNCTIONS"></a>FUNCTIONS=/var/lib/lunar/functions<br>
+ </td>
+ <td style="vertical-align: top;">Directory containing <a
+ href="#SUBROUTINES">subroutines</a> in separate files<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MENUS=/var/lib/lunar/menu<br>
+ </td>
+ <td style="vertical-align: top;">Directory containing shell
+scripts which generate menus used by <a href="#DIALOGRC">dialog</a> for
+the lunar menuing system.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SUSTAINED=/var/lib/lunar/sustained<br>
+ </td>
+ <td style="vertical-align: top;">List of modules that are
+essential to system. Removal of these modules is not permitted.
+Installing and upgrading is fine.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SOUND_DIRECTORY=/var/lib/lunar/sound<br>
+ </td>
+ <td style="vertical-align: top;">Directory which stores sound
+themes for the lunar tools.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">SOUND_THEME=startrek<br>
+ </td>
+ <td style="vertical-align: top;">Current sound theme for use by
+the subroutines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">BOOST_LOCK=/var/lock/boost<br>
+ </td>
+ <td style="vertical-align: top;">Locks the archive and track
+functions so they are never run in parallel.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ACTIVITY_LOG=/var/log/lunar/activity<br>
+ </td>
+ <td style="vertical-align: top;">Log file which is written to by
+various lunar <a href="#SUBROUTINES">subroutines</a> to record actions
+executed by the lunar tools.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">INSTALL_LOGS=/var/log/lunar/install<br>
+ </td>
+ <td style="vertical-align: top;">Directory containing log files
+which record the installation of modules.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">COMPILE_LOGS=/var/log/lunar/compile<br>
+ </td>
+ <td style="vertical-align: top;">Directory containing log files
+which record the compilation of modules.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MD5SUM_LOGS=/var/log/lunar/md5sum<br>
+ </td>
+ <td style="vertical-align: top;">Directory containing md5sums for
+modules which use them.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">INSTALL_QUEUE=/var/log/lunar/queue/install<br>
+ </td>
+ <td style="vertical-align: top;">This file holds the the queues
+for installation that are used by the lunar core tools.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">REMOVE_QUEUE=/var/log/lunar/queue/remove<br>
+ </td>
+ <td style="vertical-align: top;">This file holds the the queues
+for removal that are used by the lunar core tools.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">DEPENDS_STATUS=/var/state/lunar/depends<br>
+ </td>
+ <td style="vertical-align: top;">Flat file dependency database
+for lunar.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">DEPENDS_STATUS_BACKUP=/var/state/lunar/depends.backup<br>
+ </td>
+ <td style="vertical-align: top;">Backup flat file dependency
+database for lunar.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MODULE_STATUS=/var/state/lunar/packages<br>
+ </td>
+ <td style="vertical-align: top;">List of installed modules with
+their install date and version info.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MODULE_STATUS_BACKUP=/var/state/lunar/packages.backup<br>
+ </td>
+ <td style="vertical-align: top;">Backup list of installed modules
+with their install date and version info.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: left;">MODULE_INDEX=/var/state/lunar/module.index<br>
+ </td>
+ <td style="vertical-align: top;">Module list which contains the
+moonbase group to which each module belongs.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: left;">INSTALL_CACHE=/var/cache/lunar<br>
+ </td>
+ <td style="vertical-align: top;">Backup copy of compiled modules
+which are installed on the system.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: left;">SOURCE_CACHE=${SOURCE_CACHE:=/var/spool/lunar}<br>
+ </td>
+ <td style="vertical-align: top;">If the value of $SOURCE_CACHE is
+empty make it equal to /var/spool/lunar else it continues to equal the
+value of its previous define.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: left;">LIN=lin<br>
+ </td>
+ <td style="vertical-align: top;">The name of the script used to
+install lunar modules.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; text-align: left;">ARCHIVE=${ARCHIVE:=on}<br>
+AUTOFIX=${AUTOFIX:=on}<br>
+AUTOPRUNE=${AUTOPRUNE:=off}<br>
+MAIL_REPORTS=${MAIL_REPORTS:=off}<br>
+PRESERVE=${PRESERVE:=on}<br>
+REAP=${REAP:=on}<br>
+ADMIN=${ADMIN:=root}<br>
+SOUND=${SOUND:=off}<br>
+SUSTAIN=${SUSTAIN:=on}<br>
+VIEW_REPORTS=${VIEW_REPORTS:=on}<br>
+VOYEUR=${VOYEUR:=on}<br>
+GARBAGE=${GARBAGE:=on}<br>
+PROMPT_DELAY=${PROMPT_DELAY:=150}<br>
+LUNAR_PRIORITY="+10"<br>
+MAX_SOURCES=100<br>
+LDD_CHECK=${LDD_CHECK:=on}<br>
+FIND_CHECK=${FIND_CHECK:=on}<br>
+MD5SUM_CHECK=${MD5SUM_CHECK:=on}<br>
+SYM_CHECK=${SYM_CHECK:=off}<br>
+ </td>
+ <td style="vertical-align: top;">A comprehensive list of
+variables which may be locally assigned in /etc/lunar/local/config or by
+using the lunar tool.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">GNU_URL=ftp://ftp.gnu.org/pub/gnu<br>
+KDE_URL=ftp://ftp.kde.org/pub/kde<br>
+GNOME_URL=ftp://ftp.gnome.org/pub/GNOME<br>
+KERNEL_URL=ftp://ftp.kernel.org<br>
+SFORGE_URL=http://telia.dl.sourceforge.net/sourceforge<br>
+XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86<br>
+LRESORT_URL=http://lunar-linux.org/lunar/cache<br>
+ </td>
+ <td style="vertical-align: top;">URL variables used in modules
+and subroutines.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">MOONBASE_URL=http://lunar-linux.org/lunar/moonbase.tar.bz2<br>
+ </td>
+ <td style="vertical-align: top;">Direct URL for the default Lunar <a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=moonbase">moonbase</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">PATCH_URL=http://lunar-linux.org/lunar/patches<br>
+ </td>
+ <td style="vertical-align: top;">Direct URL for all the Lunar
+patches.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">TRACKED="/bin /boot /etc /lib
+/sbin /usr /var /opt/lunar"<br>
+ </td>
+ <td style="vertical-align: top;">Install locations which are
+tracked (recorded) by the lunar installation routines. Interactive use
+provided mostly by <a
+ href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lvu">lvu</a>.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">DEFAULT="\e[0m"<br>
+BOLD="\e[1m"<br>
+BLACK="\e[30m"<br>
+RED="\e[31m"<br>
+GREEN="\e[32m"<br>
+YELLOW="\e[33m"<br>
+BLUE="\e[34m"<br>
+VIOLET="\e[35m"<br>
+CYAN="\e[36m"<br>
+WHITE="\e[37m"<br>
+MODULE_COLOR="${WHITE}${BOLD}\e[40m"<br>
+VERSION_COLOR="${WHITE}${BOLD}\e[40m"<br>
+QUERY_COLOR="${YELLOW}${BOLD}"<br>
+LRM_COLOR="${YELLOW}${BOLD}"<br>
+CHECK_COLOR="${CYAN}"<br>
+RESURRECT_COLOR="${GREEN}${BOLD}"<br>
+FILE_COLOR="${GREEN}${BOLD}"<br>
+SYMLINK_COLOR="${CYAN}${BOLD}"<br>
+PROBLEM_COLOR="${RED}${BOLD}"<br>
+MESSAGE_COLOR="${BLUE}${BOLD}"<br>
+MESSAGE_COLOR="${CYAN}"<br>
+DEFAULT_COLOR="${DEFAULT}"<br>
+ </td>
+ <td style="vertical-align: top;">Variables defining the default
+colors used by the Lunar tool set.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">TAB_ENTER_IFS="<br>
+"<br>
+ </td>
+ <td style="vertical-align: top;">Enabling modification of IFS
+(internal field separator) which is a bash shell default.<br>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">ENTER_IFS="<br>
+"<br>
+ </td>
+ <td style="vertical-align: top;">Enabling modification of IFS
+(internal field separator) which is a bash shell default.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">STANDARD_IFS="<br>
+"<br>
+ </td>
+ <td style="vertical-align: top;">Enabling modification of IFS
+(internal field separator) which is a bash shell default.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">. $SUBROUTINES<br>
+ </td>
+ <td style="vertical-align: top;">Sourcing the <a
+ href="#SUBROUTINES">subroutines</a> file
+/var/lib/lunar/subroutines.</td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top;">[ -s "<a href="#LOCAL_CONFIG">$LOCAL_CONFIG</a>"
+] && . <a href="#LOCAL_CONFIG">$LOCAL_CONFIG</a><br>
+ </td>
+ <td style="vertical-align: top;">If /etc/lunar/local/config
+exists and is not empty it is sourced. Some variables assigned in this
+file may over-ride those assigned here.<br>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<br>
+<hr style="width: 100%; height: 2px;">© 2003, <a
+ href="http://lunar-linux.org">Lunar-Linux.org</a><br>
+Written by: Chuck Mead <csm at lunar-linux.org><br>
+Last edited: 16 Feb 2003
+</body>
+</html>
diff --git a/doc/core-documentation/purpose.html b/doc/core-documentation/purpose.html
new file mode 100644
index 0000000..cd99812
--- /dev/null
+++ b/doc/core-documentation/purpose.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+ <title>Purpose</title>
+ <meta name="description"
+ content="this is a sub-document describing the purpose of the Lunar Core documentation tree">
+</head>
+<body>
+<h1>Purpose</h1>
+<h2>Introduction</h2>
+<br>
+The purpose of this documentation is to begin the process of unraveling
+the purpose and structure of all the files, defines and functions of
+the lunar core code.<br>
+<br>
+<h2>Method</h2>
+<br>
+We will start at the bottom file in the lunar core tree, invert it and
+grow downward from there.<br>
+<br>
+<br>
+<hr style="width: 100%; height: 2px;">© 2003, <a
+ href="http://lunar-linux.org">Lunar-Linux.org</a><br>
+Written by: Chuck Mead <csm at lunar-linux.org><br>
+Last edited: 16 Feb 2003<br>
+</body>
+</html>
diff --git a/doc/gpl.html b/doc/gpl.html
new file mode 100644
index 0000000..973727c
--- /dev/null
+++ b/doc/gpl.html
@@ -0,0 +1,553 @@
+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<HTML>
+<HEAD>
+<TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE>
+<LINK REV="made" HREF="mailto:webmasters at www.gnu.org">
+</HEAD>
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
+<H1>GNU General Public License</H1>
+<A HREF="/graphics/philosophicalgnu.html"><IMG SRC="/graphics/philosophical-gnu-sm.jpg"
+ ALT=" [image of a Philosophical GNU] "
+ WIDTH="160" HEIGHT="200"></A>
+
+<!-- Please keep this list alphabetical -->
+<!-- tower, gpl.ja.html is Japanese translation of THIS PAGE, -->
+<!-- NOT translation of GPL itself(gpl.ja.html contains the original -->
+<!-- English version). So please do not remove the following. -->
+<!-- Thanks -mhatta -->
+[
+ <A HREF="/copyleft/gpl.html">English</A>
+| <A HREF="/copyleft/gpl.ja.html">Japanese</A>
+]
+
+<!-- It is best to not enumerate the translations here in a menu bar, -->
+<!-- It is best to have the users follow this link, so they have the FSF' -->
+<!-- explanation about translations being unofficial, etc. -->
+
+<P>
+<UL>
+ <LI><A HREF="/copyleft/gpl-violation.html"><EM>What to do if you see a
+ possible GPL violation</EM></A>
+ <LI><A HREF="/copyleft/copyleft.html#translations"><EM>Translations
+ of the GPL</EM></A>
+ <LI><A HREF="/copyleft/gpl-faq.html"><EM>GPL Frequently Asked Questions</EM></A>
+ <LI>The GNU General Public License (GPL)
+ <A HREF="/copyleft/gpl.txt">in plain text format</A>
+ <LI>The GNU General Public License (GPL)
+ <A HREF="/copyleft/gpl.texi">in Texinfo format</A>
+</UL>
+<P>
+<HR>
+
+<P>
+
+<H2>Table of Contents</H2>
+<UL>
+
+ <LI><A NAME="TOC1" HREF="gpl.html#SEC1">GNU GENERAL PUBLIC LICENSE</A>
+<UL>
+<LI><A NAME="TOC2" HREF="gpl.html#SEC2">Preamble</A>
+<LI><A NAME="TOC3" HREF="gpl.html#SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A>
+<LI><A NAME="TOC4" HREF="gpl.html#SEC4">How to Apply These Terms to Your New Programs</A>
+
+</UL>
+</UL>
+
+<P>
+
+<HR>
+
+<P>
+
+
+
+<H2><A NAME="SEC1" HREF="gpl.html#TOC1">GNU GENERAL PUBLIC LICENSE</A></H2>
+<P>
+Version 2, June 1991
+
+</P>
+
+<PRE>
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+</PRE>
+
+
+
+<H2><A NAME="SEC2" HREF="gpl.html#TOC2">Preamble</A></H2>
+
+<P>
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+</P>
+<P>
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+</P>
+<P>
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+</P>
+<P>
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+</P>
+<P>
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+</P>
+<P>
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+</P>
+<P>
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+</P>
+<P>
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+</P>
+
+
+<H2><A NAME="SEC3" HREF="gpl.html#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A></H2>
+
+
+<P>
+
+<STRONG>0.</STRONG>
+ This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+<P>
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+<P>
+
+<STRONG>1.</STRONG>
+ You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+<P>
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+<P>
+
+<STRONG>2.</STRONG>
+ You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+<P>
+
+<UL>
+
+<LI><STRONG>a)</STRONG>
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+<P>
+<LI><STRONG>b)</STRONG>
+ You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+<P>
+<LI><STRONG>c)</STRONG>
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+</UL>
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+<P>
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+<P>
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+<P>
+
+<STRONG>3.</STRONG>
+ You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+
+<!-- we use this doubled UL to get the sub-sections indented, -->
+<!-- while making the bullets as unobvious as possible. -->
+<UL>
+
+<LI><STRONG>a)</STRONG>
+ Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+<P>
+<LI><STRONG>b)</STRONG>
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+<P>
+<LI><STRONG>c)</STRONG>
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+</UL>
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+<P>
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+<P>
+
+<STRONG>4.</STRONG>
+ You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+<P>
+
+<STRONG>5.</STRONG>
+ You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+<P>
+
+<STRONG>6.</STRONG>
+ Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+<P>
+
+<STRONG>7.</STRONG>
+ If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+<P>
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+<P>
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+<P>
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+<P>
+
+<STRONG>8.</STRONG>
+ If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+<P>
+
+<STRONG>9.</STRONG>
+ The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+<P>
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+<P>
+
+
+<STRONG>10.</STRONG>
+ If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+
+
+<P><STRONG>NO WARRANTY</STRONG></P>
+
+<P>
+
+<STRONG>11.</STRONG>
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+<P>
+
+<STRONG>12.</STRONG>
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+<P>
+
+
+<H2>END OF TERMS AND CONDITIONS</H2>
+
+
+
+<H2><A NAME="SEC4" HREF="gpl.html#TOC4">How to Apply These Terms to Your New Programs</A></H2>
+
+<P>
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+</P>
+<P>
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+</P>
+
+<PRE>
+<VAR>one line to give the program's name and an idea of what it does.</VAR>
+Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+</PRE>
+
+<P>
+Also add information on how to contact you by electronic and paper mail.
+
+</P>
+<P>
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+</P>
+
+<PRE>
+Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR>
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'. This is free software, and you are welcome
+to redistribute it under certain conditions; type `show c'
+for details.
+</PRE>
+
+<P>
+The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than <SAMP>`show w'</SAMP> and
+<SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever
+suits your program.
+
+</P>
+<P>
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+</P>
+
+<PRE>
+Yoyodyne, Inc., hereby disclaims all copyright
+interest in the program `Gnomovision'
+(which makes passes at compilers) written
+by James Hacker.
+
+<VAR>signature of Ty Coon</VAR>, 1 April 1989
+Ty Coon, President of Vice
+</PRE>
+
+<P>
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+<HR>
+
+Return to <A HREF="/home.html">GNU's home page</A>.
+<P>
+FSF & GNU inquiries & questions to
+<A HREF="mailto:gnu at gnu.org"><EM>gnu at gnu.org</EM></A>.
+Other <A HREF="/home.html#ContactInfo">ways to contact</A> the FSF.
+<P>
+Comments on these web pages to
+<A HREF="mailto:webmasters at www.gnu.org"><EM>webmasters at www.gnu.org</EM></A>,
+send other questions to
+<A HREF="mailto:gnu at gnu.org"><EM>gnu at gnu.org</EM></A>.
+<P>
+Copyright notice above.<BR>
+Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111, USA
+<P>
+Updated:
+<!-- hhmts start -->
+31 Jul 2000 jonas
+<!-- hhmts end -->
+<HR>
+</BODY>
+</HTML>
diff --git a/doc/module-example/BUILD b/doc/module-example/BUILD
new file mode 100644
index 0000000..ae0eae2
--- /dev/null
+++ b/doc/module-example/BUILD
@@ -0,0 +1,42 @@
+(
+
+ if module_installed Linux-PAM; then
+ WITH_PAM="--with-pam"
+ fi
+
+set -x
+
+ ./configure --sysconfdir=/etc \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-everything \
+ $WITH_PAM \
+ $OPTS &&
+
+set +x
+
+ make &&
+ prepare_install &&
+ make install
+
+) > $C_FIFO 2>&1 && (
+
+
+ if [ ! -f /etc/ftplockout ]
+ then cp pam/ftplockout /etc
+ fi
+
+ if ! [ -e /etc/init.d/pure-ftpd ]; then
+ cp $SCRIPT_DIRECTORY/pure-ftpd /etc/init.d
+ fi
+
+ case $FTPD_BOOT in
+ y|Y) chkconfig --add pure-ftpd
+ ;;
+
+ *) true
+ ;;
+ esac
+
+)
diff --git a/doc/module-example/CONFIGURE b/doc/module-example/CONFIGURE
new file mode 100644
index 0000000..78772b5
--- /dev/null
+++ b/doc/module-example/CONFIGURE
@@ -0,0 +1,29 @@
+#
+# CONFIGURE example
+#
+
+# showstopper example: this is for the gcc3 module, which can possibly
+# ruin your box. This example shows a neat way of bailing out elegantly:
+# WARNING_SIGN=${MESSAGE_COLOR}"Caution, installation of gcc3 can severly damage a working stable system. Installation on a mission critial box is not recomended at this point."
+# message $WARNING_SIGN
+#
+# query "Are you sure you want to install?" n
+
+
+# complex example showing the ability of lunar to store and re-use
+# previous configuration settings:
+# if ! grep -q CONFIGURED $MODULE_CONFIG; then
+#
+# if query "Do you want to disable banner? " y
+# then OPTS=$OPTS" --without-banner"
+# fi
+#
+# if query "Do you want to enable large file support? " y
+# then OPTS=$OPTS" --with-largefile"
+# fi
+#
+# echo 'CONFIGURED="y"' >> $MODULE_CONFIG
+# echo 'OPTS='\"$OPTS\" >> $MODULE_CONFIG
+# fi
+
+
diff --git a/doc/module-example/CONFLICTS b/doc/module-example/CONFLICTS
new file mode 100644
index 0000000..33e5c35
--- /dev/null
+++ b/doc/module-example/CONFLICTS
@@ -0,0 +1,11 @@
+#
+# CONFLICTS example
+#
+
+# single conflicts:
+# conflicts moduleA
+
+# multiple:
+# conflicts moduleA &&
+# conflicts moduleB
+
diff --git a/doc/module-example/DEPENDS b/doc/module-example/DEPENDS
new file mode 100644
index 0000000..1152f48
--- /dev/null
+++ b/doc/module-example/DEPENDS
@@ -0,0 +1,31 @@
+#
+# DEPENDS example
+#
+
+# always end the line with && except for the last one!
+
+# single depends:
+# depends moduleA
+
+# single optional depends:
+# optional_depends "moduleA" "" "" "For blabla support"
+
+# optional depends that use configure switches:
+# optional_depends "moduleC" \
+# "--with-configure-option" \
+# "--without-configure-option" \
+# "for blabla support"
+
+# multiple depends:
+# depends moduleA &&
+# depends moduleB
+
+# or everything:
+# depends moduleA &&
+# depends moduleB &&
+# optional_depends "moduleC" \
+# "--with-configure-option" \
+# "--without-configure-option" \
+# "for blabla support" &&
+# optional_depends "moduleD" "" "" "For blabla support"
+
diff --git a/doc/module-example/DETAILS b/doc/module-example/DETAILS
new file mode 100644
index 0000000..d598641
--- /dev/null
+++ b/doc/module-example/DETAILS
@@ -0,0 +1,47 @@
+#
+# DETAILS example
+#
+
+# This demonstrates how to put in every possible parameter in a DETAILS
+# file. Note that not everything is required, but a minimum is:
+
+# MODULE name of the module, identical to the name if the
+# directory it resides in
+# VERSION current version number of the package
+# SOURCE the name of the source file
+# SOURCE_DIRECTORY the name of where the source will unpack
+# SOURCE_URL[0] the name of source file
+# WEBSITE the main website of the package
+# ENTERED the date (format yyyymmdd) when it was added
+# UPDATED tha date (format yyyymmdd) when a recompile
+# was needed
+# SHORT a one line description
+
+# and of course the long description that looks like this:
+# cat << EOF
+# blablablabla
+# ....
+# EOF
+
+
+# here's an example with some comments and additions:
+# MODULE=pure-ftpd
+# VERSION=1.0.12
+# SOURCE=$MODULE-$VERSION.tar.gz
+# SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+# SOURCE_URL[0]=http://telia.dl.sourceforge.net/pureftpd/$SOURCE
+# WEB_SITE=http://www.pureftpd.org
+# ENTERED=20010922
+# UPDATED=20020609
+# MAINTAINER=maintaner at moongroup.com
+# SHORT="An efficient, lightweight, and secure FTP server"
+# cat << EOF
+# Pure FTP Server is a fast, production quality, standards-
+# conformant FTP server based on Troll-FTPd. It has no known
+# buffer overflows, is trivial to set up, and is especially
+# designed for modern kernels. Features include PAM support,
+# IPv6, chroot()ed home directories, virtual domains, built-in
+# 'ls', FXP protocol, anti-warez system, bandwidth throttling,
+# bounded ports for passive downloads, an LDAP backend, XML
+# output, and more.
+# EOF
diff --git a/doc/module-example/POST_BUILD b/doc/module-example/POST_BUILD
new file mode 100644
index 0000000..e69de29
diff --git a/doc/module-example/POST_INSTALL b/doc/module-example/POST_INSTALL
new file mode 100644
index 0000000..a517af3
--- /dev/null
+++ b/doc/module-example/POST_INSTALL
@@ -0,0 +1,10 @@
+
+if [ -x /etc/init.d/pure-ftpd.sh ]; then
+ rm /etc/init.d/pure-ftpd.sh
+fi
+
+if [ -e "/etc/rc?.d/*pure-ftpd*" ]; then
+ rm -f /etc/rc?.d/*pure-ftpd*
+fi
+
+
diff --git a/doc/module-example/POST_REMOVE b/doc/module-example/POST_REMOVE
new file mode 100644
index 0000000..e69de29
diff --git a/doc/module-example/PRE_BUILD b/doc/module-example/PRE_BUILD
new file mode 100644
index 0000000..e69de29
diff --git a/doc/module-example/PRE_REMOVE b/doc/module-example/PRE_REMOVE
new file mode 100644
index 0000000..da624a7
--- /dev/null
+++ b/doc/module-example/PRE_REMOVE
@@ -0,0 +1,3 @@
+if [ -x /etc/init.d/pure-ftpd ]; then
+ chkconfig --del pure-ftpd
+fi
diff --git a/doc/module-example/README b/doc/module-example/README
new file mode 100644
index 0000000..c8f3eba
--- /dev/null
+++ b/doc/module-example/README
@@ -0,0 +1,124 @@
+
+ README for the skeleton module
+
+--
+NOTE: all files have been disabled by putting '#' comments in them,
+if you wish to use the examples in this directory, please remove the
+comments and modify it carefully so the module does exactly what you
+think it does.
+
+--
+This skeleton module was compiled from various modules in the moonbase
+and gives a wide range of what is possible when you write modules. I
+tried to include virtually every possible scheme but apart from the
+BUILD files most stuff is pretty straightforward.
+
+If you have any additions or comments on this file please notice us
+by dropping a mail in the lunar mailinglist. Anything is greatly
+appreciated!
+
+--
+Here's a brief explanation of the files in here:
+
+* DETAILS
+
+Required for any module. This file contains the data needed to obtain,
+describe and update a package. In here vital information like download
+URL's, version numbers and package description is put.
+
+* DEPENDS
+
+This file lists packages that need to be installed before you can install
+this package. It doesn not necessary have to be a library, but can also
+be include files or anything that you would need to compile, install
+and run the module.
+
+In here you can als list optional depends, being packages that do not
+necessary have to be installed, for instance packages that add extra
+features (e.g. fonts, plugins etc.).
+
+* CONFLICTS
+
+Modules listed in here must not be present when installing this module.
+Use this to separate your module from incompatible other ones. For instance
+the BitchX module is incompatible with the gtk version gtkBitchX, so
+these 2 modules have eachother listed in their CONFLICTS file. Another
+good example is conflicting daemons like sendmail vs. exim, cron vs.
+hc-cron etc.
+
+* BUILD
+
+This script will configure, make and install the package. You can virtually
+control everything in here, like adding patches (kernel), changing build
+options (xfree86) or asking the user for configuration options (sendmail).
+This script does not have to exist for programs that ./configure && make &&
+make install (lin will automatically --prefix=/usr for you), but a lot of
+modules need adjusting.
+
+* CONFIGURE
+
+This file serves as an alternative way to customize the configuring of the
+package.
+
+* PRE_BUILD
+
+This file is used if you need to apply patches or modifications before
+the package is built.
+
+* POST_BUILD
+
+Use this file if you need to tweak the compiles sources before it is
+installed.
+
+* POST_INSTALL
+
+When you need to additionally tweak things after installation, this is
+the place. Actions in this file are not logged in the install log, so
+you can e.g. create machine dependant configuration options that need
+to be kept in case of module removal.
+
+This is also the place to install and run daemons, reconfigure LILO etc..
+
+* PRE_REMOVE
+
+This script will be called before a module is lrm'ed. You can use it to
+back up configuration, stop daemons or similar stuff.
+
+* POST_REMOVE
+
+Use this file to clean stuff up after removing a module, or place
+configuration files in a backup location, etc..
+
+* other files and directories
+
+Nothing withholds you from putting much more stuff in your module directory,
+think of patches, small scripts, init.d scripts, xinetd or pam.d configuration
+files, or funky ascii art to make your module install look nice.
+
+As a general rule you must try to keep the module as small as possible
+however. For instance, if you were to put a 100K patch in the module
+directory, every lunar update requires that people download those
+100K, whether they use your patch or not. If you must, try to provide
+the patch or extra source code in a way that we can put it on our source
+mirror, or insert it as a secondary source URL in case someone has
+already provided it on the internet. This will save us from a lot of
+frustration.
+
+Some contents of subdirs are automatically handled, here's a list:
+
+ - pam.d - for pam settings
+ - xinetd.d - for xinetd service definitions
+ - init.d - for init.d startup scripts
+ - profile.d - for bash shell settings
+ - plugin.d - for lunar code plugins
+ - skel - for /etc/skel/ files
+
+
+The file 'services' can be used to add tcp/ip or udp service port
+definitions automatically in coherence with xinetd.d to the
+/etc/services global file
+
+
+
+--
+sofar 20020725
diff --git a/doc/module-example/init.d/README b/doc/module-example/init.d/README
new file mode 100644
index 0000000..3502c5d
--- /dev/null
+++ b/doc/module-example/init.d/README
@@ -0,0 +1,5 @@
+
+This directory contains some init.d scripts that need to be installed
+if you want to run a daemon at startup. Please make your init scripts
+work with chkconfig, so they can be easily installed and removed!
+
diff --git a/doc/module-example/init.d/ntp b/doc/module-example/init.d/ntp
new file mode 100644
index 0000000..9833fdb
--- /dev/null
+++ b/doc/module-example/init.d/ntp
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# ntp.sh
+# chkconfig: 2345 31 88
+# description: NTP is used to synchronize computer clocks
+# on a connected network or via GPS/phone/etc.
+
+if ! [ -d /etc/config.d ]; then
+ mkdir -p /etc/config.d
+ fi
+
+case "$1" in
+'start')
+ if pgrep ntpd
+ then
+ echo "ntp daemon already running. ntp start aborted"
+ exit 0
+ fi
+ if [ -f /etc/config.d/ntp.conf -a -x /usr/sbin/ntpd ]
+ then
+ /usr/sbin/ntpd -c /etc/config.d/ntp.conf -g
+ fi
+ ;;
+'stop')
+ pkill ntpd
+ ;;
+*)
+ echo "Usage: $0 { start | stop }"
+ ;;
+esac
diff --git a/doc/module-example/init.d/pure-ftpd b/doc/module-example/init.d/pure-ftpd
new file mode 100644
index 0000000..0cd436d
--- /dev/null
+++ b/doc/module-example/init.d/pure-ftpd
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Startup script for the pure-ftpd FTP Server
+#
+# chkconfig: 2345 85 15
+# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
+# processname: pure-ftpd
+# pidfile: /var/run/pure-ftpd.pid
+
+PURE_PID=/var/run/pure-ftpd.pid
+
+case $1 in
+ start|restart) echo "$1ing pure-ftpd, ftp daemon.."
+ [ -e "$PURE_PID" ] && kill `cat $PURE_PID`
+ pure-ftpd -b -B
+ ;;
+
+ stop) echo "$1ping pure-ftpd."
+ [ -e "$PURE_PID" ] && kill `cat $PURE_PID`
+ ;;
+
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
diff --git a/doc/module-example/init.d/sshd b/doc/module-example/init.d/sshd
new file mode 100644
index 0000000..79201e1
--- /dev/null
+++ b/doc/module-example/init.d/sshd
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# ssh Secure Shell Daemon
+#
+# chkconfig: 2345 80 30
+# description: SSH daemon
+# processname: master
+# pidfile: /var/run/sendmail.pid
+# config: /etc/mail/sendmail.cf
+
+if [ -e "/var/run/sshd.pid" ]; then
+ SPID=`cat /var/run/sshd.pid`
+fi
+
+case $1 in
+ start) echo "$1ing sshd."
+ sshd
+ ;;
+ stop) echo "$1ping sshd."
+ if [ -e "/var/run/sshd.pid" ]; then
+ kill -n 15 $SPID
+ fi
+ ;;
+ restart) $0 stop && $0 start
+ ;;
+ *) echo "Usage: $0 {start|stop|restart}"
+ ;;
+esac
+
diff --git a/doc/module-example/pam.d/README b/doc/module-example/pam.d/README
new file mode 100644
index 0000000..9857b5b
--- /dev/null
+++ b/doc/module-example/pam.d/README
@@ -0,0 +1,4 @@
+
+The pam.d directory can contain PAM config files. They will automatically
+be installed in /etc/pam.d if you provide them in a module.
+
diff --git a/doc/module-example/pam.d/chfn b/doc/module-example/pam.d/chfn
new file mode 100644
index 0000000..aa93e1a
--- /dev/null
+++ b/doc/module-example/pam.d/chfn
@@ -0,0 +1,7 @@
+#
+# The PAM configuration file for the `chfn' service
+#
+auth required pam_unix.so nullok
+account required pam_unix.so
+session required pam_unix.so
+password required pam_cracklib.so retry=3 type=Lunar
diff --git a/doc/module-example/pam.d/chsh b/doc/module-example/pam.d/chsh
new file mode 100644
index 0000000..d9624e2
--- /dev/null
+++ b/doc/module-example/pam.d/chsh
@@ -0,0 +1,8 @@
+#
+# The PAM configuration file for the `chsh' service
+#
+auth required pam_unix.so nullok
+account required pam_unix.so
+session required pam_unix.so
+password required pam_cracklib.so retry=3 type=Lunar
+password required pam_unix.so shadow md5 use_authtok
diff --git a/doc/module-example/pam.d/ftp b/doc/module-example/pam.d/ftp
new file mode 100644
index 0000000..2665e50
--- /dev/null
+++ b/doc/module-example/pam.d/ftp
@@ -0,0 +1,10 @@
+#
+# The PAM configuration file for the `ftp' service
+#
+auth requisite pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth sufficient pam_ftp.so
+auth required pam_unix.so shadow nullok use_first_pass
+auth requisite pam_shells.so
+account required pam_unix.so
+session required pam_unix.so
+session required pam_limits.so
diff --git a/doc/module-example/pam.d/gdm b/doc/module-example/pam.d/gdm
new file mode 100644
index 0000000..0594795
--- /dev/null
+++ b/doc/module-example/pam.d/gdm
@@ -0,0 +1,6 @@
+#
+# The PAM configuration file for the `gdm' service
+#
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/doc/module-example/pam.d/passwd b/doc/module-example/pam.d/passwd
new file mode 100644
index 0000000..a94e993
--- /dev/null
+++ b/doc/module-example/pam.d/passwd
@@ -0,0 +1,5 @@
+#
+# The PAM configuration file for the `passwd' service
+#
+password requisite pam_cracklib.so retry=3 type=Lunar
+password required pam_unix.so shadow md5 use_authtok
diff --git a/doc/module-example/pam.d/samba b/doc/module-example/pam.d/samba
new file mode 100644
index 0000000..0c68447
--- /dev/null
+++ b/doc/module-example/pam.d/samba
@@ -0,0 +1,5 @@
+#
+# The PAM configuration file for the `samba' service
+#
+auth required pam_unix.so
+account required pam_unix.so
diff --git a/doc/module-example/pam.d/shadow b/doc/module-example/pam.d/shadow
new file mode 100644
index 0000000..5f21b53
--- /dev/null
+++ b/doc/module-example/pam.d/shadow
@@ -0,0 +1,7 @@
+#
+# The PAM configuration file for the `shadow' service
+#
+auth sufficient pam_rootok.so
+auth required pam_unix_auth.so
+account required pam_unix.so
+password required pam_permit.so
diff --git a/doc/module-example/pam.d/su b/doc/module-example/pam.d/su
new file mode 100644
index 0000000..99baf6f
--- /dev/null
+++ b/doc/module-example/pam.d/su
@@ -0,0 +1,8 @@
+#
+# The PAM configuration file for the `su' service
+#
+# auth required pam_wheel.so
+auth sufficient pam_rootok.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/doc/module-example/profile.d/example.rc b/doc/module-example/profile.d/example.rc
new file mode 100644
index 0000000..4d10ce2
--- /dev/null
+++ b/doc/module-example/profile.d/example.rc
@@ -0,0 +1,10 @@
+
+# Example.rc
+
+# put any custom bash settings in here you wish to add to shell
+# variables:
+
+# PATH=${PATH}:/opt/lunar/mypackage/bin
+
+# export MYVAR=value
+
diff --git a/doc/module-example/services b/doc/module-example/services
new file mode 100644
index 0000000..97efdfb
--- /dev/null
+++ b/doc/module-example/services
@@ -0,0 +1,8 @@
+#
+# services example
+#
+
+# lines in this file will be AUTOMATICALLY appended to /etc/services, e.g.:
+# ftp-data 20/tcp
+# ftp 21/tcp
+
diff --git a/doc/module-example/xinetd.d/README b/doc/module-example/xinetd.d/README
new file mode 100644
index 0000000..ed8fa9b
--- /dev/null
+++ b/doc/module-example/xinetd.d/README
@@ -0,0 +1,6 @@
+
+xinetd.d has a config file for every service it runs (and port it
+should listen on of course). these config scripts look like the one
+in this directory. They weill automatically be installed into the
+/etc/xinetd.d/ for you if you provide them in here.
+
diff --git a/doc/module-example/xinetd.d/exim b/doc/module-example/xinetd.d/exim
new file mode 100644
index 0000000..f1ac480
--- /dev/null
+++ b/doc/module-example/xinetd.d/exim
@@ -0,0 +1,15 @@
+service smtp
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = mail
+ group = mail
+ server = /usr/sbin/exim
+ server_args = -bs
+ per_source = 8
+ log_type = FILE /var/log/xinetd/exim
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+
+}
diff --git a/doc/module-example/xinetd.d/proftpd b/doc/module-example/xinetd.d/proftpd
new file mode 100644
index 0000000..192cc17
--- /dev/null
+++ b/doc/module-example/xinetd.d/proftpd
@@ -0,0 +1,13 @@
+service ftp
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = /usr/sbin/proftpd
+ server_args =
+ per_source = 8
+ log_type = FILE /var/log/xinetd/proftpd
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+}
diff --git a/doc/module-example/xinetd.d/pure-ftpd b/doc/module-example/xinetd.d/pure-ftpd
new file mode 100644
index 0000000..4aed112
--- /dev/null
+++ b/doc/module-example/xinetd.d/pure-ftpd
@@ -0,0 +1,14 @@
+service ftp
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ disable = no
+ server = /usr/sbin/pure-ftpd
+ server_args = -b
+ per_source = 8
+ log_type = FILE /var/log/xinetd/pure-ftpd
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+}
diff --git a/etc/config b/etc/config
new file mode 100755
index 0000000..2ae6682
--- /dev/null
+++ b/etc/config
@@ -0,0 +1,133 @@
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11/bin
+
+export DIALOGRC=/etc/lunar/dialogrc
+
+ CONFIG_CACHE=/etc/lunar/local
+ LOCAL_CONFIG=/etc/lunar/local/config
+ DEPENDS_CONFIG=/etc/lunar/local/depends
+ LOCAL_EXCLUDED=/etc/lunar/local/excluded
+ MIRRORS=/etc/lunar/mirrors
+
+ LUNAR_MODULES="lunar theedge"
+ MOONBASE_TYPES="stable unstable"
+
+ BUILD_DIRECTORY=/usr/src
+ DOCUMENT_DIRECTORY=/usr/share/doc
+
+ DEFAULT_PREFIX=/usr
+
+ EXCLUDED=/var/lib/lunar/excluded
+ MOONBASE=/var/lib/lunar/moonbase
+ PROTECTED=/var/lib/lunar/protected
+ SOLO=/var/lib/lunar/solo
+ FUNCTIONS=/var/lib/lunar/functions
+ MENUS=/var/lib/lunar/menu
+ SUSTAINED=/var/lib/lunar/sustained
+ PLUGIN_DIR=/var/lib/lunar/plugins
+
+ SOUND_DIRECTORY=/var/lib/lunar/sound
+ SOUND_THEME=startrek
+
+ ACTIVITY_LOG=/var/log/lunar/activity
+ INSTALL_LOGS=/var/log/lunar/install
+ COMPILE_LOGS=/var/log/lunar/compile
+ MD5SUM_LOGS=/var/log/lunar/md5sum
+ INSTALL_QUEUE=/var/log/lunar/queue/install
+ REMOVE_QUEUE=/var/log/lunar/queue/remove
+
+ DEPENDS_STATUS=/var/state/lunar/depends
+ DEPENDS_STATUS_BACKUP=/var/state/lunar/depends.backup
+ DEPENDS_CACHE=/var/state/lunar/depends.cache
+ MODULE_STATUS=/var/state/lunar/packages
+ MODULE_STATUS_BACKUP=/var/state/lunar/packages.backup
+ MODULE_INDEX=/var/state/lunar/module.index
+
+ INSTALL_CACHE=/var/cache/lunar
+ SOURCE_CACHE=${SOURCE_CACHE:-/var/spool/lunar}
+
+# Override the following variables in /etc/lunar/local/config
+# Or by exporting them before installing or removing.
+
+ ARCHIVE=${ARCHIVE:-on}
+ AUTOFIX=${AUTOFIX:-on}
+ AUTOPRUNE=${AUTOPRUNE:-on}
+ MAIL_REPORTS=${MAIL_REPORTS:-off}
+ PRESERVE=${PRESERVE:-on}
+ REAP=${REAP:-on}
+ ADMIN=${ADMIN:-root}
+ SOUND=${SOUND:-off}
+ SUSTAIN=${SUSTAIN:-on}
+ VIEW_REPORTS=${VIEW_REPORTS:-off}
+ VOYEUR=${VOYEUR:-on}
+ GARBAGE=${GARBAGE:-on}
+ PROMPT_DELAY=${PROMPT_DELAY:-150}
+ PROBE_EXPIRED=${PROBE_EXPIRED:-on}
+ LUNAR_PRIORITY="+10"
+
+ LDD_CHECK=${LDD_CHECK:-on}
+ FIND_CHECK=${FIND_CHECK:-on}
+ MD5SUM_CHECK=${MD5SUM_CHECK:-on}
+ SYM_CHECK=${SYM_CHECK:-off}
+
+ GNU_URL=ftp://ftp.gnu.org/pub/gnu
+ KDE_URL=ftp://ftp.kde.org/pub/kde
+ GNOME_URL=ftp://ftp.gnome.org/pub/GNOME
+ KERNEL_URL=ftp://ftp.kernel.org
+ SFORGE_URL=http://downloads.sourceforge.net/sourceforge
+ XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86
+ XORG_URL=ftp://ftp.freedesktop.org/pub/xorg
+ LRESORT_URL=http://download.lunar-linux.org/lunar/cache
+
+ MOONBASE_URL[0]=http://lunar-linux.org/lunar/
+ MOONBASE_URL[1]=http://download.lunar-linux.org/lunar/
+
+ PATCH_URL=http://download.lunar-linux.org/lunar/patches/
+ MIRROR_URL=http://download.lunar-linux.org/lunar/mirrors/
+
+ TRACKED="/bin /boot /etc /lib /sbin /usr /var /opt/lunar"
+
+ TMPDIR=${TMPDIR:-/tmp}
+
+ DEFAULT="\e[0m"
+ BOLD="\e[1m"
+ BLACK="\e[30m"
+ RED="\e[31m"
+ GREEN="\e[32m"
+ YELLOW="\e[33m"
+ BLUE="\e[34m"
+ VIOLET="\e[35m"
+ CYAN="\e[36m"
+ WHITE="\e[37m"
+
+ MODULE_COLOR="${WHITE}${BOLD}\e[40m"
+ VERSION_COLOR="${WHITE}${BOLD}\e[40m"
+ QUERY_COLOR="${YELLOW}${BOLD}"
+ LRM_COLOR="${YELLOW}${BOLD}"
+ CHECK_COLOR="${CYAN}"
+ RESURRECT_COLOR="${GREEN}${BOLD}"
+ FILE_COLOR="${GREEN}${BOLD}"
+ SYMLINK_COLOR="${CYAN}${BOLD}"
+ PROBLEM_COLOR="${RED}${BOLD}"
+ MESSAGE_COLOR="${BLUE}${BOLD}"
+ MESSAGE_COLOR="${CYAN}"
+ DEFAULT_COLOR="${DEFAULT}"
+
+ TAB_ENTER_IFS=$'\t\n'
+ ENTER_IFS=$'\n'
+ STANDARD_IFS=$' \t\n'
+
+for FUNCTION in $FUNCTIONS/*.lunar ; do
+ . $FUNCTION
+done
+
+if [ -s "$LOCAL_CONFIG" ] ; then
+ . $LOCAL_CONFIG
+fi
+
+sound $SOUND
+color $COLOR
+
+for LUNAR_PLUGIN in $PLUGIN_DIR/*.plugin; do
+ . $LUNAR_PLUGIN
+done
+
diff --git a/etc/dialogrc b/etc/dialogrc
new file mode 100644
index 0000000..53ca506
--- /dev/null
+++ b/etc/dialogrc
@@ -0,0 +1,111 @@
+#
+# Run-time configuration file for dialog
+#
+# Automatically generated by "dialog --create-rc <file>"
+#
+#
+# Types of values:
+#
+# Number - <number>
+# String - "string"
+# Boolean - <ON|OFF>
+# Attribute - (foreground,background,highlight?)
+#
+
+
+# Shadow dialog boxes? This also turns on color.
+use_shadow = ON
+
+# Turn color support ON or OFF
+use_colors = ON
+
+# Screen color
+screen_color = (CYAN,BLUE,ON)
+
+# Shadow color
+shadow_color = (BLACK,BLACK,OFF)
+
+# Dialog box color
+dialog_color = (BLACK,WHITE,OFF)
+
+# Dialog box title color
+title_color = (BLUE,WHITE,ON)
+
+# Dialog box border color
+border_color = (BLACK,WHITE,OFF)
+
+# Active button color
+button_active_color = (WHITE,BLUE,ON)
+
+# Inactive button color
+button_inactive_color = (BLACK,WHITE,OFF)
+
+# Active button key color
+button_key_active_color = (WHITE,BLUE,ON)
+
+# Inactive button key color
+button_key_inactive_color = (RED,WHITE,OFF)
+
+# Active button label color
+button_label_active_color = (YELLOW,BLUE,ON)
+
+# Inactive button label color
+button_label_inactive_color = (BLACK,WHITE,ON)
+
+# Input box color
+inputbox_color = (BLACK,CYAN,OFF)
+
+# Input box border color
+inputbox_border_color = (WHITE,WHITE,OFF)
+
+# Search box color
+searchbox_color = (BLACK,CYAN,OFF)
+
+# Search box title color
+searchbox_title_color = (BLUE,WHITE,ON)
+
+# Search box border color
+searchbox_border_color = (WHITE,WHITE,OFF)
+
+# File position indicator color
+position_indicator_color = (BLUE,WHITE,ON)
+
+# Menu box color
+menubox_color = (WHITE,WHITE,OFF)
+
+# Menu box border color
+menubox_border_color = (WHITE,WHITE,OFF)
+
+# Item color
+item_color = (BLACK,WHITE,OFF)
+
+# Selected item color
+item_selected_color = (WHITE,BLUE,ON)
+
+# Tag color
+tag_color = (BLUE,WHITE,ON)
+
+# Selected tag color
+tag_selected_color = (YELLOW,BLUE,ON)
+
+# Tag key color
+tag_key_color = (YELLOW,WHITE,ON)
+
+# Selected tag key color
+tag_key_selected_color = (WHITE,BLUE,ON)
+
+# Check box color
+check_color = (BLACK,WHITE,OFF)
+
+# Selected check box color
+check_selected_color = (WHITE,BLUE,ON)
+
+# Up arrow color
+uarrow_color = (GREEN,WHITE,ON)
+
+# Down arrow color
+darrow_color = (GREEN,WHITE,ON)
+
+# Item help-text color
+itemhelp_color = (WHITE,BLACK,OFF)
+
diff --git a/etc/lunar/config b/etc/lunar/config
deleted file mode 100755
index 2ae6682..0000000
--- a/etc/lunar/config
+++ /dev/null
@@ -1,133 +0,0 @@
-export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11/bin
-
-export DIALOGRC=/etc/lunar/dialogrc
-
- CONFIG_CACHE=/etc/lunar/local
- LOCAL_CONFIG=/etc/lunar/local/config
- DEPENDS_CONFIG=/etc/lunar/local/depends
- LOCAL_EXCLUDED=/etc/lunar/local/excluded
- MIRRORS=/etc/lunar/mirrors
-
- LUNAR_MODULES="lunar theedge"
- MOONBASE_TYPES="stable unstable"
-
- BUILD_DIRECTORY=/usr/src
- DOCUMENT_DIRECTORY=/usr/share/doc
-
- DEFAULT_PREFIX=/usr
-
- EXCLUDED=/var/lib/lunar/excluded
- MOONBASE=/var/lib/lunar/moonbase
- PROTECTED=/var/lib/lunar/protected
- SOLO=/var/lib/lunar/solo
- FUNCTIONS=/var/lib/lunar/functions
- MENUS=/var/lib/lunar/menu
- SUSTAINED=/var/lib/lunar/sustained
- PLUGIN_DIR=/var/lib/lunar/plugins
-
- SOUND_DIRECTORY=/var/lib/lunar/sound
- SOUND_THEME=startrek
-
- ACTIVITY_LOG=/var/log/lunar/activity
- INSTALL_LOGS=/var/log/lunar/install
- COMPILE_LOGS=/var/log/lunar/compile
- MD5SUM_LOGS=/var/log/lunar/md5sum
- INSTALL_QUEUE=/var/log/lunar/queue/install
- REMOVE_QUEUE=/var/log/lunar/queue/remove
-
- DEPENDS_STATUS=/var/state/lunar/depends
- DEPENDS_STATUS_BACKUP=/var/state/lunar/depends.backup
- DEPENDS_CACHE=/var/state/lunar/depends.cache
- MODULE_STATUS=/var/state/lunar/packages
- MODULE_STATUS_BACKUP=/var/state/lunar/packages.backup
- MODULE_INDEX=/var/state/lunar/module.index
-
- INSTALL_CACHE=/var/cache/lunar
- SOURCE_CACHE=${SOURCE_CACHE:-/var/spool/lunar}
-
-# Override the following variables in /etc/lunar/local/config
-# Or by exporting them before installing or removing.
-
- ARCHIVE=${ARCHIVE:-on}
- AUTOFIX=${AUTOFIX:-on}
- AUTOPRUNE=${AUTOPRUNE:-on}
- MAIL_REPORTS=${MAIL_REPORTS:-off}
- PRESERVE=${PRESERVE:-on}
- REAP=${REAP:-on}
- ADMIN=${ADMIN:-root}
- SOUND=${SOUND:-off}
- SUSTAIN=${SUSTAIN:-on}
- VIEW_REPORTS=${VIEW_REPORTS:-off}
- VOYEUR=${VOYEUR:-on}
- GARBAGE=${GARBAGE:-on}
- PROMPT_DELAY=${PROMPT_DELAY:-150}
- PROBE_EXPIRED=${PROBE_EXPIRED:-on}
- LUNAR_PRIORITY="+10"
-
- LDD_CHECK=${LDD_CHECK:-on}
- FIND_CHECK=${FIND_CHECK:-on}
- MD5SUM_CHECK=${MD5SUM_CHECK:-on}
- SYM_CHECK=${SYM_CHECK:-off}
-
- GNU_URL=ftp://ftp.gnu.org/pub/gnu
- KDE_URL=ftp://ftp.kde.org/pub/kde
- GNOME_URL=ftp://ftp.gnome.org/pub/GNOME
- KERNEL_URL=ftp://ftp.kernel.org
- SFORGE_URL=http://downloads.sourceforge.net/sourceforge
- XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86
- XORG_URL=ftp://ftp.freedesktop.org/pub/xorg
- LRESORT_URL=http://download.lunar-linux.org/lunar/cache
-
- MOONBASE_URL[0]=http://lunar-linux.org/lunar/
- MOONBASE_URL[1]=http://download.lunar-linux.org/lunar/
-
- PATCH_URL=http://download.lunar-linux.org/lunar/patches/
- MIRROR_URL=http://download.lunar-linux.org/lunar/mirrors/
-
- TRACKED="/bin /boot /etc /lib /sbin /usr /var /opt/lunar"
-
- TMPDIR=${TMPDIR:-/tmp}
-
- DEFAULT="\e[0m"
- BOLD="\e[1m"
- BLACK="\e[30m"
- RED="\e[31m"
- GREEN="\e[32m"
- YELLOW="\e[33m"
- BLUE="\e[34m"
- VIOLET="\e[35m"
- CYAN="\e[36m"
- WHITE="\e[37m"
-
- MODULE_COLOR="${WHITE}${BOLD}\e[40m"
- VERSION_COLOR="${WHITE}${BOLD}\e[40m"
- QUERY_COLOR="${YELLOW}${BOLD}"
- LRM_COLOR="${YELLOW}${BOLD}"
- CHECK_COLOR="${CYAN}"
- RESURRECT_COLOR="${GREEN}${BOLD}"
- FILE_COLOR="${GREEN}${BOLD}"
- SYMLINK_COLOR="${CYAN}${BOLD}"
- PROBLEM_COLOR="${RED}${BOLD}"
- MESSAGE_COLOR="${BLUE}${BOLD}"
- MESSAGE_COLOR="${CYAN}"
- DEFAULT_COLOR="${DEFAULT}"
-
- TAB_ENTER_IFS=$'\t\n'
- ENTER_IFS=$'\n'
- STANDARD_IFS=$' \t\n'
-
-for FUNCTION in $FUNCTIONS/*.lunar ; do
- . $FUNCTION
-done
-
-if [ -s "$LOCAL_CONFIG" ] ; then
- . $LOCAL_CONFIG
-fi
-
-sound $SOUND
-color $COLOR
-
-for LUNAR_PLUGIN in $PLUGIN_DIR/*.plugin; do
- . $LUNAR_PLUGIN
-done
-
diff --git a/etc/lunar/dialogrc b/etc/lunar/dialogrc
deleted file mode 100644
index 53ca506..0000000
--- a/etc/lunar/dialogrc
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# Run-time configuration file for dialog
-#
-# Automatically generated by "dialog --create-rc <file>"
-#
-#
-# Types of values:
-#
-# Number - <number>
-# String - "string"
-# Boolean - <ON|OFF>
-# Attribute - (foreground,background,highlight?)
-#
-
-
-# Shadow dialog boxes? This also turns on color.
-use_shadow = ON
-
-# Turn color support ON or OFF
-use_colors = ON
-
-# Screen color
-screen_color = (CYAN,BLUE,ON)
-
-# Shadow color
-shadow_color = (BLACK,BLACK,OFF)
-
-# Dialog box color
-dialog_color = (BLACK,WHITE,OFF)
-
-# Dialog box title color
-title_color = (BLUE,WHITE,ON)
-
-# Dialog box border color
-border_color = (BLACK,WHITE,OFF)
-
-# Active button color
-button_active_color = (WHITE,BLUE,ON)
-
-# Inactive button color
-button_inactive_color = (BLACK,WHITE,OFF)
-
-# Active button key color
-button_key_active_color = (WHITE,BLUE,ON)
-
-# Inactive button key color
-button_key_inactive_color = (RED,WHITE,OFF)
-
-# Active button label color
-button_label_active_color = (YELLOW,BLUE,ON)
-
-# Inactive button label color
-button_label_inactive_color = (BLACK,WHITE,ON)
-
-# Input box color
-inputbox_color = (BLACK,CYAN,OFF)
-
-# Input box border color
-inputbox_border_color = (WHITE,WHITE,OFF)
-
-# Search box color
-searchbox_color = (BLACK,CYAN,OFF)
-
-# Search box title color
-searchbox_title_color = (BLUE,WHITE,ON)
-
-# Search box border color
-searchbox_border_color = (WHITE,WHITE,OFF)
-
-# File position indicator color
-position_indicator_color = (BLUE,WHITE,ON)
-
-# Menu box color
-menubox_color = (WHITE,WHITE,OFF)
-
-# Menu box border color
-menubox_border_color = (WHITE,WHITE,OFF)
-
-# Item color
-item_color = (BLACK,WHITE,OFF)
-
-# Selected item color
-item_selected_color = (WHITE,BLUE,ON)
-
-# Tag color
-tag_color = (BLUE,WHITE,ON)
-
-# Selected tag color
-tag_selected_color = (YELLOW,BLUE,ON)
-
-# Tag key color
-tag_key_color = (YELLOW,WHITE,ON)
-
-# Selected tag key color
-tag_key_selected_color = (WHITE,BLUE,ON)
-
-# Check box color
-check_color = (BLACK,WHITE,OFF)
-
-# Selected check box color
-check_selected_color = (WHITE,BLUE,ON)
-
-# Up arrow color
-uarrow_color = (GREEN,WHITE,ON)
-
-# Down arrow color
-darrow_color = (GREEN,WHITE,ON)
-
-# Item help-text color
-itemhelp_color = (WHITE,BLACK,OFF)
-
diff --git a/etc/lunar/local/README b/etc/lunar/local/README
deleted file mode 100644
index 468e11e..0000000
--- a/etc/lunar/local/README
+++ /dev/null
@@ -1,8 +0,0 @@
-"/etc/lunar/local" is the cache for locally stored
-configuration files.
-
-"/etc/lunar/local/config" contains the variables that
-you wish to override in /etc/lunar/config.
-
-Additionally, "/etc/lunar/local" stores your config for
-Linus Torvalds' Linux Kernel, net-tools and XFree86/XOrg.
diff --git a/etc/lunar/local/depends/README b/etc/lunar/local/depends/README
deleted file mode 100644
index 26f00d2..0000000
--- a/etc/lunar/local/depends/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This directory holds the previously selected dependency
-configurations for modules.
diff --git a/etc/lunar/mirrors/GNOME b/etc/lunar/mirrors/GNOME
deleted file mode 100644
index 008468b..0000000
--- a/etc/lunar/mirrors/GNOME
+++ /dev/null
@@ -1,18 +0,0 @@
-Custom Mirror Custom
-Master Site FTP ftp://ftp.gnome.org/pub/GNOME/
-Master Site HTTP http://ftp.gnome.org/pub/GNOME/
-Australia http://mirror.aarnet.edu.au/pub/GNOME/
-Australia http://planetmirror.com/pub/gnome/
-Belgium http://ftp.belnet.be/mirror/ftp.gnome.org/
-France ftp://fr.rpmfind.net/linux/gnome.org/
-France ftp://fr2.rpmfind.net/linux/gnome.org/
-Italy http://ftp.unina.it/pub/linux/GNOME/
-Norway ftp://ftp.no.gnome.org/pub/GNOME/
-Poland ftp://sunsite.icm.edu.pl/pub/Linux/GNOME/
-Spain ftp://ftp.dit.upm.es/pub/GNOME/
-Sweden ftp://ftp.dataplus.se/pub/GNOME/
-Sweden ftp://ftp.acc.umu.se/pub/GNOME/
-United Kingdom http://ftp.linux.org.uk/mirrors/ftp.gnome.org/
-US ftp://ftp.cse.buffalo.edu/pub/Gnome/
-US or Canada http://archive.progeny.com/GNOME/
-US or Canada http://ftp.rpmfind.net/linux/gnome.org/
diff --git a/etc/lunar/mirrors/GNU b/etc/lunar/mirrors/GNU
deleted file mode 100644
index 62be5a3..0000000
--- a/etc/lunar/mirrors/GNU
+++ /dev/null
@@ -1,107 +0,0 @@
-"Master Site" ftp://ftp.gnu.org/pub/gnu/
-"Custom Mirror" Custom
-California ftp://gatekeeper.dec.com/pub/GNU/
-California ftp://ftp.keystealth.org/pub/gnu/
-Illinois ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/
-Indiana ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/
-Kentucky ftp://gnu.ms.uky.edu/pub/mirrors/gnu/
-Maryland ftp://ftp.digex.net/pub/gnu/
-Massachusetts ftp://aeneas.mit.edu/pub/gnu/
-Missouri ftp://wuarchive.wustl.edu/systems/gnu/
-New York ftp://ftp.cs.columbia.edu/archives/gnu/prep/
-New York ftp://ftp.stealth.net/pub/mirrors/ftp.gnu.org/
-North Carolina http://metalab.unc.edu/pub/gnu/
-Pennsylvania ftp://boron.club.cc.cmu.edu/gnu/
-Tennessee ftp://sunsite.utk.edu/pub/gnu/ftp/
-Tennessee ftp://thales.memphis.edu/pub/gnu/
-Wisconsin ftp://ftp.twtelecom.net/pub/GNU/
-South Africa ftp://ftp.sun.ac.za/gnu/
-Brazil ftp://ftp.unicamp.br/pub/gnu/
-Brazil ftp://master.softaplic.com.br/pub/gnu/
-Brazil ftp://ftp.matrix.com.br/pub/gnu/
-Canada ftp://ftp.cs.ubc.ca/mirror2/gnu/
-Chile ftp://ftp.inf.utfsm.cl/pub/gnu/
-Costa Rica ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/
-Mexico ftp://www.gnu.unam.mx/pub/gnu/software/
-Mexico ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/
-Australia ftp://ftp.progsoc.uts.edu.au/pub/gnu/
-Australia ftp://mirror.aarnet.edu.au/pub/gnu/
-Australia ftp://gnu.mirror.pacific.net.au/gnu/
-China ftp://ftp.sea9.com/pub/gnu/
-China ftp://ftp.cs.cuhk.edu.hk/pub/gnu/
-China ftp://sunsite.ust.hk/pub/gnu/
-China ftp://ftp.shellhung.org/pub/gnu/
-India ftp://ftp.kernel.org.in/gnu.org/ftp/
-Indonesia ftp://sapi.vlsm.org/gnu/
-Indonesia http://sapi.vlsm.org/gnu/
-Japan ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep/
-Japan ftp://core.ring.gr.jp/pub/GNU/
-Japan ftp://ftp.ring.gr.jp/pub/GNU/
-Japan ftp://mirrors.hbi.co.jp/gnu/
-Japan ftp://ftp.ayamura.org/pub/gnu/
-Korea ftp://ftpmirror.hanyang.ac.kr/GNU/
-Korea ftp://ftp.linux.sarang.net/mirror/gnu/gnu/
-Korea ftp://ftp.xgate.co.kr/pub/mirror/gnu/
-Saudi Arabia ftp://ftp.isu.net.sa/pub/mirrors/ftp.gnu.org/gnu/
-Taiwan ftp://coda.nctu.edu.tw/UNIX/gnu/
-Taiwan ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/
-Taiwan ftp://ftp.nctu.edu.tw/UNIX/gnu/
-Austria ftp://ftp.gnu.vbs.at/
-Austria ftp://ftp.univie.ac.at/packages/gnu/
-Austria ftp://gd.tuwien.ac.at/gnu/gnusrc/
-Austria http://gd.tuwien.ac.at/gnu/gnusrc/
-Czeck Republic ftp://ftp.fi.muni.cz/pub/gnu/
-Denmark ftp://ftp.denet.dk/mirrors/ftp.gnu.org/pub/gnu/
-Denmark ftp://ftp.dkuug.dk/pub/gnu/
-Denmark ftp://sunsite.dk/mirrors/gnu/
-Denmark http://mirrors.sunsite.dk/gnu/
-Finland ftp://ftp.funet.fi/pub/gnu/prep/
-France ftp://ftp.irisa.fr/pub/gnu/
-France ftp://ftp.medasys-digital-systems.fr/pub/gnu/
-Germany ftp://ftp.cs.tu-berlin.de/pub/gnu/
-Germany ftp://ftp.informatik.rwth-aachen.de/pub/gnu/
-Germany ftp://ftp.leo.org/pub/comp/os/unix/gnu/
-Germany ftp://ftp.de.uu.net/pub/gnu/
-Germany ftp://ftp.freenet.de/pub/ftp.gnu.org/gnu/
-Germany ftp://ftp.cs.uni-bonn.de/pub/gnu/
-Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
-Greece ftp://tp.forthnet.gr/pub/gnu/
-Greece ftp://ftp.ntua.gr/pub/gnu/
-Greece ftp://ftp.duth.gr/pub/gnu/
-Greece ftp://ftp.aua.gr/pub/mirrors/GNU/
-Greece ftp://ftp.physics.auth.gr/pub/gnu/
-Ireland ftp://ftp.esat.net/pub/gnu/
-Italy ftp://ftp.oasi.gpa.it/pub/gnu/
-Netherlands ftp://ftp.nluug.nl/pub/gnu/
-Netherlands ftp://ftp.mirror.nl/pub/mirror/gnu/
-Netherlands ftp://ftp.nl.uu.net/pub/gnu/
-Norway ftp://ftp.ntnu.no/pub/gnu/
-Norway ftp://ftp.gnu.no/
-Norway ftp://sunsite.uio.no/pub/gnu/
-Poland ftp://ftp.task.gda.pl/pub/gnu/
-Poland ftp://sunsite.icm.edu.pl/pub/gnu/
-Portugal ftp://ftp.ci.uminho.pt/pub/mirrors/gnu/
-Portugal http://ciumix.ci.uminho.pt/mirrors/gnu/
-Portugal ftp://ftp.ist.ut1.pt/pub/gnu/
-Portugal ftp://mirrors.netvisao.pt/gnu/
-Romania ftp://archive.logicnet.ro/mirrors/ftp.gnu.org/gnu/
-Romania ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/
-Russia ftp://ftp.chg.ru/pub/gnu/
-Slovenia ftp://ftp.arnes.si/gnu/
-Spain ftp://ftp.etsimo.uniovi.es/pub/gnu/
-Spain ftp://ftp.rediris.es/pub/gnu/
-Sweden ftp://ftp.isy.liu.se/pub/gnu/
-Sweden ftp://ftp.staken.kth.se/pub/gnu/
-Sweden ftp://ftp.luth.se/pub/unix/gnu/
-Sweden ftp://ftp.sunet.se/pub/gnu/
-Sweden ftp://ftp.ch1.chalmers.se/pub/gnu/
-Switzerland ftp://ftp.eunet.ch/mirrors4/gnu/
-Switzerland ftp://sunsite.cnlab-switch.ch/mirrors/gnu/
-Turkey ftp://ftp.baskent.edu.tr/gnu/ftp/
-Turkey ftp://ftp.ulak.net.tr/pub/gnu/
-United Kingdom ftp://ftp.mcc.ac.uk/pub/gnu/
-United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/pub/gnu/
-United Kingdom ftp://ftp.warwick.ac.uk/pub/gnu/
-United Kingdom ftp://sunsite.org.uk/gnu/
-United Kingdom ftp://ftp.hands.com/ftp.gnu.org/
diff --git a/etc/lunar/mirrors/KDE b/etc/lunar/mirrors/KDE
deleted file mode 100644
index e554980..0000000
--- a/etc/lunar/mirrors/KDE
+++ /dev/null
@@ -1,82 +0,0 @@
-"Master Site" ftp://ftp.kde.org/pub/kde/
-"Custom Mirror" Custom
-USA ftp://download.sourceforge.net/pub/mirrors/kde/
-USA http://download.sourceforge.net/mirrors/kde/
-USA ftp://kde.us.themoes.org/pub/kde/
-USA http://kde.us.themos.org/pub/kde/
-USA ftp://ftp.us.kde.org/pub/kde/
-USA http://ftp.us.kde.org/pub/kde/
-USA ftp://csociety-ftp.ecn.purdue.edu/pub/kde/
-USA http://csociety-ftp.ecn.purdue.edu/pub/kde/
-United Kingdom ftp://kde.uk.themoes.org/pub/kde/
-United Kingdom http://kde.uk.themoes.org/pub/kde/
-United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
-United Kingdom http://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
-Australia ftp://ftp.au.kde.org/pub/kde/
-Australia http://ftp.au.kde.org/pub/kde/
-Austria ftp://ftp.at.kde.org/hci/kde/
-Austria http://ftp.at.kde.org/hci/kde/
-Czech Republic ftp://ftp.fi.muni.cz/pub/kde/
-Czech Republic http://ftp.fi.muni.cz/pub/kde/
-Czech Republic ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
-Czech Republic http://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
-Germany ftp://ftp.de.kde.org/pub/kde/
-Germany http://ftp.de.kde.org/pub/kde/
-Germany ftp://ftp.fh-heilbronn.de/pub/mirrors/kde/
-Germany ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/
-Germany ftp://ftp.gwdg.de/pub/x11/kde/
-Germany http://ftp.gwdg.de/pub/x11/kde/
-Germany ftp://ftp.tu-chemnitz.de/pub/X11/kde/
-Germany http://cgi.tu-chemnitz.de/ftp-home/pub/X11/kde/
-Germany ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde/
-Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
-Germany ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde/
-Netherlands ftp://ftp.eu.uu.net/pub/kde/
-Poland ftp://ftp.tuniv.szczecin.pl/pub/kde/
-Poland htp://ftp.tuniv.szczecin.pl/pub/kde/
-Poland ftp://ftp.task.gda.pl/pub/unix/kde/
-Poland http://ftp.task.gda.pl/pub/unix/kde/
-Poland ftp://sunsite.icm.edu.pl/pub/unix/kde/
-Switzerland ftp://sunsite.cnlab-switch.ch/mirror/kde/
-Denmark ftp://sunsite.dk/mirrors/kde/
-Denmark http://mirrors.sunsite.dk/kde/
-Sweden ftp://ftp.se.kde.org/pub/kde/
-Sweden http://ftp.se.kde.org/pub/kde/
-Sweden ftp://ftp.dataplus.se/pub/linux/kde/
-Greece ftp://ftp.duth.gr/pub/kde/
-Greece http://ftp.duth.gr/pub/kde/
-Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/
-Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/pub/kde/
-Belgium ftp://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
-Belgium http://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
-Belgium ftp://ftp.easynet.be/kde/
-Belgium http://ftp.easynet.be/kde/
-France ftp://ftp.lip6.fr/pub/X11/kde/
-France http:://www-ftp.lip6.fr/pub/X11/kde/
-Ireland ftp://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
-Ireland http://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
-Portugal ftp://ftp.dei.uc.pt/pub/kde/
-Portugal http://ftp.dei.uc.pt/pub/kde/
-Portugal ftp://ftp.eq.uc.pt/pub/software/unix/KDE/
-Portugal http://ftp.eq.uc.pt/software/unix/KDE/
-United Kingdom ftp://ftp.net.lut.ac.uk/kde/
-United Kingdom http://ftp.net.lut.ac.uk/kde/
-United Kingdom ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.kde.org/pub/kde/
-Bulgaria ftp://ftp.digsys.bg/pub/kde/
-Romania ftp://ftp.lbi.ro/pub/Linux/KDE/
-Romania ftp://ftp.tuiasi.ro/pub/mirrors/ftp.kde.org/pub/kde/
-Russia ftp://ftp.chg.ru/pub/X11/kde/
-Hong Kong ftp://ftp.dll.com.hk/pub/mirrors/KDE/
-Japan ftp://mirror.nucba.ac.jp/mirror/KDE/
-Japan http://mirror.nucba.ac.jp/mirror/KDE/
-Republic of Korea ftp://linux.sarang.net/mirror/desktop/kde/
-Singapore ftp://kde.lugs.org.sg/pub/kde.org/
-South Africa ftp://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
-South Africa http://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
-USA ftp://ftp.rutgers.edu/pub/kde/
-USA http://ftp.rutgers.edu/pub/kde/
-USA ftp://mirror.chpc.utah.edu/pub/kde/
-Brazil ftp://ftp.matrix.com.br/pub/kde/
-Brazil http://ftp.matrix.com.br/pub/kde/
-Costa Rica ftp://ftp.ucr.ac.cr/pub/Unix/linux/kde/
diff --git a/etc/lunar/mirrors/KERNEL b/etc/lunar/mirrors/KERNEL
deleted file mode 100644
index a939dbd..0000000
--- a/etc/lunar/mirrors/KERNEL
+++ /dev/null
@@ -1,482 +0,0 @@
-"Master Site" ftp://ftp.kernel.org/
-"Custom Mirror" Custom
-Albania http://www.al.kernel.org/
-Albania ftp://ftp.al.kernel.org/
-Algeria http://www.dz.kernel.org/
-Algeria ftp://ftp.dz.kernel.org/
-American Samoa http://www.as.kernel.org/
-American Samoa ftp://ftp.as.kernel.org/
-Andorra http://www.ad.kernel.org/
-Andorra ftp://ftp.ad.kernel.org/
-Angola http://www.ai.kernel.org/
-Angola ftp://ftp.ai.kernel.org/
-Anguilla http://www.ai.kernel.org/
-Anguilla ftp://ftp.ai.kernel.org/
-Antarctica http://www.aq.kernel.org/
-Antarctica ftp://ftp.aq.kernel.org/
-Antigua and Barbuda http://www.ag.kernel.org/
-Antigua and Barbuda ftp://ftp.ag.kernel.org/
-Argentina http://www.ag.kernel.org/
-Argentina ftp://ftp.ag.kernel.org/
-Armenia http://www.am.kernel.org/
-Armenia ftp://ftp.am.kernel.org/
-Aruba http://www.aw.kernel.org/
-Aruba ftp://ftp.aw.kernel.org/
-Ascension Island http://www.ac.kernel.org/
-Ascension Island ftp://ftp.ac.kernel.org/
-Australia http://www.au.kernel.org/
-Australia ftp://ftp.au.kernel.org/
-Austria http://www.at.kernel.org/
-Austria ftp://ftp.at.kernel.org/
-Azerbaijan http://www.az.kernel.org/
-Azerbaijan ftp://ftp.az.kernel.org/
-Aland http://www.av.kernel.org/
-Aland ftp://ftp.av.kernel.org/
-Bahamas http://www.bs.kernel.org/
-Bahamas ftp://ftp.bs.kernel.org/
-Bahrain http://www.bh.kernel.org/
-Bahrain ftp://ftp.bh.kernel.org/
-Bangladesh http://www.bd.kernel.org/
-Bangladesh ftp://ftp.bd.kernel.org/
-Barbados http://www.bb.kernel.org/
-Barbados ftp://ftp.bb.kernel.org/
-Belarus http://www.by.kernel.org/
-Belarus ftp://ftp.by.kernel.org/
-Belgium http://www.be.kernel.org/
-Belgium ftp://ftp.be.kernel.org/
-Belize http://www.bz.kernel.org/
-Belize ftp://ftp.bz.kernel.org/
-Benin http://www.bj.kernel.org/
-Benin ftp://ftp.bj.kernel.org/
-Bermuda http://www.vm.kernel.org/
-Bermuda ftp://ftp.bm.kernel.org/
-Bhuta'n http://www.bt.kernel.org/
-Bhuta'n ftp://ftp.bt.kernel.org/
-Bolivia http://www.bo.kernel.org/
-Bolivia ftp://ftp.bo.kernel.org/
-Bosnia and Herzegowina http://www.ba.kernel.org/
-Bosnia and Herzegowina ftp://ftp.ba.kernel.org/
-Botswana http://www.bw.kernel.org/
-Botswana ftp://ftp.bw.kernel.org/
-Bouvet Island http://www.bv.kernel.org/
-Bouvet Island ftp://ftp.bv.kernel.org/
-Brazil http://www.br.kernel.org/
-Brazil ftp://ftp.br.kernel.org/
-British Indian Ocean Territory http://www.io.kernel.org/
-British Indian Ocean Territory ftp://ftp.io.kernel.org/
-Brunei Darussalam http://www.bn.kernel.org/
-Brunei Darussalam ftp://ftp.bn.kernel.org/
-Bulgaria http://www.bg.kernel.org/
-Bulgaria ftp://ftp.bg.kernel.org/
-Burkina Faso http://www.bf.kernel.org/
-Burkina Faso ftp://ftp.bf.kernel.org/
-Burundi http://www.bi.kernel.org/
-Burundi ftp://ftp.bi.kernel.org/
-Cambodia http://www.kh.kernel.org/
-Cambodia ftp://ftp.kh.kernel.org/
-Cameroon http://www.cm.kernel.org/
-Cameroon ftp://ftp.cm.kernel.org/
-Canada http://www.ca.kernel.org/
-Canada ftp://ftp.ca.kernel.org/
-Canary Islands http://www.ic.kernel.org/
-Canary Islands ftp://ftp.ic.kernel.org/
-Cape Verde http://www.cv.kernel.org/
-Cape Verde ftp://ftp.cv.kernel.org/
-Cayman Islands http://www.ky.kernel.org/
-Cayman Islands ftp://ftp.ky.kernel.org/
-Central African Republic http://www.cf.kernel.org/
-Central African Republic ftp://ftp.cf.kernel.org/
-Ceuta, Melilla http://www.ea.kernel.org/
-Ceuta, Melilla ftp://ftp.ea.kernel.org/
-Chad http://www.td.kernel.org/
-Chad ftp://ftp.td.kernel.org/
-Chile http://www.cl.kernel.org/
-Chile ftp://ftp.cl.kernel.org/
-China http://www.cn.kernel.org/
-China ftp://ftp.cn.kernel.org/
-Christmas Island http://www.cx.kernel.org/
-Christmas Island ftp://ftp.cx.kernel.org/
-Clipperton Island http://www.cp.kernel.org/
-Clipperton Island ftp://ftp.cp.kernel.org/
-Cocos (Keeling) Islands http://www.cc.kernel.org/
-Cocos (Keeling) Islands ftp://ftp.cc.kernel.org/
-Colombia http://www.co.kernel.org/
-Colombia ftp://ftp.co.kernel.org/
-Comoros http://www.km.kernel.org/
-Comoros ftp://ftp.km.kernel.org/
-Congo, Republic of http://www.cg.kernel.org/
-Congo, Republic of ftp://ftp.cg.kernel.org/
-Congo, Democratic Republic of The http://www.cd.kernel.org/
-Congo, Democratic Republic of The ftp://ftp.cd.kernel.org/
-Cook Islands http://www.ck.kernel.org/
-Cook Islands ftp://ftp.ck.kernel.org/
-Costa Rica http://www.cr.kernel.org/
-Costa Rica ftp://ftp.cr.kernel.org/
-Co^te D'Ivoire http://www.ci.kernel.org/
-Co^te D'Ivoire ftp://ftp.ci.kernel.org/
-Croatia http://www.hr.kernel.org/
-Croatia ftp://ftp.hr.kernel.org/
-Cyprus http://www.cy.kernel.org/
-Cyprus ftp://ftp.cy.kernel.org/
-Czech Republic http://www.cz.kernel.org/
-Czech Republic ftp://ftp.cz.kernel.org/
-Denmark http://www.dk.kernel.org/
-Denmark ftp://ftp.dk.kernel.org/
-Diego Garcia http://www.dg.kernel.org/
-Diego Garcia ftp://ftp.dg.kernel.org/
-Djibouti http://www.dj.kernel.org/
-Djibouti ftp://ftp.dj.kernel.org/
-Dominica http://www.dm.kernel.org/
-Dominica ftp://ftp.dm.kernel.org/
-Dominican Republic http://www.do.kernel.org/
-Dominican Republic ftp://ftp.do.kernel.org/
-East Timor http://www.tp.kernel.org/
-East Timor ftp://ftp.tp.kernel.org/
-Ecuador http://www.ec.kernel.org/
-Ecuador ftp://ftp.ec.kernel.org/
-Egypt http://www.eg.kernel.org/
-Egypt ftp://ftp.eg.kernel.org/
-El Salvador http://www.sv.kernel.org/
-El Salvador ftp://ftp.sv.kernel.org/
-Equatorial Guinea http://www.gq.kernel.org/
-Equatorial Guinea ftp://ftp.gq.kernel.org/
-Eritrea http://www.er.kernel.org/
-Eritrea ftp://ftp.er.kernel.org/
-Estonia http://www.ee.kernel.org/
-Estonia ftp://ftp.ee.kernel.org/
-Ethiopia http://www.et.kernel.org/
-Ethiopia ftp://ftp.et.kernel.org/
-Falkland Islands (Malvinas) http://www.fk.kernel.org/
-Falkland Islands (Malvinas) ftp://ftp.fk.kernel.org/
-Faroe Islands http://www.fo.kernel.org/
-Faroe Islands ftp://ftp.fo.kernel.org/
-Fiji http://www.fj.kernel.org/
-Fiji ftp://ftp.fj.kernel.org/
-Finland http://www.fi.kernel.org/
-Finland ftp://ftp.fi.kernel.org/
-France http://www.fr.kernel.org/
-France ftp://ftp.fr.kernel.org/
-French Guiana http://www.gf.kernel.org/
-French Guiana ftp://ftp.gf.kernel.org/
-French Polynesia http://www.pf.kernel.org/
-French Polynesia ftp://ftp.pf.kernel.org/
-French Southern Territories http://www.tf.kernel.org/
-French Southern Territories ftp://ftp.tf.kernel.org/
-Gabon http://www.ga.kernel.org/
-Gabon ftp://ftp.ga.kernel.org/
-Gambia http://www.gm.kernel.org/
-Gambia ftp://ftp.gm.kernel.org/
-Georgia http://www.ge.kernel.org/
-Georgia ftp://ftp.ge.kernel.org/
-Germany http://www.de.kernel.org/
-Germany ftp://ftp.de.kernel.org/
-Ghana http://www.gh.kernel.org/
-Ghana ftp://ftp.gh.kernel.org/
-Gibraltar http://www.gi.kernel.org/
-Gibraltar ftp://ftp.gi.kernel.org/
-Greece http://www.gr.kernel.org/
-Greece ftp://ftp.gr.kernel.org/
-Greenland http://www.gl.kernel.org/
-Greenland ftp://ftp.gl.kernel.org/
-Grenada http://www.gd.kernel.org/
-Grenada ftp://ftp.gd.kernel.org/
-Guadeloupe http://www.gp.kernel.org/
-Guadeloupe ftp://ftp.gp.kernel.org/
-Guam http://www.gu.kernel.org/
-Guam ftp://ftp.gu.kernel.org/
-Guatemala http://www.gt.kernel.org/
-Guatemala ftp://ftp.gt.kernel.org/
-Guernsey http://www.gg.kernel.org/
-Guernsey ftp://ftp.gg.kernel.org/
-Guinea http://www.gn.kernel.org/
-Guinea ftp://ftp.gn.kernel.org/
-Guinea-Bissau http://www.gw.kernel.org/
-Guinea-Bissau ftp://ftp.gw.kernel.org/
-Guyana http://www.gy.kernel.org/
-Guyana ftp://ftp.gy.kernel.org/
-Haiti http://www.ht.kernel.org/
-Haiti ftp://ftp.ht.kernel.org/
-Heard and Mc Donald Islands http://www.hm.kernel.org/
-Heard and Mc Donald Islands ftp://ftp.hm.kernel.org/
-Honduras http://www.hn.kernel.org/
-Honduras ftp://ftp.hn.kernel.org/
-Hong Kong http://www.hk.kernel.org/
-Hong Kong ftp://ftp.hk.kernel.org/
-Hungary http://www.hu.kernel.org/
-Hungary ftp://ftp.hu.kernel.org/
-Iceland http://www.is.kernel.org/
-Iceland ftp://ftp.is.kernel.org/
-India http://www.in.kernel.org/
-India ftp://ftp.in.kernel.org/
-Indonesia http://www.id.kernel.org/
-Indonesia ftp://ftp.id.kernel.org/
-Ireland http://www.ie.kernel.org/
-Ireland ftp://ftp.ie.kernel.org/
-Isle of Man http://www.im.kernel.org/
-Isle of Man ftp://ftp.im.kernel.org/
-Israel http://www.il.kernel.org/
-Israel ftp://ftp.il.kernel.org/
-Italy http://www.it.kernel.org/
-Italy ftp://ftp.it.kernel.org/
-Jamaica http://www.jm.kernel.org/
-Jamaica ftp://ftp.jm.kernel.org/
-Japan http://www.jp.kernel.org/
-Japan ftp://ftp.jp.kernel.org/
-Jersey http://www.je.kernel.org/
-Jersey ftp://ftp.je.kernel.org/
-Jordan http://www.jo.kernel.org/
-Jordan ftp://ftp.jo.kernel.org/
-Kazakhstan http://www.kz.kernel.org/
-Kazakhstan ftp://ftp.kz.kernel.org/
-Kenya http://www.ke.kernel.org/
-Kenya ftp://ftp.ke.kernel.org/
-Kiribati http://www.ki.kernel.org/
-Kiribati ftp://ftp.ki.kernel.org/
-Korea, South http://www.kr.kernel.org/
-Korea, South ftp://ftp.kr.kernel.org/
-Kuwait http://www.kw.kernel.org/
-Kuwait ftp://ftp.kw.kernel.org/
-Kyrgyzstan http://www.kg.kernel.org/
-Kyrgyzstan ftp://ftp.kg.kernel.org/
-Laos http://www.la.kernel.org/
-Laos ftp://ftp.la.kernel.org/
-Latvia http://www.lv.kernel.org/
-Latvia ftp://ftp.lv.kernel.org/
-Lebanon http://www.lb.kernel.org/
-Lebanon ftp://ftp.lb.kernel.org/
-Lesotho http://www.ls.kernel.org/
-Lesotho ftp://ftp.ls.kernel.org/
-Liberia http://www.lr.kernel.org/
-Liberia ftp://ftp.lr.kernel.org/
-Liechtenstein http://www.li.kernel.org/
-Liechtenstein ftp://ftp.li.kernel.org/
-Lithuania http://www.lt.kernel.org/
-Lithuania ftp://ftp.lt.kernel.org/
-Luxembourg http://www.lu.kernel.org/
-Luxembourg ftp://ftp.lu.kernel.org/
-Macau http://www.mo.kernel.org/
-Macau ftp://ftp.mo.kernel.org/
-Macedonia http://www.mk.kernel.org/
-Macedonia ftp://ftp.mk.kernel.org/
-Madagascar http://www.mg.kernel.org/
-Madagascar ftp://ftp.mg.kernel.org/
-Malawi http://www.mw.kernel.org/
-Malawi ftp://ftp.mw.kernel.org/
-Malaysia http://www.my.kernel.org/
-Malaysia ftp://ftp.my.kernel.org/
-Maldives http://www.mv.kernel.org/
-Maldives ftp://ftp.mv.kernel.org/
-Mali http://www.ml.kernel.org/
-Mali ftp://ftp.ml.kernel.org/
-Malta http://www.mt.kernel.org/
-Malta ftp://ftp.mt.kernel.org/
-Marshall Islands http://www.mh.kernel.org/
-Marshall Islands ftp://ftp.mh.kernel.org/
-Martinique http://www.mq.kernel.org/
-Martinique ftp://ftp.mq.kernel.org/
-Mauritania http://www.mr.kernel.org/
-Mauritania ftp://ftp.mr.kernel.org/
-Mauritius http://www.mu.kernel.org/
-Mauritius ftp://ftp.mu.kernel.org/
-Mayotte http://www.yt.kernel.org/
-Mayotte ftp://ftp.yt.kernel.org/
-Mexico http://www.mx.kernel.org/
-Mexico ftp://ftp.mx.kernel.org/
-Micronesia, Federated States of http://www.fm.kernel.org/
-Micronesia, Federated States of ftp://ftp.fm.kernel.org/
-Moldova http://www.md.kernel.org/
-Moldova ftp://ftp.md.kernel.org/
-Monaco http://www.mc.kernel.org/
-Monaco ftp://ftp.mc.kernel.org/
-Mongolia http://www.mn.kernel.org/
-Mongolia ftp://ftp.mn.kernel.org/
-Montserrat http://www.ms.kernel.org/
-Montserrat ftp://ftp.ms.kernel.org/
-Morocco http://www.ma.kernel.org/
-Morocco ftp://ftp.ma.kernel.org/
-Mozambique http://www.mz.kernel.org/
-Mozambique ftp://ftp.mz.kernel.org/
-Myanmar (Burma) http://www.mm.kernel.org/
-Myanmar (Burma) ftp://ftp.mm.kernel.org/
-Namibia http://www.na.kernel.org/
-Namibia ftp://ftp.na.kernel.org/
-Nauru http://www.nr.kernel.org/
-Nauru ftp://ftp.nr.kernel.org/
-Nepal http://www.np.kernel.org/
-Nepal ftp://ftp.np.kernel.org/
-Netherlands http://www.nl.kernel.org/
-Netherlands ftp://ftp.nl.kernel.org/
-Netherlands Antilles http://www.an.kernel.org/
-Netherlands Antilles ftp://ftp.an.kernel.org/
-New Caledonia http://www.nc.kernel.org/
-New Caledonia ftp://ftp.nc.kernel.org/
-New Zealand http://www.nz.kernel.org/
-New Zealand ftp://ftp.nz.kernel.org/
-Nicaragua http://www.ni.kernel.org/
-Nicaragua ftp://ftp.ni.kernel.org/
-Niger http://www.ne.kernel.org/
-Niger ftp://ftp.ne.kernel.org/
-Nigeria http://www.ng.kernel.org/
-Nigeria ftp://ftp.ng.kernel.org/
-Niue http://www.nu.kernel.org/
-Niue ftp://ftp.nu.kernel.org/
-Norfolk Island http://www.nf.kernel.org/
-Norfolk Island ftp://ftp.nf.kernel.org/
-Northern Mariana Islands http://www.mp.kernel.org/
-Northern Mariana Islands ftp://ftp.mp.kernel.org/
-Norway http://www.no.kernel.org/
-Norway ftp://ftp.no.kernel.org/
-Oman http://www.om.kernel.org/
-Oman ftp://ftp.om.kernel.org/
-Pakistan http://www.pk.kernel.org/
-Pakistan ftp://ftp.pk.kernel.org/
-Palau http://www.pw.kernel.org/
-Palau ftp://ftp.pw.kernel.org/
-Palestinian Territory http://www.ps.kernel.org/
-Palestinian Territory ftp://ftp.ps.kernel.org/
-Panama' http://www.pa.kernel.org/
-Panama' ftp://ftp.pa.kernel.org/
-Papua New Guinea http://www.py.kernel.org/
-Papua New Guinea ftp://ftp.py.kernel.org/
-Paraguay http://www.py.kernel.org/
-Paraguay ftp://ftp.py.kernel.org/
-Peru' http://www.pe.kernel.org/
-Peru' ftp://ftp.pe.kernel.org/
-Philippines http://www.ph.kernel.org/
-Philippines ftp://ftp.ph.kernel.org/
-Pitcairn Islands http://www.pn.kernel.org/
-Pitcairn Islands ftp://ftp.pn.kernel.org/
-Poland http://www.pl.kernel.org/
-Poland ftp://ftp.pl.kernel.org/
-Portugal http://www.pt.kernel.org/
-Portugal ftp://ftp.pt.kernel.org/
-Puerto Rico http://www.pr.kernel.org/
-Puerto Rico ftp://ftp.pr.kernel.org/
-Qatar http://www.qa.kernel.org/
-Qatar ftp://ftp.qa.kernel.org/
-Re'union http://www.re.kernel.org/
-Re'union ftp://ftp.re.kernel.org/
-Romania http://www.ro.kernel.org/
-Romania ftp://ftp.ro.kernel.org/
-Russian Federation http://www.ru.kernel.org/
-Russian Federation ftp://ftp.ru.kernel.org/
-Rwanda http://www.rw.kernel.org/
-Rwanda ftp://ftp.rw.kernel.org/
-Saint Helena http://www.sh.kernel.org/
-Saint Helena ftp://ftp.sh.kernel.org/
-Saint Kitts and Nevis http://www.kn.kernel.org/
-Saint Kitts and Nevis ftp://ftp.kn.kernel.org/
-Saint Lucia http://www.lc.kernel.org/
-Saint Lucia ftp://ftp.lc.kernel.org/
-Saint Pierre and Miquelon http://www.pm.kernel.org/
-Saint Pierre and Miquelon ftp://ftp.pm.kernel.org/
-Saint Vincent and The Grenadines http://www.vc.kernel.org/
-Saint Vincent and The Grenadines ftp://ftp.vc.kernel.org/
-Samoa http://www.ws.kernel.org/
-Samoa ftp://ftp.ws.kernel.org/
-San Marino http://www.sm.kernel.org/
-San Marino ftp://ftp.sm.kernel.org/
-Sa~o Tome' and Pri'ncipe http://www.st.kernel.org/
-Sa~o Tome' and Pri'ncipe ftp://ftp.st.kernel.org/
-Saudi Arabia http://www.sa.kernel.org/
-Saudi Arabia ftp://ftp.sa.kernel.org/
-Senegal http://www.sn.kernel.org/
-Senegal ftp://ftp.sn.kernel.org/
-Seychelles http://www.sc.kernel.org/
-Seychelles ftp://ftp.sc.kernel.org/
-Sierra Leone http://www.sl.kernel.org/
-Sierra Leone ftp://ftp.sl.kernel.org/
-Singapore http://www.sg.kernel.org/
-Singapore ftp://ftp.sg.kernel.org/
-Slovakia http://www.sk.kernel.org/
-Slovakia ftp://ftp.sk.kernel.org/
-Slovenia http://www.si.kernel.org/
-Slovenia ftp://ftp.si.kernel.org/
-Solomon Islands http://www.sb.kernel.org/
-Solomon Islands ftp://ftp.sb.kernel.org/
-Somalia http://www.so.kernel.org/
-Somalia ftp://ftp.so.kernel.org/
-South Africa http://www.za.kernel.org/
-South Africa ftp://ftp.za.kernel.org/
-South Georgia and The South Sandwich Islands http://www.gs.kernel.org/
-South Georgia and The South Sandwich Islands ftp://ftp.gs.kernel.org/
-Spain http://www.es.kernel.org/
-Spain ftp://ftp.es.kernel.org/
-Sri Lanka http://www.lk.kernel.org/
-Sri Lanka ftp://ftp.lk.kernel.org/
-Suriname http://www.sr.kernel.org/
-Suriname ftp://ftp.sr.kernel.org/
-Svalbard and Jan Mayen Islands http://www.sj.kernel.org/
-Svalbard and Jan Mayen Islands ftp://ftp.sj.kernel.org/
-Swaziland http://www.sz.kernel.org/
-Swaziland ftp://ftp.sz.kernel.org/
-Sweden http://www.se.kernel.org/
-Sweden ftp://ftp.se.kernel.org/
-Switzerland http://www.ch.kernel.org/
-Switzerland ftp://ftp.ch.kernel.org/
-Taiwan http://www.tw.kernel.org/
-Taiwan ftp://ftp.tw.kernel.org/
-Tajikistan http://www.tj.kernel.org/
-Tajikistan ftp://ftp.tj.kernel.org/
-Tanzania http://www.tz.kernel.org/
-Tanzania ftp://ftp.tz.kernel.org/
-Thailand http://www.th.kernel.org/
-Thailand ftp://ftp.th.kernel.org/
-Togo http://www.tg.kernel.org/
-Togo ftp://ftp.tg.kernel.org/
-Tokelau http://www.tk.kernel.org/
-Tokelau ftp://ftp.tk.kernel.org/
-Tonga http://www.to.kernel.org/
-Tonga ftp://ftp.to.kernel.org/
-Trinidad and Tobago http://www.ta.kernel.org/
-Trinidad and Tobago ftp://ftp.ta.kernel.org/
-Tunisia http://www.tn.kernel.org/
-Tunisia ftp://ftp.tn.kernel.org/
-Turkey http://www.tr.kernel.org/
-Turkey ftp://ftp.tr.kernel.org/
-Turkmenistan http://www.tm.kernel.org/
-Turkmenistan ftp://ftp.tm.kernel.org/
-Turks and Caicos Islands http://www.tc.kernel.org/
-Turks and Caicos Islands ftp://ftp.tc.kernel.org/
-Tuvalu http://www.tv.kernel.org/
-Tuvalu ftp://ftp.tv.kernel.org/
-Uganda http://www.ug.kernel.org/
-Uganda ftp://ftp.ug.kernel.org/
-Ukraine http://www.ua.kernel.org/
-Ukraine ftp://ftp.ua.kernel.org/
-United Arab Emirates http://www.ae.kernel.org/
-United Arab Emirates ftp://ftp.ae.kernel.org/
-United Kingdom http://www.uk.kernel.org/
-United Kingdom ftp://ftp.uk.kernel.org/
-United States http://www.us.kernel.org/
-United States ftp://ftp.us.kernel.org/
-United States Minor Outlying Islands http://www.um.kernel.org/
-United States Minor Outlying Islands ftp://ftp.um.kernel.org/
-Uruguay http://www.uy.kernel.org/
-Uruguay ftp://ftp.uy.kernel.org/
-Uzbekistan http://www.uz.kernel.org/
-Uzbekistan ftp://ftp.uz.kernel.org/
-Vanuatu http://www.vu.kernel.org/
-Vanuatu ftp://ftp.vu.kernel.org/
-Vatican City (Holy See) http://www.va.kernel.org/
-Vatican City (Holy See) ftp://ftp.va.kernel.org/
-Venezuela http://www.ve.kernel.org/
-Venezuela ftp://ftp.ve.kernel.org/
-Vietnam http://www.vn.kernel.org/
-Vietnam ftp://ftp.vn.kernel.org/
-Virgin Islands (British) http://www.vg.kernel.org/
-Virgin Islands (British) ftp://ftp.vg.kernel.org/
-Virgin Islands (U.S.) http://www.vi.kernel.org/
-Virgin Islands (U.S.) ftp://ftp.vi.kernel.org/
-Wallis and Futuna Islands http://www.wf.kernel.org/
-Wallis and Futuna Islands ftp://ftp.wf.kernel.org/
-Western Sahara http://www.eh.kernel.org/
-Western Sahara ftp://ftp.eh.kernel.org/
-Yemen http://www.ye.kernel.org/
-Yemen ftp://ftp.ye.kernel.org/
-Yugoslavia http://www.yu.kernel.org/
-Yugoslavia ftp://ftp.yu.kernel.org/
-Zambia http://www.zm.kernel.org/
-Zambia ftp://ftp.zm.kernel.org/
-Zimbabwe http://www.zw.kernel.org/
-Zimbabwe ftp://ftp.zw.kernel.org/
diff --git a/etc/lunar/mirrors/LRESORT b/etc/lunar/mirrors/LRESORT
deleted file mode 100644
index 655aa46..0000000
--- a/etc/lunar/mirrors/LRESORT
+++ /dev/null
@@ -1,9 +0,0 @@
-Custom Custom
-Mirror site - TX-US http://tx-us.lunar-linux.org/lunar/cache/
-Mirror site - SE http://jkp-se.lunar-linux.org/lunar/cache/
-Mirror site - SE http://vxj-se.lunar-linux.org/lunar/cache/
-Mirror site - SE http://su-se.lunar-linux.org/lunar/cache/
-Mirror site - BE http://be.lunar-linux.org/lunar/cache/
-Mirror site - DE http://de.lunar-linux.org/lunar/cache/
-Mirror site - DE http://fr-de.lunar-linux.org/lunar/cache/
-Master site - NL http://lunar-linux.org/lunar/cache/
diff --git a/etc/lunar/mirrors/SFORGE b/etc/lunar/mirrors/SFORGE
deleted file mode 100644
index 1c2efd3..0000000
--- a/etc/lunar/mirrors/SFORGE
+++ /dev/null
@@ -1,31 +0,0 @@
-AUTO (Auto-GEO) http://downloads.sourceforge.net/sourceforge
-Sydney (AU) http://optusnet.dl.sourceforge.net/sourceforge
-flow (AU) http://flow.dl.sourceforge.net/sourceforge
-Brussels (BE) http://belnet.dl.sourceforge.net/sourceforge
-Curitiba (BR) http://ufpr.dl.sourceforge.net/sourceforge
-Bern (CH) http://puzzle.dl.sourceforge.net/sourceforge
-Lausanne (CH) http://switch.dl.sourceforge.net/sourceforge
-cesnet (CZ) http://cesnet.dl.sourceforge.net/sourceforge
-Berlin (DE) http://dfn.dl.sourceforge.net/sourceforge
-Duesseldorf (DE) http://mesh.dl.sourceforge.net/sourceforge
-Paris (FR) http://ovh.dl.sourceforge.net/sourceforge
-Dublin (IE) http://heanet.dl.sourceforge.net/sourceforge
-Ishikawa (JP) http://jaist.dl.sourceforge.net/sourceforge
-Amsterdam (NL) http://surfnet.dl.sourceforge.net/sourceforge
-citkit (RU) http://citkit.dl.sourceforge.net/sourceforge
-Tainan (TW) http://nchc.dl.sourceforge.net/sourceforge
-nvhv (TW) http://nvhv.dl.sourceforge.net/sourceforge
-Kent (UK) http://kent.dl.sourceforge.net/sourceforge
-San Jose CA (US) http://internap.dl.sourceforge.net/sourceforge
-Seattle WA (US) http://superb-west.dl.sourceforge.net/sourceforge
-McLean VA (US) http://superb-east.dl.sourceforge.net/sourceforge
-Phoenix AZ (US) http://easynews.dl.sourceforge.net/sourceforge
-United States http://aleron.dl.sourceforge.net/sourceforge
-United States http://telia.dl.sourceforge.net/sourceforge
-United States http://twtelecom.dl.sourceforge.net/sourceforge
-United States http://unc.dl.sourceforge.net/sourceforge
-Minneapolis MN (US) http://umn.dl.sourceforge.net/sourceforge
-United States http://west.dl.sourceforge.net/sourceforge
-OSDN (US) http://osdn.dl.sourceforge.net/sourceforge
-voxel (US) http://voxel.dl.sourceforge.net/sourceforge
-cogent (US) http://cogent.dl.sourceforge.net/sourceforge
diff --git a/etc/lunar/mirrors/XFREE86 b/etc/lunar/mirrors/XFREE86
deleted file mode 100644
index 76ca9a8..0000000
--- a/etc/lunar/mirrors/XFREE86
+++ /dev/null
@@ -1,44 +0,0 @@
-"Master Site" ftp://ftp.xfree86.org/pub/XFree86/
-"Custom Mirror" Custom
-Korea ftp://ftp.kreonet.re.kr/pub/Linux/xfree86/
-Japan ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86/
-Japan ftp://ftp.iij.ad.jp/pub/X/XFree86/
-Japan ftp://kddlabs.co.jp/X/XFree86/
-Australia and New Zeland http://www.planetmirror.com/pub/XFree86/
-Australia and New Zeland ftp://ftp.planetmirror.com/pub/XFree86/
-Australia and New Zeland ftp://mirror.aarnet.edu.au/pub/XFree86/
-Australia and New Zeland ftp://x.physics.usyd.edu.au/pub/XFree86/
-Costa Rica ftp://xfree.ulatina.ac.cr/
-Austria ftp://gd.tuwien.Ac.at/hci/X11/XFree86/
-Czech Republic ftp://ftp.fee.vutbr.cz/pub/XFree86/
-Denmark ftp://mirror.inet.tele.dk/mirrors/ftp.xfree86.org/pub/XFree86/
-Finland ftp://ftp.funet.fi/pub/X11/XFree86/
-France ftp://ftp.free.fr/pub/XFree86/
-France ftp://ftp.lip6.fr/pub/X11/XFree86/
-France ftp://ftp.ovh.net/mirrors/
-Germany ftp://ftp.cs.tu-berlin.de/pub/X/XFree86/
-Germany ftp://ftp.gwdg.de/pub/xfree86/XFree86/
-Germany ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org/XFree86/
-Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/
-Germany ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86/
-Germany ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86/
-Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86/
-Italy ftp://ftp.unina.it/pub/XFree86/
-Ireland ftp://ftp.esat.net/pub/X11/XFree86/
-Netherlands ftp://ftp.nl.uu.net/pub/XFree86/
-Netherlands ftp://dl.xs4all.nl/pub2/mirror/XFree/
-Norway ftp://sunsite.uio.no/pub/XFree86/
-Poland ftp://sunsite.icm.edu.pl/pub/X11/XFree86/
-Poland ftp://ftp.task.gda.pl/pub/XFree86/
-Spain ftp://ftp.cica.es/pub/XFree86/
-Spain ftp://ftp.cica.es/mirrors/XFree86/
-United Kingdom ftp://sunsite.doc.ic.ac.uk/packages/XFree86/
-United States ftp://ftp.calderasystems.com/pub/mirrors/xfree86/
-United States ftp://carroll.cac.psu.edu/pub/XFree86/
-United States ftp://ftp.cs.umn.edu/pub/XFree86/
-United States ftp://download.sourceforge.net/pub/mirrors/XFree86/
-United States ftp://ftp.freesoftware.com/pub/XFree86/
-United States ftp://ftp.infomagic.com/pub/mirrors/XFree86/
-United States ftp://mirror.sftw.com/pub/XFree86/
-United States ftp://phyppro1.phy.bnl.gov/pub/XFree86/
-United States ftp://ftp.rge.com/pub/X/XFree86/
diff --git a/etc/lunar/mirrors/XORG b/etc/lunar/mirrors/XORG
deleted file mode 100644
index 5361b05..0000000
--- a/etc/lunar/mirrors/XORG
+++ /dev/null
@@ -1,47 +0,0 @@
-"Master Site" ftp://ftp.x.org/pub/
-"Custom Mirror" Custom
-Australia ftp://mirror.isp.net.au/pub/x.org/
-Belgium ftp://x.mirrors.skynet.be/pub/x.org/
-Belgium http://x.mirrors.skynet.be/pub/x.org/
-Brazilia ftp://ftp.unicamp.br/pub/X11/releases/
-France ftp://mirror.cict.fr/x.org/
-France http://mirror.cict.fr/x.org/
-Germany ftp://ftp.gwdg.de/pub/x11/x.org/pub/
-Germany ftp://ftp.portal-to-web.de/pub/mirrors/x.org/
-Germany http://www.portal-to-web.de/pub/mirrors/x.org/
-Germany ftp://ftp.fu-berlin.de/unix/X11/FTP.X.ORG/pub/
-Greece ftp://ftp.ntua.gr/pub/X11/
-HongKong ftp://ftp.cs.cuhk.edu.hk/pub/X11/
-Italy http://mi.mirror.garr.it/mirrors/x.org/
-Italy ftp://mi.mirror.garr.it/mirrors/x.org/
-Japan ftp://sunsite.sut.ac.jp/pub/archives/X11/
-Japan ftp://ftp.nara.wide.ad.jp/pub/X11/x.org/
-Japan http://ftp.nara.wide.ad.jp/pub/X11/x.org/
-Japan ftp://ftp.u-aizu.ac.jp/pub/x11/x.org/
-Japan http://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/
-Japan ftp://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/
-Korea ftp://ftp.kreonet.re.kr/pub/X11/ftp.x.org/
-Netherlands http://x-org.mirror.intouch.nl/
-Netherlands ftp://xorg.mirror.intouch.nl/mirrors/xorg/
-Poland ftp://sunsite.icm.edu.pl/pub/X11/x.org/
-Poland ftp://ftp.task.gda.pl/mirror/ftp.x.org/
-Poland http://ftp.pl.debian.org/mirror/ftp.x.org/pub/
-Russia ftp://xorg.freshsoft.ru/ftp.x.org/
-Russia http://xorg.freshsoft.ru/ftp.x.org/
-Russia http://ftp.chg.ru/pub/X11/x.org/
-Russia ftp://ftp.chg.ru/pub/X11/x.org/
-Spain ftp://ftp.cica.es/pub/X/
-Spain ftp://ftp.sunet.se/pub/X11/
-South Afrika ftp://ftp.is.co.za/pub/x.org/
-Switzerland http://xorg.mirror.solnet.ch/
-Switzerland ftp://ftp.solnet.ch/mirror/x.org/
-Switzerland ftp://mirror.switch.ch/mirror/X11/
-Switzerland http://mirror.switch.ch/ftp/mirror/X11/
-Taiwan http://x.cs.pu.edu.tw/
-United Kingdom http://www.mirror.ac.uk/mirror/ftp.x.org/
-United Kingdom http://www.mirrorservice.org/sites/ftp.x.org/
-United Kingdom ftp://ftp.mirrorservice.org/sites/ftp.x.org/
-United States ftp://mirror.sg.depaul.edu/pub/x.org/
-United States http://mirror.sg.depaul.edu/pub/x.org/
-United States http://x.paracoda.com/
-United States http://x.hostingzero.com/
diff --git a/install b/install
index 6965324..f2eebee 100755
--- a/install
+++ b/install
@@ -1,23 +1,9 @@
#!/bin/bash
-#Usage: install [/directory]
-#
-#The idea is to make this script a bit less absolute
-# This would assist with future ISO generation scripts ;^)
-
-if [ "x$1" = "x" ]
- then
- ROOT=/
- else
+if [ "x$1" = "x" ] ; then
+ make install
+else
+ make DESTDIR=$1
ROOT=$1
fi
-mkdir -p $ROOT/var/log/lunar/{install,compile,md5sum,queue}
-mkdir -p $ROOT/var/{cache,lib,spool,state}/lunar
-
-cp -a bin $ROOT
-cp -a etc $ROOT
-cp -a lib $ROOT
-cp -a sbin $ROOT
-cp -a usr $ROOT
-cp -a var $ROOT
diff --git a/lib/lsb/init-functions b/lib/lsb/init-functions
deleted file mode 100644
index cb1484c..0000000
--- a/lib/lsb/init-functions
+++ /dev/null
@@ -1,467 +0,0 @@
-#!/bin/bash
-
-############################################################
-# #
-# lunar.init - a collection of init.d script functions #
-# #
-############################################################
-# #
-# Copyrighted Auke Kok <koka at geo.vu.nl> 2002 under GPLv2 #
-# Copyright 2009 by Stefan Wold under GPLv2 #
-# #
-############################################################
-
-# we really need to do this:
-trap ":" QUIT TSTP SEGV
-export PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
-
-#
-# work notes:
-#
-# Need to install status() and other return codes
-# Need to rectify daemon-restart test and script deletion of /var/run/<prog>.pid
-# Need to assess impact of the above changes elswehere
-#
-#
-#
-#
-
-#
-# for whoever called us, we would like to know the follofing data,
-# so we may probe for changes, get and or set variables, etc.
-#
-# chkconfig: [ the chkconfig style data for the symlinks ]
-# config: [ one or more config files to watch ]
-# description: [ a multiline description for this script ]
-# short: [ one liner to be displayed during start ]
-# pidfile: [ the pidfile ]
-# processname: [ name of the process ]
-# sigstop: [ signal to stop (defaults to TERM) ]
-# sigreload: [ signal to reload (defaults to HUP) ]
-#
-
-#
-# the functionality in here can be called in 2 ways. Either run the script
-# itself by `$0 start`, or by calling the default_start (for instance)
-# functions directly.
-#
-# the default actions available are: (`$0 <action>`)
-#
-# start|start_daemon starts the process
-# stop|killproc kills the process
-# restart restarts it
-# probe probes (checks dates on configs) for a reload
-# reload reloads it
-# status check if it's alive
-# <empty or invalid> display default usage message
-# install install the required symlinks
-# uninstall remove the appropriate symlinks
-#
-# analog to that, you may also directly reference the functions:
-#
-# default_{start|stop|restart|probe|reload|status}
-#
-
- CHKCONFIG=`grep '^# chkconfig:' $0 | cut -d : -f 2-2`
-CONFIGFILES=`grep '^# config:' $0 | cut -d : -f 2-2 | tr -d " "`
-# DESCRIPTION=`grep '^# description: ' $0 | cut -d : -f 2-2 | tr -d " "`
- SHORT=`grep '^# short:' $0 | cut -d : -f 2-2 | tr -d " "`
- PIDFILE=`grep '^# pidfile:' $0 | cut -d : -f 2-2 | tr -d " "`
- PROCESS=`grep '^# processname:' $0 | cut -d : -f 2-2 | tr -d " "`
- SIGSTOP=`grep '^# sigstop:' $0 | cut -d : -f 2-2 | tr -d " "`
- SIGRELOAD=`grep '^# sigreload:' $0 | cut -d : -f 2-2 | tr -d " "`
- RUNAS=`grep '^# runas:' $0 | cut -d : -f 2-2 | tr -d " "`
-
-get_data () {
- # define these
- LINKNAME=${0##*/}
- BASENAME=${LINKNAME#*[SK][0-9][0-9]}
-
- # attempt to get these right:
- if [ ! -z $PROCESS ] ; then
- if [ "${PROCESS:0:1}" = "/" ]; then
- PROCESS_FULL=$PROCESS
- PROCESS_BASE=`basename $PROCESS`
- else
- if ! which 2> /dev/null ; then
- PROCESS_FULL=`which $PROCESS`
- PROCESS_BASE=`basename $PROCESS`
- else
- PROCESS=
- fi
- fi
- [ -z $PIDFILE ] && PIDFILE=/var/run/$PROCESS_BASE.pid
- [ -z $SHORT ] && SHORT=$BASENAME
- [ -z $SIGSTOP ] && SIGSTOP=TERM
- [ -z $SIGRELOAD ] && SIGRELOAD=HUP
- fi
-
- # VITAL INFO: SERVPID
- if [ -f "$PIDFILE" ] ; then
- if [ -d "/proc/$(cat $PIDFILE)" ] ; then
- SERVPID=$(cat $PIDFILE)
- fi
- fi
-}
-
-
-# define the output string colors and text
- ESC=`echo -en "\033"`
- RESULT_OK="${ESC}[\061;32m${ESC}[70G[\040\040\040OK\040\040\040]${ESC}[m"
-RESULT_FAIL="${ESC}[\061;31m${ESC}[70G[\040FAILED\040]${ESC}[m"
-RESULT_WARN="${ESC}[\061;33m${ESC}[70G[\040\040WARN\040\040]${ESC}[m"
-JUNK="]]]]]]"
-
-
-# Handy
-pgrep () {
- if [ -n "$SERVPID" ] ; then
- # we will kill the daemon:
- if [ -d /proc/$SERVPID ] ; then
- return 0
- else
- return 1
- fi
- else
- # where is the new daemon???
- if [ -f "$PIDFILE" ] ; then
- if [ -d "/proc/$(cat $PIDFILE)" ] ; then
- return 0
- else
- return 255
- fi
- else
- # sleep 1
- # second chance:
- if [ -f "$PIDFILE" ] ; then
- if [ -d "/proc/$(cat $PIDFILE)" ] ; then
- return 0
- else
- return 255
- fi
- else
- return 255
- fi
- fi
- fi
-}
-
-
-pkill () {
- if [ -z "$SERVPID" ] ; then
- return 255
- else
- if kill -$SIGSTOP $SERVPID >& /dev/null ; then
- if [ -f $PIDFILE ] ; then
- rm -f $PIDFILE
- fi
- return 0
- else
- return 255
- fi
- fi
-}
-
-
-prload () {
- if [ ! -f $PIDFILE ] ; then
- return 255
- else
- if kill -$SIGRELOAD $SERVPID >& /dev/null ; then
- return 0
- else
- return 255
- fi
- fi
-}
-
-
-mkpid () {
- if [ ! -e $PIDFILE ] ; then
- echo -n "[PID] "
- /bin/pgrep -o -P 1 "^$PROCESS_BASE$" > $PIDFILE && return 0 || return 255
- else
- return
- fi
-}
-
-
-pidok () {
- if [ -e $PIDFILE ] ; then
- if pgrep ; then
- return 0
- else
- return 255
- fi
- else
- return 255
- fi
-}
-
-
-log_success_msg () {
- echo -e "$1 $RESULT_OK"
-}
-
-
-log_failure_msg () {
- echo -e "$1 $RESULT_FAIL"
-}
-
-
-log_warning_msg () {
- echo -e "$1 $RESULT_WARN"
-}
-
-
-start_process () {
- if [ ! -z "$RUNAS" ]; then
- /bin/su $RUNAS -c "$PROCESS_FULL $ARGS" &&
- return 0 || return 255
- else
- $PROCESS_FULL $ARGS &&
- return 0 || return 255
- fi
-}
-
-
-# the main functions are defined as default_ so you may call these
-# directly from a script too
-default_start () {
- get_data
- # start the daemon
- echo -n "Starting $SHORT: "
- # check to see if it's not already running
- if ! pgrep ; then
- # sanity check:
- if [ -f $PIDFILE ] ; then
- rm -f $PIDFILE
- fi
- # start it up ourselves
- if start_process ; then
- # starup succeeded, now check if it really is running
- if pgrep ; then
- echo -e $RESULT_OK
- else
- # here's the broken daemon case
- mkpid
- if pgrep ; then
- echo -e $RESULT_OK
- else
- # startup failed on our side
- echo -e $RESULT_FAIL
- fi
- fi
- fi
- else
- # it's already running idiot
- echo -n "already running"
- echo -e $RESULT_WARN
- fi
-}
-
-
-default_stop () {
- get_data
- # stop the daemon
- echo -n "Stopping $SHORT: "
- if pgrep ; then
- pkill
- for COUNT in 1 2 3 4 5 ; do
- pgrep && pkill
- pgrep && echo -n "." && sleep 1
- if ! pgrep ; then
- # killed OK
- [ -e $PIDFILE ] && rm $PIDFILE
- echo -e $RESULT_OK
- break
- fi
- done
- if pgrep ; then
- # FAILED!
- mkpid
- echo -e "kill failed$RESULT_FAIL"
- fi
- else
- echo -e "not running $RESULT_WARN"
- fi
-}
-
-
-default_restart () {
- get_data
- # restart ourselves
- $0 stop && $0 start
-}
-
-
-default_probe () {
- get_data
- # see if we need to reload it based on the configs
- if [ -e $PIDFILE ] ; then
- # is it really there?
- if pidok ; then
- # test date of config files against PID dile
- NEEDRELOAD="false"
- for CONFIGFILE in $CONFIGFILES ; do
- [ $CONFIGFILE -nt $PIDFILE ] && NEEDRELOAD="true"
- done
- if [ "X$NEEDRELOAD" == "Xtrue" ] ; then
- # we need to reload
- $0 reload
- else
- # no need to reload
- echo "Reload of $SHORT not needed"
- fi
- else
- # our process died!
- [ -e $PIDFILE ] && rm $PIDFILE
- echo "Reload of $SHORT failed: process died!"
- fi
- else
- # no pid file???
- echo "Reload of $SHORT failed: cannot find process"
- fi
-}
-
-
-default_reload () {
- get_data
- # reload it
- echo -n "Reloading $SHORT: "
- if [ -e $PIDFILE ] ; then
- # we have a pid file
- prload
- # test existence
- if pidok ; then
- # still running then
- touch $PIDFILE
- echo -e $RESULT_OK
- else
- # something went wrong
- if pgrep ; then
- # changed PID
- mkpid
- echo -e $RESULT_OK
- else
- # it died
- [ -e $PIDFILE ] && rm $PIDFILE
- echo -e "process died!$RESULT_FAIL"
- fi
- fi
- else
- # no pid file???
- echo -e "cannot find process$RESULT_FAIL"
- fi
-}
-
-
-default_status () {
- get_data
- # check if it is running
- echo -n "Checking $SHORT: "
- if pidok ; then
- # we have a pid file and it's okay
- echo -e "$RESULT_OK"
- else
- # something went wrong
- if pgrep ; then
- # changed PID
- mkpid
- echo -e "Was reloaded$RESULT_OK"
- else
- # it died
- [ -e $PIDFILE ] && rm $PIDFILE
- echo -e "process died!$RESULT_FAIL"
- fi
- fi
-}
-
-
-default_install () {
- get_data
- # make the links for this file go to the right places
- LEVELS=`echo $CHKCONFIG | cut -d ' ' -f 1`
- LSTART=`echo $CHKCONFIG | cut -d ' ' -f 2`
- LSTOP=`echo $CHKCONFIG | cut -d ' ' -f 3`
- ls /etc/rc?.d/???$BASENAME > /dev/null 2>&1 &&
- echo "Warning: some links already exist!"
- for LEVEL in 0 1 2 3 4 5 6 ; do
- echo $LEVELS | grep -q $LEVEL && {
- # make start link
- echo ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/S$LSTART$BASENAME
- ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/S$LSTART$BASENAME || true
- } || {
- # make stop link
- echo ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/K$LSTOP$BASENAME
- ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/K$LSTOP$BASENAME || true
- }
- done
-}
-
-
-default_uninstall () {
- get_data
- # remove the links for this script
- LEVELS=`echo $CHKCONFIG | cut -d ' ' -f 1`
- LSTART=`echo $CHKCONFIG | cut -d ' ' -f 2`
- LSTOP=`echo $CHKCONFIG | cut -d ' ' -f 3`
- for LEVEL in 0 1 2 3 4 5 6 ; do
- echo $LEVELS | grep -q $LEVEL && {
- # remove start link
- echo rm /etc/rc$LEVEL.d/S$LSTART$BASENAME
- rm /etc/rc$LEVEL.d/S$LSTART$BASENAME || true
- } || {
- # remove stop link
- echo rm /etc/rc$LEVEL.d/K$LSTOP$BASENAME
- rm /etc/rc$LEVEL.d/K$LSTOP$BASENAME || true
- # if ANYONE can explain why that || true is NEEDED
- # tell me PLEASE!!!
- }
- done
- ls /etc/rc?.d/???$BASENAME > /dev/null 2>&1 &&
- echo "Warning: some links still exist!"
-}
-
-
-default_usage () {
- # default usage message
- echo "usage: $0 {start|stop|restart|reload|status}"
-}
-
-
-# default when no action passed
-[ -z $1 ] && ACTION=usage || ACTION=$1
-
-# and run the code
-if set | grep -q "^$ACTION ()" ; then
- # do the custom function
- $ACTION $@
-else
- get_data
- # these are always available:
- case $ACTION in
- (install) default_install ; return ;;
- (uninstall) default_uninstall ; return ;;
- esac
- # double check these:
- if [ -z $PROCESS ]; then
- echo -e "Processname is not defined!$RESULT_FAIL"
- exit 1
- fi
- if [ ! -x $PROCESS_FULL ]; then
- echo -e "The executable $PROCESS_BASE does not exist!$RESULT_FAIL"
- exit 1
- fi
- # do the builtin function
- case $ACTION in
- (start|start_daemon) default_start ;;
- (stop|killproc) default_stop ;;
- (restart) default_restart ;;
- (probe) default_probe ;;
- (reload) default_reload ;;
- (status) default_status ;;
- *) default_usage ;;
- esac
-fi
-
diff --git a/libs/README b/libs/README
new file mode 100644
index 0000000..da57c04
--- /dev/null
+++ b/libs/README
@@ -0,0 +1,2 @@
+There are some functions in this directory. These functions are called by
+subroutines. This place is defined in /etc/lunar/config, via FUNCTIONS variable.
diff --git a/libs/aliases.lunar b/libs/aliases.lunar
new file mode 100644
index 0000000..3b558fa
--- /dev/null
+++ b/libs/aliases.lunar
@@ -0,0 +1,82 @@
+#!/bin/bash
+############################################################
+# #
+# aliases.lunar - Lunar alias code #
+# #
+############################################################
+# #
+# Copyright 2004 by Auke Kok under GPLv2under GPLv2 #
+# #
+############################################################
+
+# translate %ALIAS if needed to a module name that is installed
+# and add it to the dependency chain if needed
+unalias() {
+ # quick exit code
+ if [[ "${1:0:1}" != "%" ]] ; then
+ echo $1
+ return
+ fi
+
+ local TARGET TARGETS TARGETBYNUM N CHOICE CACHED_ALIAS
+ # lookup in cache
+ CACHED_ALIAS=$(get_local_config `echo LUNAR_ALIAS_${1:1}`)
+ if [ -n "$CACHED_ALIAS" ]; then
+ echo $CACHED_ALIAS
+ return
+ fi
+
+ debug_msg "unalias($@)"
+ # try to figure out where the aliases file is:
+ if [[ -z "$ALIASES" ]] || [[ ! -f "$ALIASES" ]]; then
+ if [ -f "$MOONBASE/aliases" ] ; then
+ ALIASES="$MOONBASE/aliases"
+ else
+ ALIASES="/var/lib/lunar/aliases"
+ fi
+ fi
+
+ TARGETS=$(awk -F: -v mod=$1 '{if ($1==mod){print $2}}' $ALIASES)
+
+ # shortcut out when explicitly instructed so
+ if [[ -n "$NEVER_ASK" ]] ; then
+ echo $1
+ return
+ fi
+
+ # propose one and let the user pick it from a list:
+ debug_msg "unalias: starting selection loop"
+ error_message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} depends on ${DEFAULT_COLOR}${QUERY_COLOR}\"${1:1}\"${DEFAULT_COLOR}${MESSAGE_COLOR} which is an alias${DEFAULT_COLOR}"
+ while true ; do
+ error_message "${MESSAGE_COLOR}Please select a substitute ! Enter the number or the name of the module"
+ error_message "Press [ENTER] to select choice #1 (the recommended choice).${DEFAULT_COLOR}"
+ ((N=0))
+ for TARGET in $TARGETS ; do
+ ((N++))
+ TARGETBYNUM[$N]=$TARGET
+ if module_installed $TARGET ; then
+ error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${LRM_COLOR}(Installed)${DEFAULT_COLOR}"
+ else
+ error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${MESSAGE_COLOR}(Not installed)${DEFAULT_COLOR}"
+ fi
+ done
+ echo -n -e "${MESSAGE_COLOR}Choice> ${DEFAULT_COLOR}" >&2
+ read -t $PROMPT_DELAY CHOICE
+ # test directly first
+ if echo $TARGETS | grep -qw "$CHOICE" ; then
+ verbose_msg "Stored alias mapping $1 -> $TARGET"
+ set_local_config `echo LUNAR_ALIAS_${1:1}` $TARGET
+ echo $TARGET
+ return
+ # then the number, resolving the default
+ elif [[ -n "${TARGETBYNUM[${CHOICE:=1}]}" ]] ; then
+ verbose_msg "Stored alias mapping $1 -> ${TARGETBYNUM[$CHOICE]}"
+ set_local_config `echo LUNAR_ALIAS_${1:1}` ${TARGETBYNUM[$CHOICE]}
+ echo ${TARGETBYNUM[$CHOICE]}
+ return
+ fi
+ error_message "${MESSAGE_COLOR}Sorry, I can't do anything with \"${DEFAULT_COLOR}${QUERY_COLOR}$CHOICE${DEFAULT_COLOR}${MESSAGE_COLOR}\", please try again${DEFAULT_COLOR}"
+ done
+}
+
+
diff --git a/libs/build.lunar b/libs/build.lunar
new file mode 100644
index 0000000..c3573bb
--- /dev/null
+++ b/libs/build.lunar
@@ -0,0 +1,442 @@
+#!/bin/bash
+# #
+# build.lunar - building routines #
+# #
+############################################################
+# #
+# this WAS the subroutines of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Copyright 2001 by Kyle Sallee #
+# #
+# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+# Parts Copyrighted Steven Michalske 2004 under GPLv2 #
+# #
+############################################################
+
+
+save_libraries() {
+ local OLD_VERSION OLD_LOG OLD_LIBS SAVED LINE
+ debug_msg "save_libraries ($@)"
+
+ [ "$MODULE" == "glibc" ] && return 0
+
+ OLD_VERSION=`installed_version $MODULE`
+ OLD_LOG=$INSTALL_LOGS/$MODULE-$OLD_VERSION
+
+ [ -e "$OLD_LOG" ] || return 0
+
+ OLD_LIBS=$SOURCE_DIRECTORY/old.libraries
+ mkdir -p $OLD_LIBS
+
+ SAVED=$OLD_LIBS/$MODULE.saved.libraries
+ rm -rf $SAVED
+
+ grep "/lib/" $OLD_LOG |
+ while read LINE; do
+
+ if [ -f "$LINE" ] &&
+ file -bL $LINE |
+ grep -q "shared object"
+ then
+ verbose_msg "saving library \"$LINE\""
+ if [ -h $LINE ]; then
+ DEST=$( basename $( ls -la "$LINE" |
+ cut -d '>' -f2 |
+ cut -c 2-
+ )
+ )
+ ln -sf $DEST $OLD_LIBS/`basename $LINE`
+ else
+ cp $LINE $OLD_LIBS
+ fi
+ echo $OLD_LIBS/`basename $LINE` >> $SAVED
+ fi
+ done
+
+ ldconfig $OLD_LIBS
+
+ if [ -z "$LD_LIBRARY_PATH" ]
+ then export LD_LIBRARY_PATH="$OLD_LIBS"
+ else export LD_LIBRARY_PATH="$OLD_LIBS:$LD_LIBRARY_PATH"
+ fi
+}
+
+
+release_saved_libraries() {
+ local OLD_LIBS SAVED FILE
+ debug_msg "release_saved_libraries ($@)"
+ OLD_LIBS=$SOURCE_DIRECTORY/old.libraries
+ SAVED=$OLD_LIBS/$MODULE.saved.libraries
+
+ if [ -f $SAVED ] ; then
+ while read FILE ; do
+ verbose_msg "releasing library \"$FILE\""
+ rm -f "$FILE"
+ done < $SAVED
+ fi
+
+ ldconfig $OLD_LIBS
+}
+
+
+export_ld() {
+ local DIRECTORY
+ debug_msg "export_ld ($@)"
+ for DIRECTORY in $* ; do
+ if file -b $DIRECTORY/*.so* | grep -q "shared object" ; then
+ if [ -z "$LD_LIBRARY_PATH" ] ; then
+ export LD_LIBRARY_PATH="$DIRECTORY"
+ else
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIRECTORY"
+ fi
+ fi
+ done
+}
+
+
+prepare_install() {
+ debug_msg "prepare_install ($@)"
+ if module_installed $MODULE || module_held $MODULE ; then
+ message "${MESSAGE_COLOR}Preparing to install" \
+ "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+ save_libraries
+ verbose_msg "calling \"lrm --upgrade $MODULE\""
+ lrm --upgrade $MODULE
+ true
+ fi
+ # turn on tracking now
+ invoke_installwatch
+ plugin_call BUILD_INSTALL $MODULE
+ if [ $? == 2 ]; then
+ return 0
+ fi
+}
+
+
+default_pre_build() {
+ debug_msg "default_pre_build ($@)"
+ verbose_msg "running \"default_pre_build\""
+ validate_source_dir $SOURCE_DIRECTORY
+ if [[ -d $SOURCE_DIRECTORY ]] &&
+ [[ $KEEP_SOURCE == "on" ]]; then
+ cd $SOURCE_DIRECTORY &&
+ make clean
+ if [ $? -ne 0 ]; then
+ message "${PROBLEM_COLOR}ERROR: ${DEFAULT_COLOR}The source for ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}: could not be made clean for build."
+ # Thoughts on forcing a new source directory?
+ # More of how should we handle this, currently we will bail out
+ # A vast majority of the moonbase will fail, (w/o: make clean)
+ fi
+ else
+ mk_source_dir $SOURCE_DIRECTORY &&
+ unpack $SOURCE
+ fi
+}
+
+
+# wrapper function to call ./configure
+_configure()
+{
+ debug_msg "_configure($@)"
+ if [ -e ./configure ]; then
+ verbose_msg "./configure $@"
+ ./configure $@
+ elif [ -e Makefile -o -e makefile ]; then
+ verbose_msg "Missing \"configure\": skipping configure stage."
+ else
+ error_message "${PROBLEM_COLOR}Missing ${FILE_COLOR}configure${PROBLEM_COLOR} and/or ${FILE_COLOR}Makefile${PROBLEM_COLOR}!${DEFAULT_COLOR}"
+ return 1
+ fi
+}
+
+
+# cmake can be run two ways: in source and out of source. The determinante method is
+# to look for a cmake macro, if it exists then do out of source. There have been inconsistancies
+# with this, some apps compile fine out of source and others do not with the leaning towards
+# more wanting out of source even though they do not say so. Making this the default and
+# for those that do not want it, specify it in the BUILD.
+cmake_build_target() {
+ debug_msg "cmake_build_target ($@)"
+ verbose_msg "running \"Out of source build is required; configuring\""
+ OOSB_DIR="$SOURCE_DIRECTORY/$MODULE-oosb" &&
+ mkdir $OOSB_DIR &&
+ cd $OOSB_DIR
+}
+
+
+default_config() {
+ debug_msg "default_config ($@)"
+ verbose_msg "running \"default_config\""
+ _configure --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
+}
+
+
+default_game_config() {
+ debug_msg "default_game_config ($@)"
+ verbose_msg "running \"default_game_config\""
+ _configure --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --bindir=$MODULE_PREFIX/games \
+ --datadir=$MODULE_PREFIX/share/games \
+ --sysconfdir=/etc \
+ --localstatedir=/var/games \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
+}
+
+
+default_cvs_config() {
+ debug_msg "default_cvs_config ($@)"
+ verbose_msg "running \"default_cvs_config\""
+ verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
+
+ ./autogen.sh --build=$BUILD \
+ --prefix=$MODULE_PREFIX \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=$MODULE_PREFIX/share/info \
+ --mandir=$MODULE_PREFIX/share/man \
+ $OPTS
+}
+
+
+default_cmake_config() {
+ debug_msg "default_cmake_config ($@)"
+ verbose_msg "running \"default_cmake_config\""
+ verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
+
+ cmake_build_target
+
+ cmake -DCMAKE_INSTALL_PREFIX=$MODULE_PREFIX \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ $OPTS $SOURCE_DIRECTORY
+}
+
+
+default_make() {
+ debug_msg "default_make ($@)"
+ verbose_msg "running \"default_make\""
+ make ${MAKES:+-j${MAKES}} &&
+ prepare_install &&
+ make install
+}
+
+
+default_game_build() {
+ debug_msg "default_game_build ($@)"
+ verbose_msg "running \"default_game_build\""
+ default_game_config &&
+ default_make
+}
+
+
+default_cmake_build() {
+ debug_msg "default_cmake_build ($@)"
+ verbose_msg "running \"default_cmake_build\""
+ default_cmake_config &&
+ default_make
+}
+
+
+default_build() {
+ debug_msg "default_build ($@)"
+ verbose_msg "running \"default_build\""
+ default_config &&
+ default_make
+}
+
+
+default_cvs_build() {
+ debug_msg "default_cvs_build ($@)"
+ default_cvs_config &&
+ default_make
+}
+
+
+default_cpan_pre_build() {
+ local CPAN_MODULE CPAN_SOURCE_BRANCH
+ debug_msg "default_cpan_pre_build ($@)"
+ mk_source_dir $SOURCE_DIRECTORY
+ cd $SOURCE_DIRECTORY
+ CPAN_MODULE=${SOURCE_URL/cpan:\/\//}
+ CPAN_SOURCE_BRANCH=$(dirname $CPAN_MODULE)
+ mkdir -p authors/id/${CPAN_SOURCE_BRANCH}
+ install -m 444 $SOURCE_CACHE/$SOURCE authors/id/${CPAN_SOURCE_BRANCH}
+}
+
+
+default_cpan_build() {
+ local CPAN_MODULE
+ debug_msg "default_cpan_build ($@)"
+ prepare_install
+ verbose_msg "running \"default_cpan_build\""
+ if [ ! -x /usr/bin/cpan ] ; then
+ return 1
+ fi
+
+ CPAN_MODULE=${SOURCE_URL/cpan:\/\//}
+ echo "o conf cpan_root $STATE_DIRECTORY
+ o conf build_dir $SOURCE_DIRECTORY
+ o conf keep_source_where $SOURCE_DIRECTORY
+ install $CPAN_MODULE
+ quit" | /usr/bin/cpan || exit 1
+ rm_source_dir $SOURCE_DIRECTORY
+}
+
+
+default_post_build() {
+ debug_msg "default_post_build ($@)"
+
+ if [ $(wc -l $INSTALLWATCHFILE | awk '{print$1}') == "0" ] &&
+ [ "$PROFILE" != "yes" ] ; then
+ message "${PROBLEM_COLOR}WARNING: ${DEFAULT_COLOR}${FILE_COLOR}BUILD${DEFAULT_COLOR}${PROBLEM_COLOR} does not call prepare_install or installs zero files!${DEFAULT_COLOR}"
+ fi
+
+ update_plugin $MODULE install
+
+ plugin_call BUILD_POST_BUILD $MODULE
+ if [ $? != 2 ]; then
+ message "${PROBLEM_COLOR}ERROR: problems running POST_BUILD plugins!${PROBLEM_COLOR}"
+ return 1
+ fi
+
+ ldconfig
+ release_saved_libraries
+ cd /
+}
+
+
+syms_not_owned() {
+ local DEST
+ debug_msg "syms_not_owned ($@)"
+ while read ITEM ; do
+ if [ -h "$ITEM" ] && [ -f "$ITEM" ]; then
+ DEST=$(basename $(ls -la "$ITEM" | cut -d '>' -f2 | cut -c 2- ) )
+ if ! grep -q "$DEST" "$1" ; then
+ echo -n "$ITEM\|"
+ echo "$ITEM" >> $TMPDIR/$MODULE.rejected.symlinks
+ fi
+ fi
+ done < $1
+}
+
+
+prepare_module_config() {
+ debug_msg "prepare_module_config ($@)"
+ if [ ! -e "$MODULE_CONFIG" ] ; then
+ > $MODULE_CONFIG
+ fi
+}
+
+
+# run the CONFIGURE script
+run_configure() {
+ debug_msg "run_configure ($@)"
+ if [ -n "$RECONFIGURE" ]; then
+ verbose_msg "Reconfiguring \"$MODULE\""
+ rm -f $DEPENDS_CONFIG/$MODULE
+ remove_depends $MODULE
+ fi
+
+ prepare_module_config
+ grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
+
+ # add custom passed OPTS before retrieving them
+ if [ -n "$PASS_OPTS" ] ; then
+ SAVE_OPTS="$(get_module_config OPTS) $PASS_OPTS"
+ set_module_config OPTS "$SAVE_OPTS"
+ fi
+ plugin_call BUILD_CONFIGURE $MODULE
+ if has_module_file $MODULE CONFIGURE ; then
+ run_module_file $MODULE CONFIGURE
+ fi
+ # store $OPTS for later use
+ echo "$MODULE:$OPTS" >> $TEMP_CONFIGOPTS
+}
+
+
+run_pre_build() {
+ debug_msg "run_pre_build ($@)"
+ message "${MESSAGE_COLOR}Building ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} version ${MODULE_COLOR}$VERSION${DEFAULT_COLOR}"
+
+ cd $BUILD_DIRECTORY
+
+ if verify_all_sources $MODULE ; then
+ plugin_call BUILD_PRE_BUILD $MODULE
+ if has_module_file $MODULE PRE_BUILD ; then
+ run_module_file $MODULE PRE_BUILD
+ else
+ if ! default_pre_build ; then
+ return 1
+ fi
+ fi
+ else
+ return 1
+ fi
+}
+
+
+run_build() {
+ debug_msg "run_build ($@)"
+ if [[ -d "$SOURCE_DIRECTORY" ]] ; then
+ cd $SOURCE_DIRECTORY
+ fi
+
+ verbose_msg "building \"$MODULE\" version \"$VERSION\" in `pwd`"
+
+ # this calls optimizations and others:
+ plugin_call BUILD_BUILD $MODULE
+ # now override compile wrappers if needed:
+ if [[ "${USE_WRAPPERS:-yes}" == "yes" ]]; then
+ export PATH=/var/lib/lunar/compilers:$PATH
+ fi
+ (
+ # fix errors, don't avoid them. This makes all errors fatal
+ shopt -s execfail
+ if has_module_file $MODULE BUILD ; then
+ run_module_file $MODULE BUILD
+ else
+ default_build
+ fi
+ ) > $C_FIFO 2>&1
+}
+
+
+run_post_build() {
+ debug_msg "run_post_build ($@)"
+ if has_module_file $MODULE POST_BUILD ; then
+ run_module_file $MODULE POST_BUILD
+ fi
+ default_post_build
+}
+
+
+run_post_install() {
+ debug_msg "run_post_install ($@)"
+ plugin_call BUILD_POST_INSTALL $MODULE
+ if has_module_file $MODULE POST_INSTALL ; then
+ run_module_file $MODULE POST_INSTALL
+ fi
+}
+
+
diff --git a/libs/check.lunar b/libs/check.lunar
new file mode 100644
index 0000000..da2382f
--- /dev/null
+++ b/libs/check.lunar
@@ -0,0 +1,171 @@
+#!/bin/bash
+############################################################
+# #
+# check/lunar - module sanity checking functions #
+# #
+############################################################
+# #
+# Copyright 2005 Auke Kok under GPLv2 #
+# #
+############################################################
+
+
+run_checks() {
+ debug_msg "run_checks ($@)"
+ verbose_msg "Running sanity checks for module \"$1\""
+ (
+ run_details $1
+ plugin_call MODULE_CHECK $1
+ if [ $? == 2 ]; then
+ return 0
+ fi
+ return 1
+ )
+}
+
+
+# rework_module : check depends database for a module
+rework_module() {
+ local MODULE
+ debug_msg "rework_module ($@)"
+
+ # we declare these local to override the systems default ones:
+ optional_depends() {
+ local DEP
+ debug_msg " optional_depends ($@)"
+ DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
+ if module_exiled $DEP ; then
+ echo "$MODULE:$DEP:off:optional:$2:$3"
+ else
+ if module_installed $DEP || module_held $DEP ; then
+ echo "$MODULE:$DEP:on:optional:$2:$3"
+ else
+ echo "$MODULE:$DEP:off:optional:$2:$3"
+ fi
+ fi
+ }
+
+ depends() {
+ local DEP
+ debug_msg " depends ($@)"
+ DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
+ if ! module_installed $DEP && ! module_held $DEP ; then
+ if ! is_depends $DEP && module_exiled $DEP ; then
+ return 1
+ else
+ CHANGED_MODULES="$CHANGED_MODULES $DEP"
+ fi
+ fi
+
+ echo "$MODULE:$DEP:on:required:$2:$3"
+ }
+
+ run_depends() {
+ debug_msg " run_depends ($@)"
+ (
+ if run_details $1 &> /dev/null ; then
+ if has_module_file $MODULE DEPENDS ; then
+ run_module_file $MODULE DEPENDS | grep -v '%'
+ fi
+ fi
+ )
+ }
+
+ # here starts the real work:
+ MODULE=$1
+
+ # remove whatever depends was residing in the depends state file and
+ # append the new output:
+ lock_file $DEPENDS_STATUS_BACKUP &&
+ lock_file $DEPENDS_STATUS &&
+ grep -v "^$MODULE:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS &&
+ run_depends $MODULE >> $DEPENDS_STATUS
+ cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP
+ unlock_file $DEPENDS_STATUS
+ unlock_file $DEPENDS_STATUS_BACKUP
+}
+
+
+# fix_depends : single pass to fix depends database
+fix_depends () {
+ local LIST
+ debug_msg "fix_depends ($@)"
+
+ if [ -n "$1" ] ; then
+ LIST="$@"
+ else
+ LIST=$(grep -v moonbase: $MODULE_STATUS | cut -d: -f1 | sort )
+ fi
+
+ for MODULE in $LIST ; do
+ module_exiled $MODULE || rework_module $MODULE
+ done
+}
+
+
+run_fix() {
+ local MODULES MODULE
+ debug_msg "run_fix ($@)"
+ MODULES=$*
+
+ if [ -z "$MODULES" ] ; then
+ MODULES=$(list_installed | grep -v moonbase)
+ fi
+
+ if [[ -n "$FIXDEPENDS" ]] ; then
+ for MODULE in $MODULES ; do
+ fix_depends $MODULE
+ done
+ return
+ fi
+
+ # discover BROKEN modules and note them if we plan on fixing them
+ if [[ ! -n "$NOFIX" ]] ; then
+ for MODULE in $MODULES ; do
+ if ! run_checks $MODULE ; then
+ BROKEN_MODULES=( ${BROKEN_MODULES[@]} $MODULE )
+ fi
+ done
+ else
+ for MODULE in $MODULES ; do
+ run_checks $MODULE
+ done
+ fi
+
+ # if we were called with --fixdepends then we may skip the rest
+ if [ -n "$FIXDEPENDS" ] ; then
+ return
+ fi
+
+ export TMP_LIN_SUCCESS=$(temp_create "successful")
+ export TMP_LIN_FAIL=$(temp_create "failed")
+
+ if [[ ! -n "$NOFIX" ]] ; then
+ for MODULE in $(sort_by_dependency ${BROKEN_MODULES[@]}) ; do
+ if module_installed $MODULE && ! module_held $MODULE ; then
+ if ! run_checks $MODULE ; then
+ NEVER_ASK=1 DEPS_ONLY= satisfy_depends &&
+ NEVER_ASK=1 DEPS_ONLY= FIX= satisfy_depends &&
+
+ if ! run_checks $MODULE ; then
+ verbose_msg "Attempting to recompile \"$MODULE\""
+ if ! FIX= lin --compile $MODULE ; then
+ verbose_msg "Attempt to recompile \"$MODULE\" FAILED"
+ continue
+ elif ! run_checks $MODULE ; then
+ verbose_msg "Attempt to recompile \"$MODULE\" succeeded but \"$MODULE\" still is broken!"
+ continue
+ fi
+ fi
+ fi
+ fi
+ done
+
+ display_update_log fix
+ else
+ display_update_log nofix
+ fi
+
+ temp_destroy $TMP_LIN_SUCCESS
+ temp_destroy $TMP_LIN_FAIL
+}
diff --git a/libs/config.lunar b/libs/config.lunar
new file mode 100644
index 0000000..ad8fb6c
--- /dev/null
+++ b/libs/config.lunar
@@ -0,0 +1,137 @@
+#!/bin/bash
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/config #
+# set_config, get_config, unset_config #
+# set_local_config, get_local_config, unset_local_config #
+# set_module_config, get_module_config, unset_module_config#
+# #
+############################################################
+# #
+# Copyrighted Auke Kok 2004 under GPLv2 #
+# #
+############################################################
+
+
+set_config()
+{
+ local LINE NEW FILE VAR
+ debug_msg "set_config ($@)"
+
+ # remove leading/trailing whitespace
+ VAR=${2#"${2%%[![:space:]]*}"}
+ VAR=${VAR%%+([[:space:]])}
+
+ LINE=$(grep -w "$VAR=.*" $1)
+ FILE=$1
+
+ shift 2
+ if [ "$FILE" == "$LOCAL_CONFIG" ] ; then
+ NEW="$(printf "%16s" "$VAR")=\"$@\""
+ else
+ NEW="$VAR=\"$@\""
+ fi
+
+ # on-demand creation
+ if [ ! -f $FILE ] ; then
+ touch $FILE
+ fi
+
+ lock_file $FILE &&
+ if [ -n "$LINE" ] ; then
+ sedit "/^\s*$VAR=/d" $FILE
+ fi
+ echo "$NEW" >> $FILE
+ unlock_file $FILE
+}
+
+
+unset_config()
+{
+ debug_msg "unset_config ($@)"
+
+ # on-demand creation
+ if [ ! -f $1 ] ; then
+ touch $1
+ fi
+
+ lock_file $1 &&
+ if [ -n "$2" ] ; then
+ # make sure we escape those ':' characters:
+ sedit "/^[ ]*$2=/d" $1
+ fi
+ unlock_file $1
+}
+
+
+get_config()
+{
+ if [[ -f $1 ]] ; then
+ grep -w "$2=.*" $1 | cut -d= -f2- | sed -e 's/^"//' -e 's/"$//'
+ fi
+}
+
+
+set_local_config()
+{
+ debug_msg "set_local_config ($@)"
+ local VAR
+ VAR=$1
+ shift
+ set_config "$LOCAL_CONFIG" "$VAR" "$@"
+}
+
+
+unset_local_config()
+{
+ debug_msg "unset_local_config ($@)"
+ unset_config "$LOCAL_CONFIG" "$1"
+}
+
+
+get_local_config() {
+ get_config "$LOCAL_CONFIG" "$1"
+}
+
+
+set_module_config()
+{
+ debug_msg "set_module_config ($@)"
+ if [ -n "$MODULE" ] ; then
+ set_config "$DEPENDS_CONFIG/$MODULE" "$1" "$2"
+ fi
+}
+
+
+unset_module_config()
+{
+ debug_msg "unset_module_config ($@)"
+ if [ -n "$MODULE" ] ; then
+ unset_config "$DEPENDS_CONFIG/$MODULE" "$1"
+ fi
+}
+
+
+get_module_config()
+{
+ debug_msg "get_module_config ($@)"
+ if [ -n "$MODULE" ] ; then
+ get_config "$DEPENDS_CONFIG/$MODULE" "$1"
+ fi
+}
+
+
+get_other_module_config()
+{
+ debug_msg "get_other_module_config ($@)"
+ if [ -n "$1" ] ; then
+ get_config "$DEPENDS_CONFIG/$1" "$2"
+ fi
+}
+
+
diff --git a/libs/connect.lunar b/libs/connect.lunar
new file mode 100644
index 0000000..e5faab0
--- /dev/null
+++ b/libs/connect.lunar
@@ -0,0 +1,79 @@
+#!/bin/bash
+############################################################
+# #
+# download.lunar - get sources from the net #
+# #
+############################################################
+# leach is part of the sorcery spell management utility #
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# #
+# this WAS the leach script of a source based Linux distro,#
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+# This secondly was lget mostly, and has been moved into #
+# a separate lunar functions file handling all the generic #
+# downloading functionality for lunar #
+# #
+############################################################
+# #
+# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+# Parts Copyrighted Auke Kok 2002 under GPLv2 #
+# #
+############################################################
+
+
+connect() {
+ local TIMEOUT
+ debug_msg "connect ($@)"
+
+ if ! ifconfig | grep -q "^eth[0-9]\|^wlan[0-9]\|^ppp[0-9]\|^ath[0-9]\|^tun[0-9]\|^ra[0-9]\|^usb[0-9]"
+ then
+ pon
+
+ # Timeout in deciseconds to wait for Interface to come up.
+ TIMEOUT=30
+
+ until ifconfig | grep -q "^eth[0-9]\|^wlan[0-9]\|^ppp[0-9]\|^ath[0-9]\|^tun[0-9]\|^ra[0-9]\|^usb[0-9]" || [ $TIMEOUT == 0 ]
+ do
+ sleep 10
+ (( TIMEOUT-- ))
+ done
+ disconnect
+
+ fi
+
+}
+
+
+disconnect() {
+ debug_msg "disconnect ($@)"
+ if ps -C disconnect > /dev/null
+ then return
+ fi
+
+ rm -f $TMPDIR/disconnect
+ cat << EOF > $TMPDIR/disconnect
+#!/bin/sh
+
+while ps -A | grep -q "lget"; do sleep 120; done
+poff
+rm -f $TMPDIR/disconnect
+EOF
+
+chmod a+x $TMPDIR/disconnect
+ $TMPDIR/disconnect &
+
+}
+
+
diff --git a/libs/depends.lunar b/libs/depends.lunar
new file mode 100644
index 0000000..7205953
--- /dev/null
+++ b/libs/depends.lunar
@@ -0,0 +1,425 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/depends #
+# includes find_depends is_depends in_depends #
+# remove_depends add_depends run_depends #
+# satisfy_depends #
+# #
+# 20020710 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+# Copyright Auke Kok 2004 under GPLv2 #
+# #
+############################################################
+
+
+# function : find_depends
+# usage : find_depends "module name"
+# purpose : recursive dependency finder, no need to be installed
+function find_depends() {
+ local TMP_FDEPS
+ debug_msg "find_depends ($@)"
+
+ find_depends_intern() {
+ local DEP
+ for DEP in $(awk -F: -v mod=$1 '{if ($1==mod){print $2}}' $DEPENDS_CACHE) ; do
+ DEP=$(unalias "$DEP")
+ # this is our shortcut out:
+ if ! grep -qx "$DEP" $TMP_FDEPS ; then
+ echo "$DEP" >> $TMP_FDEPS
+ if grep -q "^$1:$DEP:required:" $DEPENDS_CACHE ; then
+ echo "$DEP"
+ find_depends_intern "$DEP"
+ elif module_installed "$DEP" ; then
+ echo "$DEP"
+ find_depends_intern "$DEP"
+ fi
+ fi
+ done
+ }
+
+ TMP_FDEPS=$(temp_create "found.depends")
+ find_depends_intern $(unalias $1)
+ temp_destroy $TMP_FDEPS
+}
+
+
+# function : sort_by_dependency
+# usage : LIST=$(sort_by_dependency $LIST)
+# purpose : return a LIST sorted by dependency
+sort_by_dependency() {
+ local TMP_LIST TMP_ALL TMP_TSRT A B
+ debug_msg "sort_by_dependency ($@)"
+
+ TMP_LIST=$(temp_create "deptree.in")
+ TMP_ALL=$(temp_create "deptree.all")
+
+ for M in $* ; do
+ echo "$M" >> $TMP_LIST
+ done
+
+ # tsort the existing dep relations in all of moonbase
+ TMP_TSRT=$(temp_create "dependency.sort")
+ awk -F: '{print $1,$2}' $DEPENDS_CACHE | while read A B ; do
+ B=$(MODULE=$A NEVER_ASK=1 DEPS_ONLY= unalias $B)
+ echo "$A $B" >> $TMP_TSRT
+ done
+ tsort $TMP_TSRT 2> /dev/null | tac > $TMP_ALL
+ temp_destroy $TMP_TSRT
+
+ # append all modules that do not have a DEPENDS file at all at the end
+ # note that this is logically WRONG, but it actually will help with
+ # unincluded depends, and therefore is *better* behaviour
+ for M in $* ; do
+ if ! grep -q -x $M $TMP_ALL ; then
+ echo $M >> $TMP_ALL
+ fi
+ done
+
+ # now reverse grep over the files:
+ cat $TMP_ALL | grep -x -f $TMP_LIST
+
+ temp_destroy $TMP_LIST
+ temp_destroy $TMP_ALL
+}
+
+
+is_depends() {
+ debug_msg "is_depends ($@)"
+ # Is $1 a previously selected dependency of any module.
+ return $(grep -q ":$1:on:" $DEPENDS_STATUS)
+}
+
+
+in_depends() {
+ debug_msg "in_depends ($@)"
+ # Was $2 presented as a dependency for module $1
+ return $(grep -q "^$1:$2:on:" $DEPENDS_STATUS)
+}
+
+
+remove_depends() {
+ debug_msg "remove_depends ($@)"
+ lock_file $DEPENDS_STATUS_BACKUP &&
+ lock_file $DEPENDS_STATUS ||
+ return 1
+
+ if [ -n "$2" ] ; then
+ if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
+ grep -v "^$1:$2:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS
+ verbose_msg "removing depends for \"$1\" on \"$2\""
+ fi
+ elif grep -q "^$1:" $DEPENDS_STATUS ; then
+ grep -v "^$1:" $DEPENDS_STATUS_BACKUP | \
+ grep -v ":$1:on:optional:" > $DEPENDS_STATUS
+ verbose_msg "removing all depends for and optional on \"$1\""
+ fi
+
+ cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
+
+ unlock_file $DEPENDS_STATUS &&
+ unlock_file $DEPENDS_STATUS_BACKUP
+}
+
+
+add_depends() {
+ debug_msg "add_depends ($@)"
+ if ! grep -q "^$1:$2:$3:$4:$5:$6$" $DEPENDS_STATUS ; then
+ lock_file $DEPENDS_STATUS_BACKUP &&
+ lock_file $DEPENDS_STATUS &&
+ if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
+ grep -v "^$1:$2:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS
+ else
+ verbose_msg "adding \"$4\" depends for \"$1\" on \"$2\" ($3)"
+ fi
+
+ echo "$1:$2:$3:$4:$5:$6" >> $DEPENDS_STATUS &&
+ cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP &&
+ unlock_file $DEPENDS_STATUS &&
+ unlock_file $DEPENDS_STATUS_BACKUP
+ fi
+}
+
+
+run_depends() {
+ debug_msg "run_depends ($@)"
+ # local definitions of depends and optional_depends!
+ depends() {
+ local DEP
+ debug_msg " depends ($@)"
+ DEP=$(unalias $1)
+ if grep -q "^$DEP\$" $TEMP_PREPAREDDEPS 2>/dev/null ; then
+ return 0
+ fi
+
+ if module_installed $DEP ; then
+ add_depends "$MODULE" "$DEP" "on" "required" "$2" "$3"
+ echo "$DEP" >> $TEMP_PREPAREDDEPS
+ elif ! is_depends $DEP ! module_installed $DEP && ! module_held $DEP ; then
+ if module_exiled $DEP ; then
+ message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! Error: required dependency ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${PROBLEM_COLOR} is exiled and cannot be installed${DEFAULT_COLOR}"
+ return 1
+ else
+ message "${MODULE_COLOR}${MODULE}:${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}Adding required dependency${DEFAULT_COLOR}" \
+ "${MODULE_COLOR}$DEP${DEFAULT_COLOR}"
+ add_depends "$MODULE" "$DEP" "on" "required" "$2" "$3"
+ lin --deps $DEP
+ echo "$DEP" >> $TEMP_PREPAREDDEPS
+ fi
+ fi
+ }
+
+ optional_depends() {
+ debug_msg " optional_depends ($@)"
+ local DEP DEFAULT DEPMOD_AVAIL
+ # parameters: $1 = module name
+ # $2 = configure parameter if module wanted
+ # $3 = configure parameter if module declined
+ # $4 = description of why to use this module
+
+ DEP=$(unalias $1)
+ if ! grep -q "^$MODULE:$DEP:" $DEPENDS_STATUS ; then
+
+ if module_exiled $DEP ; then
+ verbose_msg "\"$MODULE\" optionally depends on exiled module \"$DEP\""
+ add_depends "$MODULE" "$DEP" "off" "optional" "$2" "$3"
+ else
+ if module_installed $DEP ; then
+ DEFAULT="y"
+ else
+ DEFAULT="n"
+ fi
+
+ if module_installed $DEP ; then
+ DEPMOD_AVAIL="Use optional (${FILE_COLOR}installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
+ else
+ DEPMOD_AVAIL="Install & use optional (${PROBLEM_COLOR}not installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
+ fi
+
+ # this is shortcut case s1) as discussed in lunar-dev ML
+ if module_installed $DEP && [ -z "$2" -a -z "$3" ] ; then
+ verbose_msg "Auto-adding optional dependency \"$DEP\""
+ add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
+ lin --deps $DEP
+ elif query "$DEPMOD_AVAIL
+ ${QUERY_COLOR}Purpose: ${DEFAULT_COLOR}${MESSAGE_COLOR}$4 ${QUERY_COLOR}?" $DEFAULT ; then
+ add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
+ lin --deps $DEP
+ else
+ add_depends "$MODULE" "$DEP" "off" "optional" "$2" "$3"
+ fi
+ fi
+ fi
+ }
+
+ grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
+ if has_module_file $MODULE DEPENDS ; then
+ if [ -n "$SINGLE_MODULE" ] ; then
+ # we only need to show this once, but we get here twice per module
+ message "${CHECK_COLOR}Checking dependencies for" \
+ "${MODULE_COLOR}${MODULE}" \
+ "${DEFAULT_COLOR}"
+ fi
+ run_module_file $MODULE DEPENDS
+ fi
+}
+
+
+# function : satisfy_depends
+# usage : satisfy_depends (operates on $MODULE variable)
+# purpose : re-check module deps based on DEPENDS_CONFIG and DEPENDS_STATUS
+# NOTE: this is where a missing dependency gets installed! IOW we really do
+# "satisfy" any dependencies here!
+satisfy_depends() {
+ local TMP_FILE DEP_MODULE DEP_STATUS DEP_ON DEP_OFF LINE
+ debug_msg "satisfy_depends ($@)"
+ if [ -n "$DEPS_ONLY" ] ; then
+ return 0
+ fi
+
+ # make sure we start with clean OPTS here:
+ unset OPTS
+
+ if [ -s "$MODULE_CONFIG" ] ; then
+ . $MODULE_CONFIG
+ fi
+
+ TMP_FILE=$(temp_create "${MODULE}.satify-depends")
+ grep "^$MODULE:" $DEPENDS_STATUS > $TMP_FILE
+
+ # first recursively check if all required dependencies are installed
+ for DEP_MODULE in $(find_depends $MODULE | grep -v '%') ; do
+ if [ $DEP_MODULE != $MODULE ]; then
+ if ! module_installed $DEP_MODULE ; then
+ if ! SINGLE_MODULE=1 lin $SILENT $COMPILE $DEP_MODULE ; then
+ exit 1
+ fi
+ fi
+ fi
+ done
+
+ # then parse $OPTS
+ while read LINE; do
+ DEP_MODULE=$(echo $LINE | cut -d: -f2)
+ DEP_STATUS=$(echo $LINE | cut -d: -f3)
+ DEP_ON=$(echo $LINE | cut -d: -f5)
+ DEP_OFF=$(echo $LINE | cut -d: -f6)
+
+ if [ -n "$FIX" ] ; then
+ if DEP_STATUS="on" ; then
+ lin $FIX $DEP_MODULE
+ fi
+ elif [ "$DEP_STATUS" == "off" ] || module_exiled $DEP_MODULE ; then
+ OPTS="$OPTS $DEP_OFF"
+ elif [ "$DEP_STATUS" == "on" ] && ! module_installed $DEP_MODULE && \
+ ! module_held $DEP_MODULE ; then
+ if SINGLE_MODULE=1 lin $DEPS_ONLY $SILENT $COMPILE $DEP_MODULE ; then
+ OPTS="$OPTS $DEP_ON"
+ else
+ exit 1
+ fi
+ else
+ OPTS="$OPTS $DEP_ON"
+ fi
+ done < $TMP_FILE
+
+ temp_destroy $TMP_FILE
+}
+
+
+# conflicts... remove conflicting modules
+conflicts() {
+ local DEP
+ debug_msg "conflicts ($@)"
+ DEP=$1
+ if module_installed $DEP ; then
+ message "${PROBLEM_COLOR}WARNING: ${DEFAULT_COLOR}${MODULE_COLOR}$DEP${DEFAULT_COLOR}${PROBLEM_COLOR} conflicts with module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
+ if query "Do you want to remove module ${DEFAULT_COLOR}${MODULE_COLOR}$DEP${DEFAULT_COLOR}${QUERY_COLOR} ? " n ; then
+ lrm $DEP
+ else
+ message "${PROBLEM_COLOR}ERROR: Cannot continue installing conflicting modules, exiting!${DEFAULT_COLOR}"
+ exit 1
+ fi
+ fi
+
+ true
+}
+
+
+run_conflicts() {
+ debug_msg "run_conflicts ($@)"
+ if has_module_file $MODULE CONFLICTS ; then
+ run_module_file $MODULE CONFLICTS
+ fi
+}
+
+
+build_module_depends() {
+ debug_msg "build_module_depends ($@)"
+ if [ -n "$DEPS_ONLY" ] ; then
+ (
+ if ! run_conflicts $1 ; then
+ exit 1
+ fi &&
+ run_details $1 &&
+ run_configure &&
+ RECONFIGURE= run_depends
+ )
+ else
+ if ! run_conflicts $1 ; then
+ exit 1
+ fi &&
+ run_details $1 &&
+ RECONFIGURE= run_depends &&
+ RECONFIGURE= satisfy_depends
+ fi
+}
+
+
+build_depends() {
+ debug_msg "build_depends ($@)"
+ for MODULE in $@ ; do
+ if ! module_installed $MODULE || [ ! -n "$PROBE" ] ; then
+ if ! module_held $MODULE ; then
+ build_module_depends $MODULE
+ else
+ verbose_msg "Skipping dependency checking of held module \"$MODULE\""
+ fi
+ fi
+ done
+}
+
+
+create_depends_cache()
+{(
+ local TMP_DEP_CACHE DEPFILES DEPFILE MODULE
+ debug_msg "create_depends_cache($@)"
+
+ if [ ! -w $DEPENDS_CACHE -a -e $DEPENDS_CACHE ] ; then
+ return 1
+ fi
+
+ if [ $MODULE_INDEX -nt $DEPENDS_CACHE ] ; then
+ verbose_msg "Generating a new depends cache..."
+ TMP_DEP_CACHE=$(temp_create "depends.cache")
+
+ # you guessed it: local decls.
+ depends() {
+ echo "$MODULE:$1:required:$2:$3:"
+ }
+
+ optional_depends() {
+ # No quotes, this prevent us from parsing newlines
+ # if someone by accident add a newline in optional_depends
+ echo $MODULE:$1:optional:$2:$3:$4
+ }
+
+ # yeah, this sucks:
+ message() {
+ :
+ }
+
+ # speedups for system moonbases:
+ if [ "$MOONBASE" == "/var/lib/lunar/moonbase" ] ; then
+ DEPFILES=$(grep "/DEPENDS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase))
+ # don't forget zlocal:
+ DEPFILES="$DEPFILES $(find $MOONBASE/zlocal -type f -name DEPENDS)"
+ else
+ DEPFILES=$(find $MOONBASE -type f -name DEPENDS)
+ fi
+
+ # fast method for re-creating the depends.cache, might take long though
+ for DEPFILE in $DEPFILES ; do
+ TMP=${DEPFILE%/*} MODULE=${TMP##*/} . $DEPFILE
+ done > $TMP_DEP_CACHE &&
+ install -m644 $TMP_DEP_CACHE $DEPENDS_CACHE
+
+ temp_destroy $TMP_DEP_CACHE
+ else
+ verbose_msg "Skipping depends cache regeneration"
+ fi
+)}
+
+
+# list all installed modules depending on $1
+list_installed_depending() {
+ local SUBDEP
+ debug_msg "list_installed_depending($2)"
+ for SUBDEP in $(grep ":$1:" $DEPENDS_CACHE | cut -d: -f1) ; do
+ if $(module_installed $SUBDEP ) ; then
+ list_installed_depending $SUBDEP | sort | uniq
+ echo $SUBDEP
+ fi
+ done
+}
+
+
diff --git a/libs/download.lunar b/libs/download.lunar
new file mode 100644
index 0000000..755dbe6
--- /dev/null
+++ b/libs/download.lunar
@@ -0,0 +1,223 @@
+#!/bin/bash
+############################################################
+# #
+# download.lunar - get sources from the net #
+# #
+############################################################
+# #
+# Copyright Auke Kok / Lunar-Linux 2005 under GPLv2 #
+# #
+############################################################
+
+
+lget_lock() {
+ debug_msg "lget_lock ($@)"
+ echo $$ > /var/lock/lgetting.$MODULE
+}
+
+
+lget_locked() {
+ debug_msg "lget_locked ($@)"
+ if [ -f "/var/lock/lgetting.$MODULE" ] &&
+ ps `cat /var/lock/lgetting.$MODULE` | grep -q "lget" ; then
+ true
+ else
+ false
+ fi
+}
+
+
+lget_unlock() {
+ debug_msg "lget_unlock ($@)"
+ rm -f /var/lock/lgetting.$MODULE &> /dev/null
+}
+
+
+download_url() {
+ local RETVAL
+ debug_msg "download_url($@)"
+ verbose_msg "trying to download \"${2}\" from \"${1}\""
+ connect &&
+ plugin_call SOURCE_DOWNLOAD $1 $2 $3
+ return $?
+}
+
+
+download_module() {
+(
+ local MAX_SOURCES SRC ALL_URLS URLS URL MLIST ALT REST HIT
+ debug_msg "download_module ($@)"
+ if ! run_details $1 ; then
+ return 1
+ fi
+
+ if ! module_license_accepted $1 ; then
+ message "${MESSAGE_COLOR}The license of this module is incompatible with the list of"
+ message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
+ message "REJECTED_LICENSES variables to include or not include the specific"
+ message "license of this module.${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ MAX_SOURCES=${MAX_SOURCES:-100}
+
+ # loop over all sources
+ for (( N = 0 ; N < MAX_SOURCES ; N++ )) ; do
+ # get the URL part
+ eval SRC=\$$(echo SOURCE$N | sed s/SOURCE0/SOURCE/ )
+ eval URLS=\${$(echo SOURCE${N}_URL | sed s/SOURCE0/SOURCE/ )[@]}
+
+ # continue (to next) if empty once, break if empty twice
+ if [ -z "$SRC" ] ; then
+ if [ -z "$SECOND" ] ; then
+ SECOND="yes"
+ continue
+ else
+ break
+ fi
+ fi
+
+ # silly that this exists:
+ if [ "$CLEAR_CACHE" == "on" ] ; then
+ verbose_msg "clearing source cache copy of \"$SRC\""
+ rm -f $SOURCE_CACHE/$SRC 2>/dev/null
+ fi
+
+ add_url() {
+ if [ -n "$1" ]; then
+ if ! echo " $ALL_URLS " | grep -q " $1 "; then
+ ALL_URLS="$ALL_URLS $1"
+ fi
+ fi
+ }
+
+ if ! plugin_call SOURCE_NEEDREFRESH ${URLS[0]} $SRC $SOURCE_CACHE && [ -f $SOURCE_CACHE/$SRC ] ; then
+ # break out of the loop if the cache has it:
+ verbose_msg "Skipping download of \"$SRC\" (in cache)"
+ continue
+ fi
+
+ # check for cache?
+ message "${MESSAGE_COLOR}Downloading source file" \
+ "${FILE_COLOR}$SRC${DEFAULT_COLOR}" \
+ "${MESSAGE_COLOR}for module" \
+ "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+
+ if [ -n "$BASE_URL" ] ; then
+ # in case -u was passed:
+ ALL_URLS=$BASE_URL
+ else
+ # compose a list of URLS
+ ALL_URLS=
+ add_url $FRESORT_URL
+ for URL in $URLS ; do
+ add_url $URL
+ done
+ for URL in $URLS ; do
+ if [ "$EXHAUSTIVE" != "on" ]; then
+ continue
+ fi
+
+ # scan for hits against known clusters of mirrors
+ for MLIST in $MIRRORS/*; do
+ for ALT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST | grep -v "^Custom$"); do
+ if [ "${URL:0:${#ALT}}" == "$ALT" ] ; then
+ # compose the list of valid mirrors
+ REST=${URL:${#ALT}}
+ for HIT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
+ add_url ${HIT}${REST}
+ done
+ fi
+ done
+ done
+ done
+ add_url $LRESORT_URL
+ fi
+
+ for URL in $ALL_URLS; do
+ # and download
+ if download_url $URL $SRC $SOURCE_CACHE == 0 ; then
+ # done for this file!
+ SUCCESS=1
+ break
+ fi
+ done
+ if [ ${SUCCESS:-0} == 0 ] ; then
+ FAILALL=1
+ error_message "${PROBLEM_COLOR}I don't know how to download ${QUERY_COLOR}\"$1\".${DEFAULT_COLOR}"
+ error_message "${MESSAGE_COLOR}Install the package that provides the method and plugin to download it.${DEFAULT_COLOR}"
+ fi
+
+ done
+
+ return ${FAILALL:-0}
+)
+}
+
+
+testpack () {
+ local FILENAME
+ debug_msg "testpack ($@)"
+ if [ -f "$1" ]; then
+ FILENAME=$1
+ else
+ FILENAME=$SOURCE_CACHE/$1
+ fi
+ if [ -f "$FILENAME" ] ; then
+ FILEMAGIC=$(file -b $FILENAME)
+ case $FILENAME in
+ *.bz2|*.BZ2)
+ echo $FILEMAGIC | grep -qw "bzip2"
+ ;;
+ *.gz|*.GZ|*.tgz|*.TGZ)
+ echo $FILEMAGIC | grep -qw "gzip"
+ ;;
+ *.z|*.Z)
+ echo $FILEMAGIC | grep -qw "compress"
+ ;;
+ *.zip|*.ZIP)
+ echo $FILEMAGIC | grep -qw "Zip"
+ ;;
+ *.rpm|*.RPM)
+ echo $FILEMAGIC | grep -qw "RPM"
+ ;;
+ *.CAB|*.cab)
+ echo $FILEMAGIC | grep -qw "Cabinet"
+ ;;
+ *)
+ # we don't know how to handle this type of file
+ true
+ ;;
+ esac
+ else
+ # filename does not exist!
+ false
+ fi
+}
+
+
+show_downloading()
+{
+ local DOWNLOAD_PID DOWNLOAD_LOG
+ debug_msg "show_downloading ($@)"
+ DOWNLOAD_PID=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f2)
+ if [ -n "$DOWNLOAD_PID" ]; then
+ DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
+ if [ ! -d "/proc/$DOWNLOAD_PID" -a -f "$DOWNLOAD_LOG" ]; then
+ cat $DOWNLOAD_LOG
+ rm -f $DOWNLOAD_LOG
+ elif [ -f "$DOWNLOAD_LOG" ]; then
+ tail -s 0.1 -n 200 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
+ sleep 1
+ rm -f $DOWNLOAD_LOG
+ fi
+ elif lget_locked $MODULE; then
+ message "${MESSAGE_COLOR}Please wait while downloading of ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} progresses${DEFAULT_COLOR}"
+ while lget_locked $MODULE; do
+ echo -n "."
+ sleep 5
+ done
+ fi
+}
+
+
diff --git a/libs/edit.lunar b/libs/edit.lunar
new file mode 100644
index 0000000..00c212a
--- /dev/null
+++ b/libs/edit.lunar
@@ -0,0 +1,92 @@
+#!/bin/bash
+# #
+# edit.lunar - functions to edit files #
+# #
+####################################################################
+# #
+# Parts copyright Jason Johnston 2002 under GPLv2 #
+# #
+# Parts copyright Auke Kok 2002 under GPLv2 #
+# #
+####################################################################
+
+
+# function : patch_it
+# usage : patch_it patch_file patch_level
+# purpose : calls "patch -px < $filename", where filename may be a variety
+# of formats
+patch_it () {
+ local PATCH TARCMD GZCMD TMPFILE1 TMPFILE2
+ verbose_msg "patch_it \"$1\" \"$2\"";
+
+ # get patch from $SOURCE_CACHE automatically
+ if [ ! -f "$1" -a -f "$SOURCE_CACHE/$1" ] ; then
+ PATCH="$SOURCE_CACHE/$1"
+ else
+ PATCH="$1"
+ fi
+
+ if [[ -n `echo $PATCH | grep '\.tar'` ]] ; then
+ TARCMD="tar x -O"
+ else
+ TARCMD="cat"
+ fi
+
+ if [[ -n `echo $PATCH | grep '\.bz2$'` ]] ; then
+ GZCMD="bzcat"
+ elif [[ -n `echo $PATCH | grep '\.gz$'` ]] ; then
+ GZCMD="zcat"
+ elif [[ -n `echo $PATCH | grep -e '\.xz$' -e '\.lzma$'` ]] ; then
+ GZCMD="xzcat"
+ else
+ GZCMD="cat"
+ fi
+
+ TMPFILE1=$(temp_create "patch_1")
+ TMPFILE2=$(temp_create "patch_2")
+
+ if $GZCMD $PATCH > $TMPFILE1 ; then
+ # uncompress OK
+ if cat $TMPFILE1 | $TARCMD > $TMPFILE2 ; then
+ # untar OK
+ if patch -N -p$2 < $TMPFILE2 ; then
+ # patch cmd is OK
+ temp_destroy $TMPFILE1
+ temp_destroy $TMPFILE2
+ return 0
+ fi
+ fi
+ fi
+
+ message "${PROBLEM_COLOR}! Broken patch file ${DEFAULT_COLOR}${FILE_COLOR}$PATCH${DEFAULT_COLOR}"
+
+ temp_destroy $TMPFILE1
+ temp_destroy $TMPFILE2
+ return 255
+}
+
+
+# function : sedit
+# usage : sedit sed-statement file [file [file] ...]
+# purpose : edit [files] with a sed function
+sedit () {
+ local SEDIT
+ debug_msg "sedit ($@)"
+ SEDIT=$1
+ shift
+ for FILE in $@ ; do
+ verbose_msg "Editing \"$FILE\""
+ sed -i "$SEDIT" "$FILE"
+ done
+}
+
+
+# function : edit_file
+# usage : edit_file FILENAME
+# purpose : to edit a file
+edit_file() {
+ debug_msg "edit_file ($@)"
+ ${EDITOR:-nano} $1
+}
+
+
diff --git a/libs/init.lunar b/libs/init.lunar
new file mode 100644
index 0000000..5f8fc5e
--- /dev/null
+++ b/libs/init.lunar
@@ -0,0 +1,66 @@
+#!/bin/bash
+# #
+# init.lunar - Lunar subroutines #
+# #
+############################################################
+# #
+# this WAS the subroutines of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Copyright 2001 by Kyle Sallee #
+# #
+# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+
+# function : enviro_check
+# usage : enviro_check
+# purpose : check if the shell is proper
+enviro_check() {
+ debug_msg "enviro_check ($@)"
+ if [ -z $LUNAR_INSTALL ]; then
+ if [ -z "$SHELL" ] || [ "$(getent passwd $USER | cut -d: -f3)" != "0" ] ; then
+ message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
+ "You are not running a fully initialized root shell, consider"
+ message "running a proper root shell with 'su -'" \
+ "${DEFAULT_COLOR}"
+ fi
+ fi
+}
+
+# function : root_check
+# usage : root_check
+# purpose : check if the user is root
+root_check() {
+ debug_msg "root_check ($@)"
+ if [ "$UID" != "0" ] ; then
+ message "${PROBLEM_COLOR}ERROR:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
+ "User must have root privileges to run this program" \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+}
+
+
+# function : set_priority
+# usage : set_priority
+# purpose : force niceness on lunar's processes
+set_priority() {
+ debug_msg "set_priority ($@)"
+ LUNAR_PRIORITY=${LUNAR_PRIORITY:-"+10"}
+ renice "$LUNAR_PRIORITY" -p $$ 2> /dev/null >/dev/null
+}
+
+
diff --git a/libs/kernel.lunar b/libs/kernel.lunar
new file mode 100644
index 0000000..8c9251d
--- /dev/null
+++ b/libs/kernel.lunar
@@ -0,0 +1,95 @@
+#!/bin/bash
+############################################################
+# #
+# kernel.lunar functions for managing kernel installation #
+# and bootloaders #
+# #
+############################################################
+# #
+# Parts Copyright Terry Chan 2002 GPLv2 #
+# Parts Copyright Niki Guldbrand 2003 GPLv2 #
+# Parts Copyright FW Systems llc 2003 GPLv2 #
+# Parts Copyright Auke Kok 2005 GPLv2 #
+# Parts Copyright Stefan Wold 2010 GPLv2 #
+# #
+############################################################
+
+
+# Description : This function makes backups of the kernels and modules
+# Arg 1 : Filename of the kernel to backup (With or without full path)
+# With the format $VERSION_$EXTRAVERSION
+backup_mods_krnl() {
+ debug_msg "backup_mods_krnl ($@)"
+
+ devoke_installwatch
+
+ if [ -f /boot/$1.old ]; then
+ verbose_msg "moving old kernel backup"
+ mv -f /boot/$1.old /boot/$1.old_2
+ fi
+ if [ -f /boot/$1 ]; then
+ verbose_msg "copying $1"
+ cp -p /boot/$1 /boot/$1.old
+ fi
+ if [ -d /lib/modules/$1 ]; then
+ rm -rf /lib/modules/$1.old
+ cp -a /lib/modules/$1 /lib/modules/$1.old
+ fi
+
+ invoke_installwatch
+}
+
+
+update_bootloader() {
+ plugin_call KERNEL_UPDATEBOOTLOADER $1 $2
+}
+
+
+# function: kernel_config_exists
+# usage: kernel_config_exists
+# purpose: Verify that a readable kernel config is available
+# returns: Config file path, (0) if successful, (1) if config not found
+kernel_config_exists() {
+ if [ -e /proc/config.gz ]; then
+ echo "/proc/config.gz"
+ elif [ -e /usr/src/linux/.config ]; then
+ echo "/usr/src/linux/.config"
+ elif [ -e $CONFIG_CACHE/.config.2.6.stable ]; then
+ echo "$CONFIG_CACHE/.config.2.6.stable"
+ else
+ return 1
+ fi
+ return 0
+}
+
+# function: kernel_option_present
+# usage: kernel_option_present config_option
+# purpose: Check if a kernel option is configured
+# returns: (0) if option is found and enabled, (1) if option is not found or disabled, (255) if kernel config not found
+kernel_option_present() {
+ local KERNEL_CONFIG KERNEL_OPTION KERNEL_VALUE CAT
+ KERNEL_CONFIG=$(kernel_config_exists) || return 255
+ KERNEL_OPTION=$1
+ KERNEL_VALUE=$2
+
+ case $KERNEL_CONFIG in
+ *.gz)
+ CAT=zcat
+ ;;
+ *)
+ CAT=cat
+ ;;
+ esac
+
+ if [ -n "$KERNEL_VALUE" ]; then
+ if $CAT $KERNEL_CONFIG | grep -Eq "^$KERNEL_OPTION=\"$KERNEL_VALUE\""; then
+ return 0
+ fi
+ else
+ if $CAT $KERNEL_CONFIG | grep -Eq "^$KERNEL_OPTION=(y|m)$"; then
+ return 0
+ fi
+ fi
+
+ return 1
+}
diff --git a/libs/locking.lunar b/libs/locking.lunar
new file mode 100644
index 0000000..5620dba
--- /dev/null
+++ b/libs/locking.lunar
@@ -0,0 +1,126 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/locking #
+# includes lock_file and unlock_file functions #
+# #
+# 20020526 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# function: lock_file
+# usage : lock_file <absolute file name>
+# purpose : locks a file or wait until. Better use as lock_file <file> && || etc
+function lock_file() {
+ local TEMPFILE LOCKFILE STALE_PID
+ debug_msg "lock_file ($@)"
+ function file_lock() {
+ #locking is disabled if ln or rm not found!!
+ [ -x "/bin/ln" ] || return 0
+ [ -x "/bin/rm" ] || return 0
+
+ TEMPFILE="$1.$$"
+ LOCKFILE="$1.lock"
+
+ # test permission
+ if ! echo $$ > $TEMPFILE 2>/dev/null; then
+ message "${PROBLEM_COLOR}You don't have permission to access" \
+ "$TEMPFILE ${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ # file exists?
+ if [ ! -f "$1" ]; then
+ touch "$1"
+ fi
+
+ # set lockfile
+ if ln $TEMPFILE $LOCKFILE 2>/dev/null ; then
+ rm -f $TEMPFILE
+ return 0
+ # failed due to other lock?
+ elif [ ! -f "$LOCKFILE" ]; then
+ return 1
+ fi
+ # stale lock?
+ STALE_PID=`< $LOCKFILE`
+ if [ "$STALE_PID" -le "0" ]; then
+ return 1
+ fi
+ if kill -0 $STALE_PID 2>/dev/null; then
+ rm -f $TEMPFILE
+ return 1
+ fi
+ # yes, stale
+ rm -f $LOCKFILE 2>/dev/null &&
+ echo "Removed stale lock file of process $STALE_PID"
+ if ln $TEMPFILE $LOCKFILE 2>/dev/null; then
+ rm -f $TEMPFILE
+ return 0
+ fi
+ rm -f $TEMPFILE
+ return 1
+ }
+
+ while ! file_lock $1; do
+ message "${MESSAGE_COLOR}Waiting to lock the file $1${DEFAULT_COLOR}"
+ sleep 1
+ done
+ return 0
+}
+
+
+# function: unlock_file
+# usage : unlock_file <absolute file name>
+# purpose : unlocks a file
+function unlock_file() {
+ debug_msg "unlock_file ($@)"
+ #unlocking is disabled if rm not found!!
+ [ -x "/bin/rm" ] || return 0
+ rm -f $1.lock 2>/dev/null && return 0
+ return 1
+}
+
+
+lin_locked() {
+ debug_msg "lin_locked ($@)"
+ [ -f /var/lock/installing.$1 ] &&
+ ps `cat /var/lock/installing.$1` |
+ grep -q "lin"
+}
+
+
+solo_locked() {
+ debug_msg "solo_locked ($@)"
+ for SOLO_MODULE in `cat $SOLO` ; do
+ if lin_locked $SOLO_MODULE ; then
+ message "${PROBLEM_COLOR}lining${DEFAULT_COLOR}${MESSAGE_COLOR} of other modules is disabled during a lin ${MODULE_COLOR}$SOLO_MODULE${DEFAULT_COLOR}"
+ return
+ fi
+ done
+ false
+}
+
+
+current_locked() {
+ debug_msg "current_locked ($@)"
+ if lin_locked $MODULE; then
+ message "${QUERY_COLOR}Detected lin lock file: ${FILE_COLOR}$linING${DEFAULT_COLOR_COLOR}"
+ message "${MESSAGE_COLOR}Now waiting for ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}${MESSAGE_COLOR} to finish installing or for the lock to clear.${DEFAULT_COLOR}"
+
+ while lin_locked $MODULE; do sleep 2; done
+ false
+ else
+ false
+ fi
+}
+
+
diff --git a/libs/logging.lunar b/libs/logging.lunar
new file mode 100644
index 0000000..a7d5238
--- /dev/null
+++ b/libs/logging.lunar
@@ -0,0 +1,108 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/logging.lunar #
+# #
+############################################################
+
+
+start_logging () {
+ debug_msg "start_logging ($@)"
+ export C_LOG=$(temp_create "${MODULE}.compile-log")
+ export C_FIFO=$(temp_create "${MODULE}.compile-fifo")
+
+ # just remaking this as FIFO
+ rm -f $C_FIFO
+ mknod $C_FIFO p
+ echo "++ Mark Compile start : \"$MODULE\" \"$VERSION\" \"$(date -Ru)\"" > $C_LOG
+ activate_voyeur
+}
+
+
+stop_logging() {
+ debug_msg "stop_logging ($@)"
+ echo "++ Mark Compile stop : \"$MODULE\" \"$VERSION\" \"$(date -Ru)\"" >> $C_LOG
+ message "${MESSAGE_COLOR}Creating" \
+ "${FILE_COLOR}$COMPILE_LOGS/$MODULE-$VERSION.bz2" \
+ "${DEFAULT_COLOR}"
+
+ bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MODULE-$VERSION.bz2
+ temp_destroy $C_LOG
+ temp_destroy $C_FIFO
+}
+
+
+progress() {
+ local OLDLOG OLDSZ S PC
+ OLDLOG=$(ls -1d $COMPILE_LOGS/$MODULE-*.bz2 2>&- | head -n 1)
+ if [[ -f $OLDLOG ]]; then
+ X="############################################################"
+ Y=" "
+ OLDSZ=$(bzcat $OLDLOG | wc -c)
+ while true ; do
+ read -t 2 LINE
+ STATUS=$?
+ if [ $STATUS -gt 128 ]; then
+ sleep 2
+ continue
+ elif [ $STATUS -eq 1 ]; then
+ echo -ne "\r [${X:0:60}] (100%)\n"
+ exit
+ fi
+ (( S += ${#LINE} ))
+ if [[ $S -gt OLDSZ ]]; then
+ # never print 100% - subtract 1 :)
+ S=$((OLDSZ - 1))
+ fi
+ PC=$((S * 100 / OLDSZ))
+ L=$((S * 60 / OLDSZ))
+ echo -ne "\r [${X:0:$L}${Y:0:$((60 - L))}] ($PC%)\r"
+ done
+ else
+ SPINNER="/-\|"
+ # spinerrrrrr!!!!
+ while true ; do
+ read -t 2 LINE
+ STATUS=$?
+ if [ $STATUS -gt 128 ]; then
+ sleep 2
+ continue
+ elif [ $STATUS -eq 1 ]; then
+ exit
+ fi
+ ((C++))
+ if [[ $C -gt ${#SPINNER} ]]; then
+ C=0
+ fi
+ echo -en "\r [${SPINNER:$C:1}]\r"
+ done
+ fi
+}
+
+
+activate_voyeur() {
+ debug_msg "activate_voyeur ($@)"
+ if [ -z "$SILENT" ] ; then
+ case $VOYEUR in
+ on) tee -a $C_LOG < $C_FIFO & ;;
+ p*) tee -a $C_LOG < $C_FIFO | progress & ;;
+ *) tee -a $C_LOG < $C_FIFO >/dev/null & ;;
+ esac
+ else
+ tee -a $C_LOG < $C_FIFO >/dev/null &
+ fi
+}
+
+
+activity_log() {
+ debug_msg "activity_log ($@)"
+ lock_file $ACTIVITY_LOG &&
+ echo -e "$(date -u +%Y%m%d-%T)\t$1\t$2\t$3\t$4\t$5" >> $ACTIVITY_LOG
+ unlock_file $ACTIVITY_LOG
+}
+
+
diff --git a/libs/main.lunar b/libs/main.lunar
new file mode 100644
index 0000000..3254204
--- /dev/null
+++ b/libs/main.lunar
@@ -0,0 +1,363 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/main.lunar #
+# contains all main handling code, aka the long complex #
+# functions like renew, update, fix, etc. One day they all #
+# will be in here. #
+# #
+############################################################
+# #
+# Copyrighted Auke Kok 2003 under GPLv2 #
+# #
+############################################################
+
+# function : renew
+# usage : renew
+# purpose : frontend function that includes all renewing code
+renew() {
+ debug_msg "renew ($@)"
+ message "${MESSAGE_COLOR}Starting update of installed modules${DEFAULT_COLOR}"
+
+ purge_modules
+
+ export TMP_LIN_SUCCESS=$(temp_create "successful")
+ export TMP_LIN_FAIL=$(temp_create "failed")
+
+ update_modules
+
+ # Only run this if there was something to update
+ if [ $? -ne "255" ]; then
+ if [ "$AUTOFIX" == "on" ] ; then
+ message "${MESSAGE_COLOR}Executing AUTOFIX : lunar fix${DEFAULT_COLOR}"
+ run_fix
+ fi
+
+ if [ "$AUTOPRUNE" == "on" ] ; then
+ message "${MESSAGE_COLOR}Executing AUTOPRUNE : lunar prune${DEFAULT_COLOR}"
+ prune
+ fi
+
+ display_update_log renew
+ fi
+
+ temp_destroy $TMP_LIN_SUCCESS
+ temp_destroy $TMP_LIN_FAIL
+
+}
+
+
+update() {
+ debug_msg "update ($@)"
+ if ps -C lin > /dev/null ; then
+ error_message "${PROBLEM_COLOR}Unable to update lunar concurrently while installing.${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ # test if $LUNAR_MODULE is installed (for old boxes)
+ if [ -z "$LUNAR_MODULE" ] ; then
+ for ALT in $LUNAR_MODULES ; do
+ if module_installed $ALT ; then
+ lunar set LUNAR_MODULE $ALT
+ export LUNAR_MODULE=$ALT
+ verbose_msg "LUNAR_MODULE set to \"$ALT\""
+ fi
+ done
+ if [ -z "$LUNAR_MODULE" ] ; then
+ error_message "${PROBLEM_COLOR}Error:${DEFAULT_COLOR} ${MESSAGE_COLOR}No core code installed: install one of the following first:${DEFAULT_COLOR}"
+ error_message $LUNAR_MODULES
+ error_message "${MESSAGE_COLOR}then try again (I can't update if I don't know which toolset I use)${DEFAULT_COLOR}"
+ return 1
+ fi
+ fi
+
+ if lin moonbase ; then
+ if (( $(lvu installed $LUNAR_MODULE) < $(lvu version $LUNAR_MODULE) ))
+ then
+ lin $LUNAR_MODULE && lunar renew
+ else
+ lunar renew
+ fi
+ fi
+}
+
+
+rebuild() {
+ local LIST QUEUE TMP_QUEUE
+ debug_msg "rebuild ($@)"
+
+ message "${MESSAGE_COLOR}Starting non-recursive rebuild${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Running FIX on all modules${DEFAULT_COLOR}"
+ run_fix
+
+ LIST=$(grep ":installed:" $MODULE_STATUS | cut -d: -f1 | grep -v moonbase | grep -v $LUNAR_MODULE)
+
+ message "${MESSAGE_COLOR}Sorting modules by dependency${DEFAULT_COLOR}"
+ QUEUE=$(sort_by_dependency $LIST)
+
+ TMP_QUEUE=$(temp_create "rebuild-queue")
+ for MODULE in $QUEUE ; do
+ echo $MODULE >> $TMP_QUEUE
+ done
+
+ unset MODULE
+ if query "Edit rebuild queue?" n ; then
+ edit_file $TMP_QUEUE
+ fi
+
+ QUEUE=$(cat $TMP_QUEUE)
+ temp_destroy $TMP_QUEUE
+
+ if [ -n "$QUEUE" ] ; then
+ export TMP_LIN_SUCCESS=$(temp_create "successful")
+ export TMP_LIN_FAIL=$(temp_create "failed")
+
+ message "${MESSAGE_COLOR}Starting rebuild of modules${DEFAULT_COLOR}"
+ lin -c $QUEUE
+
+ display_update_log rebuild
+ temp_destroy $TMP_LIN_SUCCESS
+ temp_destroy $TMP_LIN_FAIL
+ fi
+}
+
+
+expand_cache_safe() {(
+ debug_msg "expand_cache_safe ($@)"
+
+ export SOURCE_DIRECTORY=$BUILD_DIRECTORY/resurrect-$MODULE-$VERSION
+ mk_source_dir $SOURCE_DIRECTORY
+ # untar the file so we can compare first
+ tar -pkxjf $1 -C $SOURCE_DIRECTORY 1>/dev/null 2>&1
+ # make a md5sum list of files
+ TMP_TARGETS=$(temp_create "resurrect.targets.$MODULE")
+ tar j --list < $1 > $TMP_TARGETS
+ TMP_TARGETS_OK=$(temp_create "resurrect.targets_OK.$MODULE")
+ # do directories: we don't care here
+ # the sed trick is advanced: a non-greedy pattern that returns all
+ # directory names listed in the input
+ for TARGET in $(cat $TMP_TARGETS | sed 's/\/[^\/]*$/\//g' ) ; do
+ if [ ! -d $TARGET ]; then
+ debug_msg "mkdir -p $TARGET"
+ mkdir -p $TARGET
+ fi
+ done
+ # do links
+ for TARGET in $(find $SOURCE_DIRECTORY -type l | sed "s:$SOURCE_DIRECTORY::g" ) ; do
+ # wipe the current link cos it ruins things
+ if [ -h "$TARGET" ] ; then
+ rm -f "$TARGET"
+ fi
+ debug_msg "ln -s $(readlink $SOURCE_DIRECTORY$TARGET) $TARGET"
+ echo "$TARGET" >> $TMP_TARGETS_OK
+ done
+ # do files - bulk process the normal ones
+ cat $TMP_TARGETS | grep -v -f $EXCLUDED >> $TMP_TARGETS_OK
+ # now double check the EXCLUDED ones
+ for TARGET in $(cat $TMP_TARGETS | grep -f $EXCLUDED ) ; do
+ if [ -e "$TARGET" ] ; then
+ debug_msg "Cowardishly not overwriting \"$TARGET\""
+ else
+ echo "$TARGET" >> $TMP_TARGETS_OK
+ fi
+ done
+
+ debug_msg "tar xjf $1 -P -k -T $TMP_TARGETS_OK"
+ tar xjf $1 -P -k -T $TMP_TARGETS_OK > /dev/null 2>&1
+
+ temp_destroy $TMP_TARGETS
+ temp_destroy $TMP_TARGETS_OK
+ rm_source_dir $SOURCE_DIRECTORY
+)}
+
+
+resurrect() {
+(
+ debug_msg "resurrect ($@)"
+
+ if [ -s /etc/lunar/local/optimizations ] ; then
+ . /etc/lunar/local/optimizations
+ fi
+ if ! run_details $1 ; then
+ return 1
+ fi
+ run_conflicts &&
+ satisfy_depends &&
+
+ STATUS=installed &&
+
+ if module_held $MODULE ; then
+ VERSION=$(installed_version $MODULE)
+ STATUS=held
+ lrm --keepconfig $MODULE
+ elif module_installed $MODULE ; then
+ lrm --keepconfig $MODULE
+ fi &&
+
+ CACHE_BZ="$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2"
+
+ if [ -f "$CACHE_BZ" ] && bzip2 -tf $CACHE_BZ ; then
+ message "${RESURRECT_COLOR}Resurrecting ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR} ${MESSAGE_COLOR}version ${VERSION_COLOR}${VERSION}${DEFAULT_COLOR}"
+ expand_cache_safe $CACHE_BZ &&
+ add_module $MODULE $STATUS $VERSION &&
+ verbose_msg "running \"lunar fix $MODULE\"" &&
+ if run_fix $MODULE ; then
+ report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
+ sound SUCCESS
+ activity_log "lin" "$MODULE" "$VERSION" "success" "resurrected"
+ message "${RESURRECT_COLOR}Resurrected ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR} ${MESSAGE_COLOR}successfully${DEFAULT_COLOR}"
+ else
+ sound FAILURE
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "resurrect failed"
+ false
+ fi
+ else
+ # do not log an error in case we tried autoresurrect:
+ if [ "$AUTORESURRECT" == "off" -o -n "$COMPILE" ] ; then
+ sound FAILURE
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "resurrect failed"
+ false
+ fi
+ false
+ fi
+)
+}
+
+resurrect_modules() {
+ debug_msg "resurrect_modules ($@)"
+ for MODULE in $@ ; do
+ if run_details $MODULE ; then
+ resurrect $MODULE
+ fi
+ done
+}
+
+
+lin_module() {
+(
+ debug_msg "lin_module ($@)"
+ xterm_msg "compiling $1"
+ # make sure we got all the info
+ if ! run_details $1 ; then
+ return 1
+ fi
+
+ # resurrect if we can, but not is -c was issued
+ if [ "$AUTORESURRECT" == "on" -a -z "$COMPILE" ] ; then
+ # we also do not resurrect if $MODULE is currently installed!
+ if ! module_installed $MODULE ; then
+ if resurrect $MODULE ; then
+ return 0
+ fi
+ fi
+ fi
+
+ # set the installwatchfile
+ export INSTALLWATCHFILE=$(temp_create "$MODULE.installwatch")
+
+ # lock the module for installation, check for moonbase call
+ linING="/var/lock/installing.$MODULE"
+ if [ "$MODULE" == "moonbase" ] ; then
+ if ! current_locked && ! solo_locked ; then
+ echo $$ > $linING &&
+ lget moonbase &&
+ rm -f $linING &&
+ return
+ else
+ exit 1
+ fi
+ fi
+ check_blacklist &&
+
+ # here we run CONFLICTS, DEPENDS and CONFIGURE stuff
+ run_conflicts &&
+ satisfy_depends &&
+ show_downloading &&
+
+ OPTS="$OPTS `grep ^$MODULE: $TEMP_CONFIGOPTS | cut -d: -f2`"
+
+ # last minute source code presence check:
+ (
+ for SOURCE in $(sources $MODULE) ; do
+ if [ ! -f $SOURCE_CACHE/$SOURCE ] ; then
+ lget $MODULE
+ break
+ fi
+ done
+ ) &&
+
+ # now entering the physical BUILD stage
+ if ! current_locked && ! solo_locked ; then
+ echo $$ > $linING &&
+ start_logging
+
+ if ! run_pre_build ; then
+ LIN_ERROR="PRE_BUILD"
+ else
+ if ! run_build ; then
+ LIN_ERROR="BUILD"
+ else
+ if ! run_post_build ; then
+ LIN_ERROR="POST_BUILD"
+ fi
+ fi
+ fi
+
+ stop_logging
+
+ if [ -n "$LIN_ERROR" ] ; then
+ if [ -f "$INSTALLWATCHFILE" ] ; then
+ temp_destroy $INSTALLWATCHFILE
+ fi
+ sound FAILURE
+ message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
+ rm -f $linING
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
+ return 1
+ fi
+
+ if ! finish_install ; then
+ LIN_ERROR="POST_BUILD"
+ else
+ if ! run_post_install ; then
+ LIN_ERROR="POST_INSTALL"
+ fi
+ fi
+ if [ -f "$INSTALLWATCHFILE" ] ; then
+ verbose_msg "removing installwatch file"
+ temp_destroy $INSTALLWATCHFILE
+ fi
+
+ if [ -n "$LIN_ERROR" ] ; then
+ sound FAILURE
+ message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
+ rm -f $linING
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
+ return 1
+ fi
+
+ rm_source_dir &&
+ report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
+ rm -f $linING &&
+ sound SUCCESS &&
+ activity_log "lin" "$MODULE" "$VERSION" "success"
+
+ if [ "$?" != 0 ] ; then
+ sound FAILURE
+ message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
+ rm -f $linING
+ report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during or after $LIN_ERROR"
+ return 1
+ fi
+ fi
+)
+}
+
+
diff --git a/libs/messages.lunar b/libs/messages.lunar
new file mode 100644
index 0000000..fcbfe39
--- /dev/null
+++ b/libs/messages.lunar
@@ -0,0 +1,236 @@
+#!/bin/bash
+# #
+# messages - lunar message display functions #
+# #
+############################################################
+# #
+# this WAS the subroutines of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Copyright 2001 by Kyle Sallee #
+# #
+# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+# #
+# moved to messages.lunar by sofar 2003 #
+# #
+############################################################
+
+
+# error msgs go to stderr !
+error_message() {
+ echo -e "$*" >&2
+}
+
+
+# normal messages go to stdout
+message() {
+ if [[ -z "$SILENT" ]] ; then
+ echo -e "$*"
+ fi
+}
+
+
+verbose_msg() {
+ if [[ "$VERBOSE" == "on" ]] ; then
+ message "+ $*" >&2
+ fi
+}
+
+
+debug_msg() {
+ local PLUSSES
+ if [[ -n "$LUNAR_DEBUG" ]] ; then
+ if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "4" ]] ; then
+ echo -n "$(basename $0)[$$]: " >&2
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "3" ]] ; then
+ echo -n "$(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: " >&2
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
+ if [[ "${FUNCNAME[1]}" != "$1" ]]; then
+ echo "$@" >&2
+ else
+ echo "${FUNCNAME[1]} ($@)" >&2
+ fi
+ else
+ echo "++ $@" >&2
+ fi
+ if [[ "$LUNAR_DEBUG" -ge "5" ]] ; then
+ echo "++ $@" >> $TMPDIR/lp_debuglog.$$
+ if [ -f $TMPDIR/l_debug_var.$$ ] ; then
+ mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
+ else
+ return
+ fi
+ set | grep '^[A-Z]' | sed 's/^/VAR /' > $TMPDIR/l_debug_var.$$
+ diff -U0 $TMPDIR/l_debug_var.$$.old $TMPDIR/l_debug_var.$$ | \
+ grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ >&2
+ fi
+ fi
+}
+
+
+# function : xterm_msg
+# usage : xterm_msg MESSAGE
+# purpose : To display a short message in the title bar of a X terminal
+xterm_msg() {
+ local MSG
+ debug_msg "xterm_bar ($@)"
+ case $TERM in
+ xterm*|gnome*|konsole*|rxvt*)
+ MSG="$(hostname) $(basename $0)[$$]: $@"
+ echo -n "]0; $MSG "
+ ;;
+ esac
+}
+
+# function : report FILE [description] MODULE VERSION
+report() {
+ local TMP_MAIL
+ debug_msg "report ($@)"
+ if [ ! -f "$1" ] ; then
+ return
+ fi
+
+ if [ "$VIEW_REPORTS" == "on" ] ; then
+ sound REPORT
+ if query "View $2 for ${MODULE_COLOR}${3}-${VERSION_COLOR}${4}${DEFAULT_COLOR}${QUERY_COLOR} ?" n ; then
+ view_file $1
+ fi
+ fi
+
+ if [ "$MAIL_REPORTS" == "on" ] ; then
+ TMP_MAIL=$(temp_create "mailreport")
+ date -u > $TMP_MAIL
+ echo >> $TMP_MAIL
+ view_file $1 >> $TMP_MAIL
+ mail -s "Lunar Report from $HOSTNAME : $2 for $3-$4" \
+ $ADMIN < $TMP_MAIL 2>/dev/null
+ temp_destroy $TMP_MAIL
+ fi
+
+ true
+}
+
+
+query() {
+ local RESPONSE
+ debug_msg "query ($@)"
+ # 2 arguments
+ # query "what do you want? " DEFAULT
+
+ if [ -z "$SILENT" ]; then
+ unset RESPONSE
+ while [ -z "$RESPONSE" ]; do
+ if [ -n "$MODULE" ]; then
+ echo -e -n "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}: "
+ fi
+ echo -e -n "${QUERY_COLOR}$1 [$2] ${DEFAULT_COLOR}"
+ read -t $PROMPT_DELAY -n 1 RESPONSE
+ if [ -z "$RESPONSE" ]; then
+ RESPONSE=${RESPONSE:-$2}
+ else
+ echo
+ fi
+ case $RESPONSE in
+ y|Y) true ;;
+ n|N) false ;;
+ *) unset RESPONSE ;;
+ esac
+ done
+ else
+ case $2 in
+ y|Y) true ;;
+ n|N) false ;;
+ *) message "Error: bad input in query()" ; exit 1 ;;
+ esac
+ fi
+}
+
+
+# mquery is a wrapper to autodetect if a certain y/n parameter in a module
+# config is not set yet and handles the case in a single function
+# usage: mquery USE_LILO "Use lilo instead of grub ?" y [yesopts] [noopts]
+# note : $MODULE must be set properly
+# note : both [yesopts] and [noopts] may be empty or ""
+mquery()
+{
+ debug_msg "mquery ($@)"
+ if [ -n "$MODULE" ]; then
+ if [ -z "$(get_module_config $1)" ]; then
+ # it's not set yet... start the asking loop
+ if query "$2" "$3" ; then
+ set_module_config "$1" y
+ else
+ set_module_config "$1" n
+ fi
+ fi
+ # and lookup the result in case of yes/no opts
+ if [ $(get_module_config $1) == "y" ] ; then
+ OPTS="$OPTS $4"
+ else
+ OPTS="$OPTS $5"
+ fi
+ fi
+}
+
+
+color() {
+ debug_msg "color ($@)"
+ case $1 in
+ off) unset MODULE_COLOR
+ unset VERSION_COLOR
+ unset QUERY_COLOR
+ unset LRM_COLOR
+ unset CHECK_COLOR
+ unset RESURRECT_COLOR
+ unset FILE_COLOR
+ unset SYMLINK_COLOR
+ unset PROBLEM_COLOR
+ unset MESSAGE_COLOR
+ unset DEFAULT_COLOR
+ COLOR=off
+ ;;
+ on) COLOR=on
+ ;;
+ esac
+}
+
+
+sound()
+{
+ debug_msg "sound ($@)"
+ if [ "$SOUND" == "on" ]; then
+ if [ -f "$SOUND_DIRECTORY/$SOUND_THEME/$1" ]; then
+ ( cd / ; play "$SOUND_DIRECTORY/$SOUND_THEME/$1" & )
+ fi
+ fi
+}
+
+
+# function : show_fancy_progress
+# usage : show_fancy_progress <fancy_progress_var_string>
+# purpose : display progress ex: show_fancy_progress "Processing: $MODULE"
+show_fancy_progress () {
+ debug_msg "show_fancy_progress ($@)"
+ echo -en "\r \r$1\r"
+}
+
+
diff --git a/libs/misc.lunar b/libs/misc.lunar
new file mode 100644
index 0000000..0a2cf31
--- /dev/null
+++ b/libs/misc.lunar
@@ -0,0 +1,220 @@
+#!/bin/bash
+# #
+# misc.lunar - Lunar subroutines #
+# #
+############################################################
+# #
+# this WAS the subroutines of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Copyright 2001 by Kyle Sallee #
+# #
+# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# function : ld_add
+# usage : ld_add <directory>
+# purpose : Add a path to ld.so.conf
+
+ld_add() {
+ debug_msg "ld_add ($@)"
+
+ if [ ! -z "$1" ] && [ -d "$1" ] ; then
+ if ! grep -q $1 /etc/ld.so.conf; then
+ verbose_msg "Adding $1 to ld.so.conf"
+ echo "$1" >> /etc/ld.so.conf
+ ldconfig
+ fi
+ fi
+}
+
+# function : ld_remove
+# usage : ld_remove <directory>
+# purpose : Remove a path from ld.so.conf
+
+ld_remove() {
+ debug_msg "ld_remove ($@)"
+
+ if [ ! -z "$1" ]; then
+ if grep -q $1 /etc/ld.so.conf ; then
+
+ TMP_LD_CONF=$(temp_create "ldsoconf")
+ verbose_msg "Removing $1 from ld.so.conf"
+
+ grep -v $1 /etc/ld.so.conf > $TMP_LD_CONF
+ cat $TMP_LD_CONF > /etc/ld.so.conf
+ ldconfig
+
+ temp_destroy $TMP_LD_CONF
+ fi
+ fi
+}
+
+# function : directories
+# usage : VARIABLE=`directories < dirlistfile`
+# purpose : to determine the directories from a given list
+directories() {
+ debug_msg "directories ($@)"
+ local ITEM
+ while read ITEM ; do
+ if [ -d "$ITEM" ] && [ ! -h "$ITEM" ] ; then
+ echo "$ITEM"
+ fi
+ done
+}
+
+
+# function : files
+# usage : VARIABLE=`files < dirlistfile`
+# purpose : to determine the ordinary files from a given list
+files() {
+ debug_msg "files ($@)"
+ local ITEM
+ while read ITEM ; do
+ if [ -f "$ITEM" ] && [ ! -h "$ITEM" ] ; then
+ echo "$ITEM"
+ fi
+ done
+}
+
+
+# function : sysmlinks
+# usage : VARIABLE=`symlinks < dirlistfile`
+# purpose : to determine the symbolic links from a given list
+symlinks() {
+ debug_msg "symlinks ($@)"
+ local ITEM
+ while read ITEM ; do
+ if [ -h "$ITEM" ] ; then
+ echo "$ITEM"
+ fi
+ done
+}
+
+
+# function : dirnames
+# usage : VARIABLE=`dirnames < dirlistfile`
+# purpose : info about the real locations of symlinks
+dirnames() {
+ debug_msg "dirnames ($@)"
+ local FILE
+ while read FILE ; do
+ dirname "$FILE"
+ done
+}
+
+
+# function : exists
+# usage : VARIABLE=`exists < dirlistfile`
+# purpose : filter out the non-existent files in a list
+exists() {
+ debug_msg "exists ($@)"
+ local ITEM
+ while read ITEM ; do
+ if [ -e "$ITEM" ] ; then
+ echo "$ITEM"
+ fi
+ done
+}
+
+
+# function : filter
+# usage : filter $FILE
+# purpose : filter stdin with files/dirs/symlinks provided in file $1.
+filter() {
+ debug_msg "filter ($@)"
+ local TMP_GREPRE
+ if [ -f "$1" ] ; then
+ TMP_GREPRE=$(temp_create "fgrep")
+ directories < $1 | sed -e 's:^:^:g' -e 's:$:/:g' > $TMP_GREPRE
+ files < $1 | sed -e 's:^:^:g' -e 's:$:\$:g' >> $TMP_GREPRE
+ symlinks < $1 | sed -e 's:^:^:g' -e 's:$:\$:g' >> $TMP_GREPRE
+ read
+ grep -v -f $TMP_GREPRE
+ temp_destroy $TMP_GREPRE
+ else
+ cat
+ fi
+}
+
+
+unmap_device()
+{
+ debug_msg "unmap_device($@)"
+ local DEVICE REAL
+ REAL=$(readlink -f $1)
+ for DEVICE in $(ls -1d /dev/[hs]d* 2> /dev/null); do
+ if [[ "$(readlink -f $DEVICE)" == "$REAL" ]]; then
+ echo $DEVICE
+ return 0
+ fi
+ done
+ echo $1
+ return 0
+}
+
+
+find_pam_aware() {
+ debug_msg "find_pam_aware ($@)"
+ local MODULE SECTION
+
+ for MODULE in $(list_installed); do
+ SECTION=$(find_section $MODULE)
+ if [ -d "$MOONBASE/$SECTION/$MODULE/pam.d" ] &&
+ [ "$MODULE" != "Linux-PAM" ]; then
+ echo $MODULE
+ fi
+ done < $MODULE_STATUS
+}
+
+
+custom_filters()
+{
+ local FILE
+ if [[ "${COMPRESS_MANPAGES:-on}" == "on" ]]; then
+ while read FILE; do
+ if [[ -f "$FILE" ]] ; then
+ if echo "$FILE" | grep '^/usr/share/man/.*\..$' | grep -q -v '\.gz$'; then
+ gzip -9 < "$FILE" > "$FILE.gz"
+ debug_msg "Compressing man page \"$FILE\""
+ rm -f "$FILE"
+ echo "$FILE.gz"
+ else
+ echo "$FILE"
+ fi
+ else
+ echo "$FILE"
+ fi
+ done
+ else
+ cat -
+ fi
+}
+
+
+source_basename()
+{
+ echo $1 | sed 's/.tar.\(bz2\|gz\)$//g'
+}
+
+
+last_kernel()
+{
+ if [ -f /usr/src/linux/include/linux/utsrelease.h ]; then
+ grep UTS_RELEASE /usr/src/linux/include/linux/utsrelease.h | cut -d'"' -f2
+ else
+ grep UTS_RELEASE /usr/src/linux/include/linux/version.h | cut -d'"' -f2
+ fi
+}
diff --git a/libs/modules.lunar b/libs/modules.lunar
new file mode 100644
index 0000000..a0b3f66
--- /dev/null
+++ b/libs/modules.lunar
@@ -0,0 +1,646 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/modules #
+# includes create_module_index, find_section #
+# list_sections, list_modules, list_installed #
+# check_module_index, run_details #
+# module_installed, module_held, module_exiled #
+# hold_modules, unhold_modules #
+# 20020528 #
+# 20030113 merging more functions in here - sofar #
+# 20030417 adding hold routines - sofar #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# Portions Copyrighted Chuck Mead 2002 under GPLv2 #
+# Portions Copyrighted Auke Kok 2003 under GPLv2 #
+# #
+############################################################
+
+
+# function : list_sections
+# usage : list_sections
+# purpose : list the moonbase sections, filter out the specific files
+list_sections() {
+ debug_msg "list_sections ($@)"
+ check_module_index
+ cut -d: -f2 < $MODULE_INDEX | sort | uniq
+ find $MOONBASE/zlocal -name DETAILS | sed "s:^$MOONBASE\/::g;s:\/[^\/]*\/DETAILS$::g" | sort | uniq
+ return 0
+}
+
+
+# function : list_modules
+# usage : list_modules $SECTION
+# purpose : list the modules in a section, filter out the specific files
+list_modules() {
+ debug_msg "list_modules ($@)"
+ if [[ -z "$1" ]] ; then
+ error_message "${PROBLEM_COLOR}list_modules(): no SECTION defined!${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if [[ ! -d $MOONBASE/$1 ]] ; then
+ error_message "${PROBLEM_COLOR}list_modules(): no such section \"$1\"!${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if grep -q ":$1$" $MODULE_INDEX; then
+ grep ":$1$" $MODULE_INDEX | cut -d: -f1
+ return 0
+ else
+ (
+ cd $MOONBASE/$1
+ find . -maxdepth 2 -name DETAILS -type f | sed 's/\.\///g;s/\/DETAILS$//g'
+ )
+ fi
+}
+
+
+# function : list_moonbase
+# usage : list_moonbase
+# purpose : returns the names of all modules in moonbase
+list_moonbase() {
+ local SECTION
+ debug_msg "list_moonbase ($@)"
+ for SECTION in $(list_sections) ; do
+ list_modules $SECTION
+ done
+}
+
+
+# function : list_installed
+# usage : list_installed
+# purpose : return a list of installed (or held) modules
+list_installed() {
+ debug_msg "list_installed ($@)"
+ grep -e ":installed:" -e ":held:" $MODULE_STATUS | cut -d: -f1 | sort
+}
+
+
+# function: create_module_index
+# usage : create_module_index
+# purpose : created an index file of module:section pair list
+create_module_index() {
+ local TMP_INDEX
+ debug_msg "create_module_index ($@)"
+ # make sure it exists before trying to see it's writeable
+ # this also assures that depends.cache gets remade
+ if [[ ! -f $MODULE_INDEX ]] ; then
+ touch $MODULE_INDEX &> /dev/null
+ fi
+
+ # silently fail if we cannot write to $MODULE_INDEX, it is okay
+ # for this to fail in case we are a mere user using lvu's search
+ # functionality
+ if [[ ! -w "$MODULE_INDEX" ]] ; then
+ return 0
+ fi
+
+ verbose_msg "Updating module index file..."
+ # doing this allows us to ctrl-C the process without breaking the
+ # index file
+ TMP_INDEX=$(temp_create "module.index")
+
+ # here we have two options: system moonbase or custom:
+ if [[ "$MOONBASE" == "/var/lib/lunar/moonbase" ]] && [[ -f $INSTALL_LOGS/moonbase-$(installed_version moonbase) ]] ; then
+ # short way out:
+ debug_msg "Quick generating \$MODULE_INDEX..."
+ grep "/DETAILS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase) | \
+ sed -e 's:/var/lib/lunar/moonbase/::' -e 's:/DETAILS::g' \
+ -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
+ else
+ # this *really* is the fastest way to do it, no guarantees, we
+ # do have to make sure MOONBASE is coherent and tidy though
+ debug_msg "Regenerating \$MODULE_INDEX manually..."
+ find $MOONBASE -type f -name DETAILS ! -regex "$MOONBASE/zlocal/.*" \
+ -printf "%h\n" | sed "s:$MOONBASE/::g;s:^\(.*\)/\(.*\)$:\2\:\1:g" > $TMP_INDEX
+ fi
+
+ # this should be safe enough:
+ lock_file $MODULE_INDEX &&
+ install -m644 $TMP_INDEX $MODULE_INDEX
+
+ # do not forget to do these at any time:
+ unlock_file $MODULE_INDEX
+ temp_destroy $TMP_INDEX
+}
+
+
+# function: check_module_index
+# usage : check_module_index
+# purpose : checks if the index is up-to-date regarding to moonbase
+function check_module_index() {
+(
+ debug_msg "check_module_index ($@)"
+ local RESULT=1
+ if [[ ! -e $MODULE_INDEX ]] || [[ ! -e $DEPENDS_CACHE ]]; then
+ create_module_index
+ create_depends_cache
+ RESULT=0
+ else
+ if [[ -n "$(find $MOONBASE -type f -name "DEPENDS" -cnewer $DEPENDS_CACHE)" ]]; then
+ create_depends_cache
+ RESULT=0
+ fi
+ if [[ -n "$(find $MOONBASE -type f -name "DETAILS" -cnewer $MODULE_INDEX)" ]]; then
+ create_module_index
+ RESULT=0
+ fi
+ fi
+ return $RESULT
+)
+}
+
+
+# function : find_section
+# usage : find_section "module name"
+# purpose : finds the section of a given module as parameter
+# returns : (0) on success, (1) on failure, errors on stdout
+find_section() {
+ local SECTION SECTIONS
+ debug_msg "find_section ($@)"
+
+ # if using ZLOCAL, we must search there first
+ if [[ "${ZLOCAL_OVERRIDES:-off}" == "on" ]] ; then
+ for SECTION in $(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||;s|/$1$||" ) ; do
+ if [[ -f "$MOONBASE/$SECTION/$1/DETAILS" ]]; then
+ echo $SECTION
+ return 0
+ fi
+ done
+ fi
+
+ # otherwise check for ordinary modules named that way
+ SECTION=$(awk -F: "(\$1==\"$1\"){print \$2;exit 0}" $MODULE_INDEX)
+ if [[ -n "$SECTION" ]] && [[ -d "$MOONBASE/$SECTION/$1" ]] ; then
+ echo "$SECTION"
+ return 0
+ fi
+
+ # assuming we're not using ZLOCAL, we haven't looked there yet!
+ # perhaps it's a zlocal module ? search zlocal for it now
+ if SECTION=$(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||;s|/$1$||" ) ; then
+ if [[ -n "$SECTION" ]]; then
+ echo $SECTION
+ return 0
+ fi
+ fi
+
+ # still not found? refresh module index... this may take a while
+ if ! check_module_index ; then
+ # shave some time off not trying the rest of the code below since that
+ # is useless
+ return 1
+ fi
+
+ # and search again, this should be quick now
+ SECTION=$(awk -F: "(\$1==\"$1\"){print \$2;exit 0}" $MODULE_INDEX)
+ if [[ -n "$SECTION" ]] && [[ -d "$MOONBASE/$SECTION/$1" ]] ; then
+ echo "$SECTION"
+ return 0
+ fi
+
+ # bummer, not found
+ return 1
+}
+
+
+# function : run_details
+# usage : run_details module_name ($MODULE is pre-defined or param)
+# purpose : runs the DETAILS file of a module
+# returns : (0) on success, (1) on failure, error messages on stdout
+run_details() {
+ local TMP_DETAILS
+ debug_msg "run_details ($@)"
+ # Note: run_details doesn't EXIT the code, but merely drops a warning
+ # (return 1), which means that the calling code needs to decide
+ # if this is a problem or not... -sofar
+
+ SECTION=$(find_section $1)
+ if [[ -z "$SECTION" ]] ; then
+ error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${DEFAULT_COLOR}" \
+ "${PROBLEM_COLOR}in ${FILE_COLOR}$MOONBASE${DEFAULT_COLOR}"
+ return 1
+ else
+ SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
+ if ! has_module_file $1 DETAILS ; then
+ error_message "${PROBLEM_COLOR}Module ${MODULE_COLOR}${1}" \
+ "${DEFAULT_COLOR}${PROBLEM_COLOR}has no ${FILE_COLOR}DETAILS" \
+ "${DEFAULT_COLOR}${PROBLEM_COLOR}file!${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ if [[ -z "$WANT_VERSION" ]] ; then
+ run_module_file $1 DETAILS &> /dev/null || return 255
+ else
+ TMP_DETAILS=$(temp_create "details.version")
+ if [[ -e "$MOONBASE/$SECTION/$1/DETAILS.$PLATFORM" ]]; then
+ cat $MOONBASE/$SECTION/$1/DETAILS.$PLATFORM | sed '/^\s*VERSION=/d' > $TMP_DETAILS
+ else
+ cat $MOONBASE/$SECTION/$1/DETAILS | sed '/^\s*VERSION=/d' > $TMP_DETAILS
+ fi
+ VERSION="$WANT_VERSION"
+ . $TMP_DETAILS &> /dev/null || return 255
+ temp_destroy $TMP_DETAILS
+ fi
+ SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
+ MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MODULE}
+ MODULE_PREFIX=${MODULE_PREFIX:-$DEFAULT_PREFIX}
+ if [ "$MODULE_PREFIX" != "$DEFAULT_PREFIX" ]; then
+ export PKG_CONFIG_PATH=$MODULE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
+ export PATH=$PATH:$MODULE_PREFIX/bin
+ fi
+ return 0
+ fi
+}
+
+
+has_module_file()
+{
+ if [[ -e "$SCRIPT_DIRECTORY/$2" ]] || [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+
+# function : run_module_file
+# usage : run_module_file $MODULE $SCRIPTNAME
+# purpose : runs the given script for a pre-defined module
+run_module_file() {
+ debug_msg "run_module_file ($@)"
+ if [[ "$1" == "moonbase" ]] ; then
+ return 0
+ fi
+ if [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
+ . $SCRIPT_DIRECTORY/$2.$PLATFORM
+ elif [[ -e "$SCRIPT_DIRECTORY/$2" ]]; then
+ . $SCRIPT_DIRECTORY/$2
+ fi
+}
+
+
+# function : module_installed
+# usage : module_installed $MODULE
+# purpose : check if $MODULE is installed (or held)
+module_installed()
+{
+ grep -q "^$1:[[:digit:]]*:installed:\|^$1:[[:digit:]]*:held:" $MODULE_STATUS
+}
+
+
+# function : module_held
+# usage : module_held $MODULE
+# purpose : check if $MODULE is held
+module_held() {
+ debug_msg "module_held ($@)"
+ grep -q "^$1:[[:digit:]]*:held:" $MODULE_STATUS
+}
+
+
+module_license_accepted() {
+ #
+ # This code handles acceptance or rejection of certain licenses.
+ #
+ # valid licenses currently are:
+ # osi == gpl gpl2 lgpl gfdl bsd mpl cc apache artistic qpl
+
+ debug_msg "module_license_accepted ($@)"
+
+ local L LICENSE IS_OSI
+ LICENSE=$(run_details $1 > /dev/null ; echo $LICENSE)
+ # assume it's osi if it's empty
+ if [ -z "$LICENSE" ]; then
+ debug_msg "assuming LICENSE=\"osi\""
+ LICENSE="osi"
+ fi
+
+ # check for osi license
+ case $LICENSE in
+ gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl|osi)
+ IS_OSI=yes
+ ;;
+ esac
+
+ # check if $MODULE's $LICENSE is accepted or not, works as follows:
+ # if ACCEPTED_LICENSES is set, LICENSE *must* be listed, else if
+ # REJECTED_LICESES is set, must _NOT_ be listed
+ # * accept "osi" will accept all osi licenses
+ # * accept "all" will accept anything
+ if [[ -n "$ACCEPTED_LICENSES" ]]; then
+ for L in $ACCEPTED_LICENSES; do
+ if [[ "$L" == "osi" ]] && [[ "$IS_OSI" == "yes" ]] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
+ # explicitly accepted license!
+ debug_msg "module_license_accepted: \"$LICENSE\" is explicitly accepted"
+ return 0
+ fi
+ done
+ # it was not explicitly accepted
+ error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is not explicitly accepted${DEFAULT_COLOR}"
+ return 1
+ elif [[ -n "$REJECTED_LICENSES" ]]; then
+ for L in $REJECTED_LICENSES; do
+ if [[ "$LICENSE" == "$L" ]]; then
+ # explicitly rejected license!
+ error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is explicitly rejected${DEFAULT_COLOR}"
+ return 1
+ fi
+ done
+ # implicitly not rejected
+ debug_msg "module_license_accepted: \"$LICENSE\" is not rejected"
+ return 0
+ else ## if [ -z "${ACCEPTED_LICENSES}${REJECTED_LICESES}" ]; then
+ # so now we have a problem - the user didn't set their prefs
+ if [[ "$IS_OSI" != "yes" ]]; then
+ error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" cannot be accepted by default${DEFAULT_COLOR}"
+ return 1
+ fi
+ fi
+}
+
+
+# function : module_exiled
+# usage : module_exiled $MODULE
+# purpose : check if $MODULE is exiled
+module_exiled() {
+ debug_msg "module_exiled ($@)"
+ $(cut -d: -f1,3 $MODULE_STATUS | grep -q "^$1:exiled")
+}
+
+
+# function : installed_version
+# usage : installed_version $MODULE
+# purpose : return the installed version of $MODULE
+installed_version() {
+ debug_msg "installed_version ($@)"
+ grep "^$1:" $MODULE_STATUS | cut -d: -f4
+}
+
+
+# display current moonbase version of $MODULE
+module_version() {
+ debug_msg "module_version($@)"
+ (
+ if run_details $1 ; then
+ echo $VERSION
+ else
+ exit 1
+ fi
+ )
+}
+
+
+# function : hold_modules
+# usage : hold_modules $MODULE [$MODULE....]
+# purpose : put modules on hold
+hold_modules() {
+ local MODULE
+ debug_msg "hold_modules ($@)"
+ if [[ -n "$1" ]] ; then
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ for MODULE in "$@" ; do
+ awk -F: -v mod=$MODULE '{if ($1==mod && $3 == "installed") {print $1":"$2":held:"$4":"$5} else print;}' $MODULE_STATUS > $MODULE_STATUS_BACKUP
+ cp $MODULE_STATUS_BACKUP $MODULE_STATUS
+ done
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+ fi
+}
+
+
+# function : unhold_modules
+# usage : unhold_modules $MODULE [$MODULE....]
+# purpose : put modules on hold back to normal
+unhold_modules () {
+ local MODULE
+ debug_msg "unhold_modules ($@)"
+ if [[ -n "$1" ]] ; then
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ for MODULE in "$@" ; do
+ awk -F: -v mod=$MODULE '{if ($1==mod && $3 == "held") {print $1":"$2":installed:"$4":"$5} else print;}' $MODULE_STATUS > $MODULE_STATUS_BACKUP
+ cp $MODULE_STATUS_BACKUP $MODULE_STATUS
+ done
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+ fi
+}
+
+
+# function : exile_modules
+# usage : exile_modules $MODULE [$MODULE....]
+# purpose : put modules on exile
+exile_modules() {
+ local MODULE
+ debug_msg "exile_modules ($@)"
+ if [[ -n "$1" ]] ; then
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ for MODULE in "$@" ; do
+ if $(module_installed $MODULE); then
+ error_message "${PROBLEM_COLOR}Cannot exile installed module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
+ else
+ echo "$MODULE::exiled::" >> $MODULE_STATUS_BACKUP
+ cp $MODULE_STATUS_BACKUP $MODULE_STATUS
+ fi
+ done
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+ fi
+}
+
+
+# function : unexile_modules
+# usage : unexile_modules $MODULE [$MODULE....]
+# purpose : put modules on exile back to normal
+unexile_modules () {
+ local MODULE
+ debug_msg "unexile_modules ($@)"
+ if [ -n "$1" ] ; then
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ for MODULE in "$@" ; do
+ grep -v "^$MODULE:" $MODULE_STATUS > $MODULE_STATUS_BACKUP
+ cp $MODULE_STATUS_BACKUP $MODULE_STATUS
+ done
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+ fi
+}
+
+
+# function : remove_module
+# usage : remove_module; but $MODULE must be defined earlier
+# purpose : removed a module from the MODULE_STATUS files, no source removal
+remove_module() {
+ debug_msg "remove_module ($@)"
+
+ # catch this on new boxes:
+ if [ ! -f $MODULE_STATUS ] ; then
+ touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
+ fi
+
+ verbose_msg "updating lunar state files after module removal"
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ grep -v "^$1:" $MODULE_STATUS > $MODULE_STATUS_BACKUP
+ cp $MODULE_STATUS_BACKUP $MODULE_STATUS
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+}
+
+
+# function: add_module
+# usage : add_module <module_name>
+# purpose : adds the 1st parameter as the module name to the MODULE_STATUS files
+add_module() {
+ debug_msg "add_module ($@)"
+
+ # catch this on new boxes:
+ if [ ! -f $MODULE_STATUS ] ; then
+ touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
+ fi
+
+ verbose_msg "updating lunar state files after module installation"
+ lock_file $MODULE_STATUS_BACKUP &&
+ lock_file $MODULE_STATUS &&
+ if [ -s $MODULE_STATUS ]; then
+ grep -v "^$1:" $MODULE_STATUS_BACKUP > $MODULE_STATUS 2>/dev/null
+ fi &&
+ echo "$1:$(date -u +%Y%m%d):$2:$3:$4" >> $MODULE_STATUS &&
+ cp $MODULE_STATUS $MODULE_STATUS_BACKUP
+ unlock_file $MODULE_STATUS
+ unlock_file $MODULE_STATUS_BACKUP
+}
+
+
+# function : purge_modules
+# usage : purge_modules
+# purpose : purge modules that were removed from moonbase
+purge_modules() {
+ local MODULE
+ debug_msg "purge_modules ($@)"
+ verbose_msg "Discovering modules that were removed from moonbase"
+ # safetynet: don't wipe everything
+ if [ $(list_moonbase | wc -l) -lt 100 ]; then
+ error_message "${PROBLEM_COLOR}Error: ${DEFAULT_COLOR}${MESSAGE_COLOR} your moonbase seems damaged. Re-lin moonbase to fix.${DEFAULT_COLOR}"
+ exit 1
+ fi
+ for MODULE in $(list_installed | grep -v "^moonbase$") ; do
+ (
+ if ! run_details $MODULE &> /dev/null ; then
+ message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} was removed from ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
+ if query "Do you want to remove ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${QUERY_COLOR} ?" y ; then
+ lrm $MODULE
+ continue
+ else
+ message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is kept and can be removed manually later${DEFAULT_COLOR}"
+ fi
+ fi
+ )
+ done
+}
+
+
+module_is_expired() {
+ debug_msg "module_is_expired ($@)"
+ (
+ if [ -z "$MODULE" ] ; then
+ MODULE=$1
+ fi
+ LINE=$(grep "^$MODULE:" $MODULE_STATUS | grep -v "^moonbase" | awk -F: '{print "IDATE="$2" STATUS="$3" IVERSION="$4}')
+ eval $LINE
+ if run_details $MODULE &> /dev/null ; then
+ if [[ "$STATUS" == "installed" ]] ; then
+ if [[ "$VERSION" != "$IVERSION" ]] || [[ -z "$IDATE" ]] ||
+ (( "$UPDATED" > "$IDATE" )) ; then
+ if [[ "$MODULE" != "lunar" ]] && [[ "$MODULE" != "theedge" ]] ; then
+ return 0
+ fi
+ fi
+ fi
+ fi
+ # nope... it's not expired
+ return 255
+ )
+}
+
+
+# function : list_expired_modules
+# usage : list_expired_modules
+# purpose : return a list of modules that need to be updated
+list_expired_modules() {
+ local MODULE
+ debug_msg "list_expired_modules ($@)"
+ for MODULE in $(list_installed) ; do
+ if $(module_is_expired $MODULE) ; then
+ echo "$MODULE"
+ fi
+ done
+}
+
+
+# function : update_modules
+# usage : update_modules
+# purpose : update all installed modules that need to be updated
+update_modules() {
+ local IFS LIST QUEUE MODULE
+ debug_msg "update_modules ($@)"
+
+ export IFS="$STANDARD_IFS"
+
+ verbose_msg "Searching for modules to update"
+ LIST=$(list_expired_modules)
+
+ if [ -z "$LIST" ] ; then
+ verbose_msg "Nothing to update!"
+ return 255
+ fi
+
+ verbose_msg "Sorting update queue"
+ QUEUE=$(sort_by_dependency $LIST)
+
+ message "${MESSAGE_COLOR}The following modules will be updated:${DEFAULT_COLOR}"
+ TMP_QUEUE=$(temp_create "update-queue")
+ for MODULE in $QUEUE ; do
+ echo $MODULE >> $TMP_QUEUE
+ echo $MODULE
+ done
+
+ unset MODULE
+ if query "Do you wish to edit the update queue ? " n ; then
+ edit_file $TMP_QUEUE
+ fi
+ QUEUE=$(cat $TMP_QUEUE)
+ temp_destroy $TMP_QUEUE
+
+ if [ -n "$QUEUE" ] ; then
+ lin -c $QUEUE
+ else
+ verbose_msg "Nothing to update!"
+ return 255
+ fi
+}
+
+
+
+check_blacklist() {
+ debug_msg "check_blacklist ($@)"
+ if [ -f /var/state/lunar/blacklist.$PLATFORM ] ; then
+ if grep "^$MODULE$" /var/state/lunar/blacklist.$PLATFORM ; then
+ error_message "${PROBLEM_COLOR}ERROR:${DEFAULT_COLOR}${MESSAGE_COLOR} Module ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is blacklisted and will not be installed!${DEFAULT_COLOR}"
+ exit 0
+ fi
+ fi
+}
+
+
diff --git a/libs/moonbase.lunar b/libs/moonbase.lunar
new file mode 100644
index 0000000..4b0342b
--- /dev/null
+++ b/libs/moonbase.lunar
@@ -0,0 +1,97 @@
+#!/bin/bash
+# #
+# moonbase.lunar - get moonbase from the net #
+# #
+############################################################
+# #
+# Copyrighted Auke Kok 2002 under GPLv2 #
+# #
+############################################################
+
+
+get_moonbase () {
+(
+ debug_msg "get_moonbase ($@)"
+ if $(module_held "moonbase") ; then
+ verbose_msg "Skipping compile and install for held module \"moonbase\""
+ return
+ fi
+
+ SYSTEM_MOONBASE=/var/lib/lunar/moonbase
+
+ # prevent using stale copies of moonbase. You can still override moonbase's
+ # URL with `lunar set MOONBASE_URL[0] http://.....
+ unset LRESORT_URL FRESORT_URL
+
+ # the following overrides run_details:
+ run_details() {
+ debug_msg " run_details ($@)"
+ MODULE=moonbase
+ VERSION=`date -u +%Y%m%d.%H`
+ SOURCE=$MODULE.tar.bz2
+ SOURCE_URL=$MOONBASE_URL
+ PARTIAL=off
+ CLEAR_CACHE=on
+ }
+
+ # make sure we set these values up front to be sure
+ run_details moonbase
+ rm -f $TMPDIR/$SOURCE
+
+ if [ ! -d "$SYSTEM_MOONBASE" ] ; then
+ mkdir -p $SYSTEM_MOONBASE
+ fi
+
+ if [ ! -d "$SYSTEM_MOONBASE/zlocal" ] ; then
+ mkdir -p $SYSTEM_MOONBASE/zlocal
+ fi
+
+ if [ "$SYSTEM_MOONBASE" == "$MOONBASE" ]; then
+ push_uniq_id
+ if ! download_module $MODULE ; then
+ OUTCOME=failed
+ INFO="Could not download a fresh moonbase"
+ else
+ message "${MESSAGE_COLOR}Preparing to install ${FILE_COLOR}${SOURCE}" \
+ "${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
+ mv $SYSTEM_MOONBASE/zlocal/ /var/lib/lunar/.zlocal-backup &&
+ rm -rf $SYSTEM_MOONBASE &&
+ TMP_MODULE_INDEX=$(temp_create "temp.module.index") &&
+ cp $MODULE_INDEX $TMP_MODULE_INDEX &&
+ lrm moonbase &&
+ mkdir $SYSTEM_MOONBASE &&
+ mv /var/lib/lunar/.zlocal-backup $SYSTEM_MOONBASE/zlocal &&
+ message "${MESSAGE_COLOR}Extracting ${FILE_COLOR}${SOURCE}" \
+ "${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
+ bzcat $SOURCE_CACHE/$SOURCE | tar xv -C /var/lib/lunar | \
+ sed "s:^:/var/lib/lunar/:g" > $INSTALL_LOGS/$MODULE-$VERSION &&
+ echo $INSTALL_LOGS/$MODULE-$VERSION >> $INSTALL_LOGS/$MODULE-$VERSION &&
+ echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $INSTALL_LOGS/$MODULE-$VERSION &&
+ message "${MESSAGE_COLOR}Created ${FILE_COLOR}$INSTALL_LOGS/$MODULE-$VERSION" \
+ "${DEFAULT_COLOR}${MESSAGE_COLOR}${DEFAULT_COLOR}" &&
+ # create an md5sum log
+ create_md5sum_log &&
+
+ add_module $MODULE installed $VERSION $(du -ks $SYSTEM_MOONBASE | cut -f1)KB &&
+ OUTCOME=success || OUTCOME=failed
+ fi
+ fi
+
+ if [ "$OUTCOME" != "failed" ] ; then
+ # get ready to regenerate the module index cache file
+ create_module_index &&
+ create_depends_cache &&
+ update_plugins &&
+ display_moonbase_changes &&
+ temp_destroy $TMP_MODULE_INDEX &&
+ OUTCOME=success || OUTCOME=failed
+ fi
+
+ activity_log "lin" "moonbase" "$VERSION" "$OUTCOME" "$INFO"
+ if [ "$OUTCOME" == "failed" ] ; then
+ return 1
+ fi
+)
+}
+
+
diff --git a/libs/optimize.lunar b/libs/optimize.lunar
new file mode 100644
index 0000000..c8826f6
--- /dev/null
+++ b/libs/optimize.lunar
@@ -0,0 +1,68 @@
+#!/bin/bash
+############################################################
+# #
+# optimize.lunar - Lunar general optimization code #
+# #
+############################################################
+# #
+# Copyright 2006 by Auke Kok under GPLv2 #
+# #
+############################################################
+
+
+bad_flags()
+{
+ debug_msg "bad_flags ($@)"
+ verbose_msg "bad_flags \"$@\""
+
+ # maintain some degree of backward compatibility here
+ if [[ "$1" == "ALL" ]]; then
+ unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+ elif [[ "$1" == "compiler" ]]; then
+ unset CFLAGS CXXFLAGS CPPFLAGS
+ elif [[ "$1" == "linker" ]]; then
+ unset LDFLAGS
+ else
+ for BAD_FLAG in "$@" ; do
+ CFLAGS=$(echo $CFLAGS | sed "s/$BAD_FLAG//")
+ CXXFLAGS=$(echo $CXXFLAGS | sed "s/$BAD_FLAG//")
+ CPPFLAGS=$(echo $CPPFLAGS | sed "s/$BAD_FLAG//")
+ LDFLAGS=$(echo $LDFLAGS | sed "s/$BAD_FLAG//")
+ done
+ fi
+}
+
+
+optimize_menu()
+{(
+ export IFS=$'\t\n'
+ while true; do
+ if [ -z "$(plugin_call OPTIMIZE_MENU)" ]; then
+ $DIALOG --msgbox "There are no configurable compontents. Please update your moonbase!" 6 60
+ return
+ fi
+ PLUGIN=`$DIALOG --cancel-label "Close" --default-item "$PLUGIN" --menu "Select a component for which to configure optimizations" 0 0 0 $(plugin_call OPTIMIZE_MENU)`
+ if [ $? != 0 ]; then
+ return
+ fi
+
+ plugin_call OPTIMIZE_MENU $PLUGIN
+ done
+)}
+
+
+# because we pretty much need to know our $BUILD string
+# everywhere this code is separate and guides all other
+# parts of lunar where related things are done. Here we
+# autodetect the most important part but leave it open
+# to the user to override it
+
+# PLATFORM - translated uname -m / arch
+PLATFORM=$(uname -m | sed 's/i[3456]86/x86/')
+# BUILD -
+case $PLATFORM in
+ x86|x86_64)
+ BUILD=$(uname -m)-pc-linux-gnu ;;
+ *)
+ BUILD=$(uname -m | sed 's/.*/\L&/g')-linux-gnu ;;
+esac
diff --git a/libs/plugins.lunar b/libs/plugins.lunar
new file mode 100644
index 0000000..77640e9
--- /dev/null
+++ b/libs/plugins.lunar
@@ -0,0 +1,129 @@
+#!/bin/bash
+############################################################
+# #
+# plugins.lunar - Lunar plugin code #
+# #
+############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+############################################################
+
+#
+# plugin handler return status convention:
+#
+# when a handler is called, it should use the following return codes
+#
+# 0 - OK AND HALT, do not process other plugins
+# 1 - FAIL, stop executing plugins and report an error
+# 2 - OK AND CONTINUE or CONTINUE, run other plugins
+#
+
+plugin_register() {
+ # first arg: plugin type
+ # second arg: function hook name
+ # Defined plugin types:
+ # 1 - SOURCE_DOWNLOAD download some source code
+ # 2 - SOURCE_NEEDREFRESH source exists but needs refresh
+ # 3 - SOURCE_VERIFY perform integrity verification on a file
+ # 4 - SOURCE_UNPACK unpack a certain file to $(PWD)
+ # 5 - MODULE_CHECK integrity checking on installed modules
+ # 6 - KERNEL_UPDATEBOOTLOADER automate bootloader maintenance
+ # 7 - BUILD_CONFIGURE called before running CONFIGURE
+ # 8 - BUILD_PRE_BUILD ,, ,, ,, PRE_BUILD
+ # 9 - BUILD_BUILD ,, ,, ,, BUILD
+ # 10 - BUILD_INSTALL ,, ,, ,, INSTALL
+ # 11 - BUILD_POST_BUILD ,, ,, ,, POST_BUILD
+ # 12 - BUILD_POST_INSTALL ,, ,, ,, POST_INSTALL
+ # 13 - BUILD_PRE_REMOVE ,, ,, ,, PRE_REMOVE
+ # 14 - BUILD_POST_REMOVE ,, ,, ,, POST_REMOVE
+ # 15 - OPTIMIZE_MENU Display optimization menu's
+ LUNAR_PLUGINS=(${LUNAR_PLUGINS[@]} "$1:$2")
+ ((LUNAR_PLUGIN_COUNT++))
+ debug_msg "Registered plugin #$LUNAR_PLUGIN_COUNT, $1 -> $2()"
+}
+
+
+plugin_call() {
+ local REQUESTED_TYPE COUNT THIS_TYPE THIS_HANDLER RETVAL
+ debug_msg "plugin_call($@)"
+ # scan available plugins for plugin_type $1 and pass args to it
+ REQUESTED_TYPE=$1
+ shift
+ for ((COUNT=0; COUNT < $LUNAR_PLUGIN_COUNT; COUNT++)); do
+ THIS_TYPE=${LUNAR_PLUGINS[$COUNT]%%:*}
+ THIS_HANDLER=${LUNAR_PLUGINS[$COUNT]#*:}
+ if [ "$REQUESTED_TYPE" == "$THIS_TYPE" ]; then
+ # we have identified a valid plugin for this type
+ $THIS_HANDLER $@
+ RETVAL=$?
+ if [ $RETVAL -eq 2 ]; then
+ continue
+ else
+ debug_msg "plugin $THIS_HANDLER returned \"$RETVAL\""
+ return $RETVAL
+ fi
+ fi
+ done
+ debug_msg "Finished running all plugins for type \"$REQUESTED_TYPE\""
+ return 2
+}
+
+
+update_plugin() {
+ local SECTION PLUGIN
+ debug_msg "update_plugin($@)"
+ # update plugins of all modules or a specific one
+ #
+ # $1 - module name
+ # $2 - forced removal of plugin
+ #
+ # scan module for plugins, and add/delete them as needed
+ if SECTION=$(find_section $1); then
+ if [ -d $MOONBASE/$SECTION/$1/plugin.d ]; then
+ if [ "$2" == "install" ] ; then
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Installed \"$(basename $PLUGIN)\""
+ install -m644 $PLUGIN $PLUGIN_DIR/
+ done
+ elif [ "$2" == "remove" ] || ! module_installed $1 ; then
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Removed \"$(basename $PLUGIN)\""
+ rm -f $PLUGIN_DIR/$(basename $PLUGIN)
+ done
+ else
+ for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
+ debug_msg "Installed \"$(basename $PLUGIN)\""
+ install -m644 $PLUGIN $PLUGIN_DIR/
+ done
+ fi
+ fi
+ reload_plugins
+ fi
+}
+
+
+update_plugins() {
+ local MODULE
+ debug_msg "update_plugins($@)"
+ # find all plugins in moonbase and run update_plugin() on them
+ verbose_msg "Updating plugins"
+ find $MOONBASE -wholename "*/plugin.d/*.plugin" | while read PLUGIN ; do
+ update_plugin `basename $(echo $PLUGIN | sed 's/\/plugin.d\/.*//g')`
+ done
+}
+
+
+reload_plugins() {
+ local ITERATOR
+ debug_msg "reload_plugins($@)"
+
+ # Unload current plugins
+ unset LUNAR_PLUGINS
+
+ for ITERATOR in $PLUGIN_DIR/*.plugin; do
+ . $ITERATOR
+ done
+}
+
+
diff --git a/libs/prune.lunar b/libs/prune.lunar
new file mode 100644
index 0000000..ab2167c
--- /dev/null
+++ b/libs/prune.lunar
@@ -0,0 +1,86 @@
+#!/bin/bash
+# #
+# prune.lunar - Lunar prune code #
+# #
+############################################################
+# #
+# Copyright 2003 by Auke Kok under GPLv2under GPLv2 #
+# #
+############################################################
+
+
+# function : prune
+# usage : prune
+# purpose : prune all old logs, source copy's, install caches
+prune() {
+ local TMP_SPOOL_KEEP TMP_CACHE_KEEP MODULE SOURCE VERSION FILE LOGS
+ debug_msg "prune ($@)"
+
+ if [ -z "$BUILD" ] ; then
+ eval $(grep BUILD= /etc/lunar/local/optimizations)
+ fi
+
+ TMP_SPOOL_KEEP=$(temp_create "spool-keep")
+ TMP_CACHE_KEEP=$(temp_create "cache-keep")
+
+ message "${MESSAGE_COLOR}Generating keep lists...${DEFAULT_COLOR}"
+ for MODULE in $(list_installed) ; do
+ # spool:
+ if [ ! "$MODULE" == "moonbase" ]; then
+ for SOURCE in $(sources $MODULE) ; do
+ echo $SOURCE >> $TMP_SPOOL_KEEP
+ done
+ # cache:
+ VERSION=$(installed_version $MODULE)
+
+ echo "$MODULE-$VERSION-$BUILD.tar.bz2" >> $TMP_CACHE_KEEP
+ fi
+ done
+ echo "README" >> $TMP_SPOOL_KEEP
+ echo "cpan" >> $TMP_SPOOL_KEEP
+
+ verbose_msg "finding stale source files"
+ for FILE in $(ls -1 $SOURCE_CACHE); do
+ if ! grep -q $FILE $TMP_SPOOL_KEEP ; then
+ message "Removing stale source: $SOURCE_CACHE/$FILE"
+ rm -f $SOURCE_CACHE/$FILE
+ fi
+ done
+ temp_destroy $TMP_SPOOL_KEEP
+
+ verbose_msg "finding stale install caches"
+ for FILE in $(ls -1 $INSTALL_CACHE); do
+ if ! grep -q $FILE $TMP_CACHE_KEEP ; then
+ message "Removing stale install cache: $INSTALL_CACHE/$FILE"
+ rm -f $INSTALL_CACHE/$FILE
+ fi
+ done
+ temp_destroy $TMP_CACHE_KEEP
+
+ # the log files are easy:
+ LOGS=$(cat $MODULE_STATUS | cut -d: -f1,4 --output-delimiter="-")
+
+ verbose_msg "finding stale install logs"
+ for FILE in $(ls -1 $INSTALL_LOGS) ; do
+ if ! echo -e "$LOGS" | grep -q $FILE ; then
+ message "Removing stale log: $INSTALL_LOGS/$FILE"
+ rm $INSTALL_LOGS/$FILE
+ fi
+ done
+
+ verbose_msg "finding stale compile logs"
+ for FILE in $(ls -1 $COMPILE_LOGS | sed "s/\.bz2//") ; do
+ if ! echo -e "$LOGS" | grep -q $FILE ; then
+ message "Removing stale log: $COMPILE_LOGS/$FILE.bz2"
+ rm $COMPILE_LOGS/$FILE.bz2
+ fi
+ done
+
+ verbose_msg "finding stale md5sum logs"
+ for FILE in $(ls -1 $MD5SUM_LOGS) ; do
+ if ! echo -e "$LOGS" | grep -q $FILE ; then
+ message "Removing stale log: $MD5SUM_LOGS/$FILE"
+ rm $MD5SUM_LOGS/$FILE
+ fi
+ done
+}
diff --git a/libs/queue.lunar b/libs/queue.lunar
new file mode 100644
index 0000000..294ff18
--- /dev/null
+++ b/libs/queue.lunar
@@ -0,0 +1,88 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/queue #
+# includes add_queue and remove_queue #
+# #
+# 20020527 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# Definition:
+# a queue is a multielement data structure from which elements
+# can be removed only in the same order in which they are inserted;
+# that is, it follows a FIFO constraint.
+
+# function: add_queue
+# usage : add_queue <file_name> <item_name>
+# purpose : adds an item to the end of a queue
+
+add_queue() {
+ debug_msg "add_queue ($@)"
+ in_queue() {
+ debug_msg " in_queue ($@)"
+ grep -q "^"$2"\$" $1 && return 0 || return 1
+ }
+
+ [ "$#" -ne 2 ] && return 1
+
+ [ -f "$1" ] || touch $1 2>/dev/null || return 1
+
+ lock_file $1 &&
+ ! in_queue $1 $2 && echo "$2" >> $1
+ unlock_file $1
+}
+
+# function: remove_queue
+# usage : remove_queue <file_name> |name|
+# purpose : removes an item from a queue OR pops the first element from a queue
+
+remove_queue() {
+ debug_msg "remove_queue ($@)"
+
+ [ -f "$1" ] || return 1
+
+ if [ -n "$2" ];
+ then
+ TMP_QUEUE="$TMPDIR/lunar_remove_queue.$$"
+ rm -f $TMP_QUEUE 2>/dev/null
+ lock_file $1 &&
+ cat $1 | grep -v "^"$2"\$" > $TMP_QUEUE
+ cat $TMP_QUEUE > $1
+ unlock_file $1
+ rm -f $TMP_QUEUE 2>/dev/null
+ else
+ lock_file $1 &&
+ echo `cat $1 | sed 1!d` &&
+ cat $1 | sed "1d" > $1 &&
+ unlock_file $1
+ fi
+}
+
+
+push_install_queue() {
+ debug_msg "push_install_queue ($@)"
+ remove_queue $REMOVE_QUEUE "$1"
+ remove_queue $INSTALL_QUEUE "$1"
+ ! module_installed "$1" &&
+ add_queue $INSTALL_QUEUE "$1"
+}
+
+
+push_remove_queue() {
+ debug_msg "push_remove_queue ($@)"
+ remove_queue $INSTALL_QUEUE "$1"
+ remove_queue $REMOVE_QUEUE "$1"
+ module_installed "$1" &&
+ add_queue $REMOVE_QUEUE "$1"
+}
+
+
diff --git a/libs/recovery.lunar b/libs/recovery.lunar
new file mode 100644
index 0000000..9e20796
--- /dev/null
+++ b/libs/recovery.lunar
@@ -0,0 +1,127 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/recovery #
+# includes rebuild_status_files, replace_status_file, #
+# check_status_files #
+# 20020528 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# function : rebuild_status_files
+# usage : rebuild_status_files
+# purpose : rebuild the accidentally deleted status files
+rebuild_status_files() {
+ debug_msg "rebuild_status_files ($@)"
+
+ if ! query \
+ "Do you want to re-construct the status files from install logs?" y; then
+ message "${PROBLEM_COLOR}Unable to continue without status files" \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if ! [ -d "$INSTALL_LOGS" ]; then
+ message "${PROBLEM_COLOR}Unable to continue without install logs " \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ message "${MESSAGE_COLOR}Re-creating status files." \
+ "${DEFAULT_COLOR}"
+
+ LOG_FILES=$(ls -rt $INSTALL_LOGS)
+ for MODULE_NAME in $LOG_FILES; do
+ COUNTS=3
+ REAL_NAME=$MODULE_NAME
+ unset SECTION
+ while [ "$COUNTS" -gt "0" ]; do
+ REAL_NAME=$(echo $REAL_NAME | cut -d "-" -f -"$COUNTS")
+ SECTION=$(find_section $REAL_NAME)
+ if [ -n "$SECTION" ]; then
+ ((COUNTS++))
+ VERSION=$(echo $MODULE_NAME | cut -d "-" -f "$COUNTS"-)
+ SIZE=$(find_module_size $REAL_NAME $VERSION)
+ DATE=$(ls -l $INSTALL_LOGS/$REAL_NAME-$VERSION --time-style=+%Y%m%d | awk '{print $6}')
+ remove_module "$REAL_NAME" &&
+ # adjusted add_module code that echos the DATE field ;^)
+ lock_file $MODULE_STATUS &&
+ lock_file $MODULE_STATUS_BACKUP &&
+ echo "$REAL_NAME:$DATE:installed:$VERSION:$SIZE" >>$MODULE_STATUS &&
+ cat $MODULE_STATUS >$MODULE_STATUS_BACKUP &&
+ unlock_file $MODULE_STATUS_BACKUP &&
+ unlock_file $MODULE_STATUS &&
+
+ message "Added: $REAL_NAME-$VERSION ($SIZE) ($DATE)"
+ break
+ fi
+ ((COUNTS--))
+ done
+ done
+
+ message "${MESSAGE_COLOR}Success!!${DEFAULT_COLOR}\n"
+}
+
+
+# function : replace_status_file
+# usage : replace_status_file
+# purpose : cp $MODULE_STATUS_BACKUP $MODULE_STATUS via query
+replace_status_file() {
+ debug_msg "replace_status_file ($@)"
+
+ if ! [ -f "$MODULE_STATUS_BACKUP" ]; then rebuild_status_files; return; fi
+ message "${PROBLEM_COLOR}Unable to find MODULE_STATUS file" \
+ "${MODULE_COLOR}$MODULE_STATUS" \
+ "${DEFAULT_COLOR}"
+
+ if query "Do you want to use the backup?" y; then
+ if ! [ -f "$MODULE_STATUS_BACKUP" ]; then rebuild_status_files; fi
+ if `cp $MODULE_STATUS_BACKUP $MODULE_STATUS`; then
+ message "${MESSAGE_COLOR}Success!!" \
+ "${DEFAULT_COLOR}"
+ else
+ message "${PROBLEM_COLOR}Unsuccessful :=( No more operation!!" \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+ else
+ message "${PROBLEM_COLOR}Unable to continue without that :=("\
+ "No more operation!!" \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+}
+
+# function : check_status_files
+# usage : check_status_files
+# purpose : checks the avail of MODULE_STATUS and MODULE_STATUS_BACKUP files
+check_status_files() {
+ debug_msg "check_status_files ($@)"
+ if ! [ -f "$MODULE_STATUS" ]; then replace_status_file; fi
+ if ! [ -f "$MODULE_STATUS" ]; then echo "Unknown error!!!"; exit; fi
+ if ! [ -f "$MODULE_STATUS_BACKUP" ]; then
+ message "${PROBLEM_COLOR}Unable to find MODULE_STATUS_BACKUP file" \
+ "${MODULE_COLOR}$MODULE_STATUS_BACKUP" \
+ "${DEFAULT_COLOR}"
+ if `cp $MODULE_STATUS $MODULE_STATUS_BACKUP`; then
+ message "${MESSAGE_COLOR}MODULE_STATUS is successfully copied" \
+ "to MODULE_STATUS_BACKUP" \
+ "${DEFAULT_COLOR}"
+ else
+ message "${PROBLEM_COLOR}Unsuccessful while copying" \
+ "MODULE_STATUS to MODULE_STATUS_BACKUP :=( " \
+ "No more operation!!" \
+ "${DEFAULT_COLOR}"
+ exit 1
+ fi
+ fi
+}
+
diff --git a/libs/sizes.lunar b/libs/sizes.lunar
new file mode 100644
index 0000000..77a44a9
--- /dev/null
+++ b/libs/sizes.lunar
@@ -0,0 +1,56 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/sizes #
+# includes find_module_size #
+# #
+# 20020527 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# function: find_module_size
+# usage : find_module_size <module> |version|
+# purpose : finds the installed size of module in KB
+find_module_size() {
+ local VERSION LINE SIZE0 SIZE
+ #this functions checks the modules file if there is already size entry
+ module_size()
+ {
+ local SIZE
+ unset SIZE
+ [ -e "$MODULE_STATUS" ] &&
+ SIZE=`grep "^$1\:" $MODULE_STATUS | cut -d ":" -f 5-5`
+ [ -n "$SIZE" ] && echo ${SIZE} || false
+ }
+
+ [ -z "$1" ] && return
+
+ [ -n "$2" ] && VERSION=$2 || VERSION=`installed_version $1`
+ [ -z "$VERSION" ] &&
+ message "${PROBLEM_COLOR}$1 is not installed${DEFAULT_COLOR}" &&
+ return
+
+ # yes, there is a size entry
+ module_size $1 $VERSION && return
+
+ # no :( lets dig through logs
+ [ -e "$INSTALL_LOGS/$MODULE-$VERSION" ] &&
+ while read LINE
+ do
+ [ -f "$LINE" ] &&
+ SIZE0=`du "$LINE" |
+ cut -f 1-1` &&
+ SIZE=$((SIZE0+SIZE))
+ done <$INSTALL_LOGS/$MODULE-$VERSION &&
+ echo ${SIZE}KB ||
+ message "${PROBLEM_COLOR}Install log for $1 is not found${DEFAULT_COLOR}"
+}
+
diff --git a/libs/sources.lunar b/libs/sources.lunar
new file mode 100644
index 0000000..cd03349
--- /dev/null
+++ b/libs/sources.lunar
@@ -0,0 +1,219 @@
+#!/bin/bash
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/sources #
+# includes sources, md5_verify_source, verify_sources #
+# verify_source #
+# #
+# 20020604 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+
+verify_source() {
+ local VERIFIED SOURCE_FILE
+ debug_msg "verify_source ($@)"
+ VERIFIED="true"
+ for SOURCE_FILE in $@ ; do
+ if [ ! -f $SOURCE_CACHE/$1 ] ; then
+ message "${PROBLEM_COLOR}Missing ${FILE_COLOR}${1}${DEFAULT_COLOR}"
+ message "${PROBLEM_COLOR}Lunar Install aborting.${DEFAULT_COLOR}"
+ activity_log "lin" "$MODULE" "$VERSION" "failed" "because it was missing source: $1"
+ return 1
+ fi
+ done
+}
+
+
+# function : sources
+# usage : sources <module_name>
+# purpose : displays the sources needed for a given module
+sources() {
+(
+ debug_msg "sources ($@)"
+ MAX_SOURCES=${MAX_SOURCES:-100}
+
+ if ! run_details $1 ; then
+ return 1
+ fi
+
+ for (( CNT=0; CNT<=$MAX_SOURCES; CNT++ )) ; do
+ TEMP=SOURCE$((CNT))
+ TEMP=${TEMP/SOURCE0/SOURCE}
+
+ eval SRC1=\$${TEMP}
+ eval SRC2=\$SOURCE$((CNT+1))
+ eval SRC3=\$SOURCE$((CNT+2))
+
+ if [ -n "$SRC1" ] ; then
+ echo $SRC1
+ fi
+
+ #if two consequtive empty sources, then break
+ [ -z "$SRC2" ] && [ -z "$SRC3" ] && {
+ break
+ }
+ done
+)
+}
+
+
+erase() {
+ debug_msg "erase ($@)"
+ if [ "$PARTIAL" == "off" ]; then
+ debug_msg "erase: deleting \"$1\""
+ rm -f $1
+ fi
+}
+
+
+unpack() {
+ local FILENAME
+ debug_msg "unpack ($@)"
+
+ FILENAME=$SOURCE_CACHE/$1
+ verbose_msg "Unpacking \"$FILENAME\" in \"$(pwd)\""
+ plugin_call SOURCE_UNPACK $SOURCE_CACHE/$1
+
+ if [ "$?" != 0 ] ; then
+ message "${PROBLEM_COLOR}! Error while unpacking ${FILE_COLOR}$SOURCE_CACHE/$1${DEFAULT_COLOR}${PROBLEM_COLOR}${DEFAULT_COLOR}"
+ return 1
+ fi
+}
+
+
+# usage: verify_all_sources $MODULE
+# check all sources regarding verification method
+verify_all_sources() {
+(
+ debug_msg "verify_all_sources ($@)"
+ MAX_SOURCES=${MAX_SOURCES:-100}
+
+ if ! run_details $1 ; then
+ return 1
+ fi
+
+ if [ -n "$WANT_VERSION" ] ; then
+ message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR} Integrity checking is disabled when using \"--want\"!${DEFAULT_COLOR}"
+ return 0
+ fi
+
+ for (( C=0 ; C<=$MAX_SOURCES ; C++ )) ; do
+ TEMP=SOURCE$((C))
+ TEMP=${TEMP/SOURCE0/SOURCE}
+ eval SRC1=\$${TEMP}
+
+ # it needs to exist prior before we can check it:
+ if ! verify_source $SRC1 ; then
+ return 1
+ fi
+ eval VFYS=\${${TEMP}_VFY[@]}
+
+ # cumulate result:
+ unset RESULT
+ if [ -n "$VFYS" ] ; then
+ # we need to check ALL args for validity... if one fails we should not
+ # trust the source
+ for VFY in $VFYS ; do
+ plugin_call SOURCE_VERIFY $SRC1 $VFY
+ if [ $? == 1 ]; then
+ RESULT=1
+ fi
+ done
+ # so what if?
+ if [ "$RESULT" == "1" ] ; then
+ # remove?
+ MODULE=$1
+ message "${MESSAGE_COLOR}You should remove ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}${MESSAGE_COLOR} !${DEFAULT_COLOR}"
+
+ if query "Remove \"$SOURCE_CACHE/$SRC1\" ? " y ; then
+ rm -f $SOURCE_CACHE/$SRC1
+ fi
+ fi
+ fi
+
+ # our fallthrough as usual:
+ eval SRC2=\$SOURCE$((C+1));
+ eval SRC3=\$SOURCE$((C+2));
+ [ -z "$SRC2" ] && [ -z "$SRC3" ] && break
+ done
+
+ # result?
+ if [ -n "$RESULT" ] ; then
+ return 1
+ fi
+
+ # if we removed something we better make sure we break:
+ if ! verify_source $(sources $1) ; then
+ return 1
+ fi
+)
+}
+
+
+rm_source_dir() {
+ local DEAD_DIR
+ debug_msg "rm_source_dir ($@)"
+
+ if [ "$KEEP_SOURCE" == "on" ] ; then
+ return 0
+ fi
+
+ cd $BUILD_DIRECTORY
+ DEAD_DIR=$1
+ DEAD_DIR=${DEAD_DIR:-$SOURCE_DIRECTORY}
+
+ verbose_msg "destroying building dir \"$DEAD_DIR\""
+ rm -rf $DEAD_DIR 2> /dev/null
+}
+
+
+mk_source_dir() {
+ local NEW_DIR
+ debug_msg "mk_source_dir ($@)"
+
+ # yes this sounds weird but it might happen: no dir $BUILD_DIRECTORY on
+ # clean boxes!
+ if [ ! -e "$BUILD_DIRECTORY" ] ; then
+ mkdir -p "$BUILD_DIRECTORY"
+ fi
+ cd "$BUILD_DIRECTORY"
+ NEW_DIR=$1
+ NEW_DIR=${NEW_DIR:-$SOURCE_DIRECTORY}
+
+ verbose_msg "creating building dir \"$NEW_DIR\""
+ if [ -d $NEW_DIR ] ; then
+ verbose_msg "Removing old source directory first!"
+ rm -rf $NEW_DIR 2>/dev/null
+ fi
+ mkdir -p $NEW_DIR
+}
+
+
+validate_source_dir() {
+ debug_msg "validate_source_dir ($@)"
+
+ verbose_msg "validating \"$SOURCE_DIRECTORY\""
+ if [ -n "$SOURCE_DIRECTORY" ] &&
+ [ "$SOURCE_DIRECTORY" != "$BUILD_DIRECTORY" ] &&
+ echo "$SOURCE_DIRECTORY" | grep -q "$BUILD_DIRECTORY"
+ then
+ true
+ else
+ message "\$SOURCE_DIRECTORY and \$BUILD_DIRECTORY must not be the same."
+ message "\$SOURCE_DIRECTORY must not be empty."
+ message "\$SOURCE_DIRECTORY must be a subdirectory of \$BUILD_DIRECTORY"
+ false
+ fi
+}
+
+
diff --git a/libs/temp.lunar b/libs/temp.lunar
new file mode 100644
index 0000000..76b174b
--- /dev/null
+++ b/libs/temp.lunar
@@ -0,0 +1,41 @@
+#!/bin/bash
+# #
+# temp.lunar - lunar temp code handling #
+# #
+####################################################################
+# #
+# Copyright 2003 - Auke Kok under GPLv2 #
+# #
+####################################################################
+# #
+# temp.lunar contains uniform temporary file name creation and #
+# tracking. All lunar tools MUST use these functions if they wish #
+# to perform temporary file operations #
+# #
+# functions: temp_create, temp_destroy #
+# #
+####################################################################
+
+
+temp_create() {
+ local TMPFILE
+ debug_msg "temp_create ($@)"
+ TMPFILE="$@"
+ if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
+ echo $TMPFILE
+ else
+ message "${PROBLEM_COLOR}ERROR:${NORMAL_COLOR}${DEFAULT_COLOR}" \
+ "Cannot create temp file${NORMAL_COLOR}"
+ exit 1
+ fi
+}
+
+
+temp_destroy() {
+ debug_msg "temp_destroy ($@)"
+ if [ -e "$1" ] ; then
+ rm -f "$1"
+ fi
+}
+
+
diff --git a/libs/tracking.lunar b/libs/tracking.lunar
new file mode 100644
index 0000000..361d53f
--- /dev/null
+++ b/libs/tracking.lunar
@@ -0,0 +1,128 @@
+#!/bin/bash
+# #
+# subroutines - Lunar subroutines #
+# #
+############################################################
+# #
+# this WAS the subroutines of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Copyright 2001 by Kyle Sallee #
+# #
+# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+
+# function : invoke_installwatch
+# usage : invoke_installwatch
+# purpose : start logging all disk accesses with installwatch
+invoke_installwatch() {
+ debug_msg "invoke_installwatch ($@)"
+ if [ -e /usr/lib/installwatch.so ] ; then
+ export LD_PRELOAD=/usr/lib/installwatch.so
+ fi
+}
+
+
+# function : devoke_installwatch
+# usage : devoke_installwatch
+# purpose : stop logging all disk accesses with installwatch
+devoke_installwatch() {
+ debug_msg "devoke_installwatch ($@)"
+ unset LD_PRELOAD
+}
+
+
+# function : parse_iw
+# usage : parse_iw
+# purpose : remove unwanted accesses from the installwatch file
+parse_iw() {
+ local OMIT_IN
+ debug_msg "parse_iw ($@)"
+ OMIT_IN=" rename\| symlink\| unlink"
+
+ grep -v "$OMIT_IN" $INSTALLWATCHFILE | cut -f3 | grep -v "^$SOURCE_DIRECTORY" | grep -v -f $EXCLUDED
+ cat $INSTALLWATCHFILE | cut -f4 | grep -v "^$SOURCE_DIRECTORY" | grep -v -f $EXCLUDED | grep "^/"
+}
+
+
+# function : create_install_log
+# usage : create_install_log
+# purpose : create an install log
+create_install_log() {
+ local TMP_INST_LOG INST_LOG IFS MISOWNED_SYMLINKS
+ debug_msg "create_install_log ($@)"
+
+ TMP_INST_LOG=$(temp_create "install-log")
+ INST_LOG="$INSTALL_LOGS/$MODULE-$VERSION"
+ rm -f $INST_LOG &> /dev/null
+
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
+
+ export IFS="$TAB_ENTER_IFS"
+
+ parse_iw | sort | uniq | filter "$LOCAL_EXCLUDED" | custom_filters | exists > $TMP_INST_LOG
+ echo "$INSTALL_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
+ echo "$COMPILE_LOGS/$MODULE-$VERSION.bz2" >> $TMP_INST_LOG
+ echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
+
+ MISOWNED_SYMLINKS=$(syms_not_owned $TMP_INST_LOG
+ echo -n "/dev/null")
+
+ if [ "$MISOWNED_SYMLINKS" == "/dev/null" ] ; then
+ install -m644 $TMP_INST_LOG $INST_LOG
+ else
+ grep -v "$MISOWNED_SYMLINKS" $TMP_INST_LOG > $INST_LOG
+ fi
+
+ temp_destroy $TMP_INST_LOG
+}
+
+
+create_md5sum_log() {
+ local FILE
+ debug_msg "create_md5sum_log ($@)"
+
+ rm -f $MD5SUM_LOGS/$MODULE-$VERSION &> /dev/null
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MODULE-$VERSION${DEFAULT_COLOR}"
+
+ IFS=$'\n' files < $INSTALL_LOGS/$MODULE-$VERSION | xargs -i md5sum '{}' >> $MD5SUM_LOGS/$MODULE-$VERSION
+}
+
+create_install_cache() {
+ debug_msg "create_install_cache($@)"
+
+ if [ "$ARCHIVE" == "off" ] ; then
+ return
+ fi
+
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
+ tar cPjf "$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MODULE-$VERSION
+
+}
+
+
+finish_install() {
+ debug_msg "finish_install ($@)"
+
+ create_install_log &&
+ create_md5sum_log &&
+ create_install_cache &&
+
+ add_module $MODULE installed $VERSION $(find_module_size $MODULE $VERSION)
+ verbose_msg "module size is $(find_module_size $MODULE $VERSION)"
+}
+
+
diff --git a/libs/uniqid.lunar b/libs/uniqid.lunar
new file mode 100644
index 0000000..45dc0fa
--- /dev/null
+++ b/libs/uniqid.lunar
@@ -0,0 +1,54 @@
+#!/bin/bash
+# #
+# uniqid.lunar - Make a unique id for tracking clients #
+# #
+############################################################
+# #
+# Copyright Fw systems LLC Under eitherGPL v2 or BSD Lic. #
+# #
+############################################################
+
+
+push_uniq_id() {
+ debug_msg "push_uniq_id ($@)"
+ if [ -z "$UNIQID" ]; then
+ create_uniq_id
+ fi
+
+ verbose_msg "registering \"$UNIQID\" with server"
+ wget -t 1 -T 5 -q -O - "lunar-linux.org/cgi-bin/houston?loc=$UNIQID"
+
+}
+
+
+create_uniq_id() {
+ local OS HASH IFACE
+ debug_msg "create_uniq_id ($@)"
+ if [ -n "$UNIQID" ]; then
+ return
+ fi
+
+ OS=$(uname -s)
+
+ if [ "$OS" == "OpenBSD" ]; then
+ HASH="sha1"
+ IFACE=`netstat -r | grep default | awk '{print $7}'`
+ elif [ "$OS" == "Linux" ]; then
+ HASH="md5sum"
+ IFACE=`netstat -r | grep default | awk '{print $8}'`
+ else
+ exit 1
+ fi
+
+ UNIQID=`ifconfig $IFACE |\
+ awk '/addr.*[:]* [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]/ {print $NF}' |\
+ tr 'A-Z' 'a-z' | $HASH | awk '{print $1}'`
+ export UNIQID
+
+ verbose_msg "id(\"$IFACE\")=\"$UNIQID\""
+
+ set_local_config "UNIQID" "$UNIQID"
+
+}
+
+
diff --git a/libs/updatelog.lunar b/libs/updatelog.lunar
new file mode 100644
index 0000000..e5fba73
--- /dev/null
+++ b/libs/updatelog.lunar
@@ -0,0 +1,118 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/updatelog #
+# includes display_update_log #
+# 20020711 #
+# #
+############################################################
+# #
+# Copyrighted Jason Jackson 2002 under GPLv2 #
+# #
+############################################################
+
+
+# function : display_update_log
+# usage : display_update_log update|rebuild
+# purpose : display a log describing update successes, failures, and summaries
+display_update_log() {
+ debug_msg "display_update_log ($@)"
+ rm -f /var/log/lunar/update
+ {
+ if [ -e "$TMP_LIN_SUCCESS" -a -e "$TMP_LIN_FAIL" ] ; then
+ display_success_info $1
+ fi
+ } | tee /var/log/lunar/update
+}
+
+
+# function : display_success_info
+# usage : display_success_info update|rebuild
+# purpose : display a list of update successes and failures
+display_success_info() {
+ local NUMSUCCESS NUMFAILURES
+ debug_msg "display_success_info ($@)"
+
+ NUMSUCCESS=$(wc -l $TMP_LIN_SUCCESS | cut -d" " -f1)
+ NUMFAILURES=$(wc -l $TMP_LIN_FAIL | cut -d" " -f1)
+
+ message
+ message "${MESSAGE_COLOR}Lunar $1 completed at `date`${DEFAULT_COLOR}"
+ message "Successful : $NUMSUCCESS"
+ message "Failed : $NUMFAILURES"
+ message
+
+ if [ "$NUMSUCCESS" -gt "0" ]; then
+ message "${MESSAGE_COLOR}Successfully updated modules:${DEFAULT_COLOR}"
+ cat $TMP_LIN_SUCCESS
+ message
+ fi
+
+ if [ "$NUMFAILURES" -gt "0" ]; then
+ message "${MESSAGE_COLOR}Failed updated modules:${DEFAULT_COLOR}"
+ cat $TMP_LIN_FAIL
+ message
+ fi
+
+}
+
+# function : display_moonbase_changes
+# usage : display_moonbase_changes
+# purpose : display a list of modules added or removed during this update
+display_moonbase_changes() {
+ local MODULE_CHANGES NEW_MODULES DEL_MODULES MOV_MODULES M
+ debug_msg "display_moonbase_changes ($@)"
+
+ if [ -e "$MODULE_INDEX" ] && [ -e "$TMP_MODULE_INDEX" ]; then
+ MODULE_CHANGES=$(temp_create "module-changes")
+ diff -U0 $TMP_MODULE_INDEX $MODULE_INDEX | grep -v -e '^@@' -e '^---' -e '^+++' > $MODULE_CHANGES
+
+ MODULES=$(cat $MODULE_CHANGES | cut -d: -f1 | sed 's:^[+-]::' | sort -t : | uniq)
+ for M in $MODULES; do
+ IN=$(grep "^-$M:" $MODULE_CHANGES)
+ OUT=$(grep "^+$M:" $MODULE_CHANGES)
+ if [ -z "$IN" -a -n "$OUT" ] ; then
+ # new module:
+ NEW_MODULES="$NEW_MODULES $M"
+ elif [ -n "$IN" -a -z "$OUT" ] ; then
+ # removed module:
+ DEL_MODULES="$DEL_MODULES $M"
+ else
+ # moved module
+ MOV_MODULES="$MOV_MODULES $M"
+ fi
+ done
+
+ if [ -n "$NEW_MODULES" ]; then
+ message "${MESSAGE_COLOR}New modules:${DEFAULT_COLOR}"
+ for M in $NEW_MODULES; do
+ message " $M"
+ done
+ message
+ fi
+
+ if [ -n "$DEL_MODULES" ]; then
+ message "${MESSAGE_COLOR}Removed modules:${DEFAULT_COLOR}"
+ for M in $DEL_MODULES; do
+ message " $M"
+ done
+ message
+ fi
+
+ if [ -n "$MOV_MODULES" ]; then
+ message "${MESSAGE_COLOR}Moved modules:${DEFAULT_COLOR}"
+ for M in $MOV_MODULES; do
+ INS=$(grep "^[-]$M:" $MODULE_CHANGES | cut -d: -f2)
+ OUTS=$(grep "^[+]$M:" $MODULE_CHANGES | cut -d: -f2)
+ message " $M: $INS -> $OUTS"
+ done
+ message
+ fi
+ temp_destroy $MODULE_CHANGES
+ fi
+}
+
diff --git a/libs/useradd.lunar b/libs/useradd.lunar
new file mode 100644
index 0000000..0ac4018
--- /dev/null
+++ b/libs/useradd.lunar
@@ -0,0 +1,115 @@
+#!/bin/bash
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $FUNCTIONS/uid.lunar #
+# includes add_priv_user add_priv_group #
+# 20030306 #
+# #
+############################################################
+# #
+# Copyrighted Auke Kok 2006 under GPLv2 #
+# #
+############################################################
+
+
+# function: add_priv_group
+# usage : add_priv_group groupname [addgroupopts [addgroupopts]...]
+# info : adds groupname and passes addgroupopts to 'addgroup'
+function add_priv_group() {
+ local GROUPNAME
+ debug_msg "function add_priv_group ($@)"
+
+ if [ -n "$INSTALLWATCHFILE" ] ; then
+ devoke_installwatch
+ fi
+ GROUPNAME=$1
+
+ if [ -z "$GROUPNAME" ] ; then
+ message "${PROBLEM_COLOR}!add_priv_user: no groupname specified${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if grep -q "^$GROUPNAME:" /etc/group ; then
+ verbose_msg "group \"$GROUPNAME\" already exists, not creating"
+ else
+ # add the group:
+ for (( N=0 ; N<100 ; N++)) ; do
+ if [ -z "$(cat /etc/group | cut -d: -f3 | grep "^$N$" )" ] ; then
+ break
+ fi
+ done
+ if [ "$N" == "100" ] ; then
+ message "${PROBLEM_COLOR}!add_priv_user: no more group id's left under gid=100, bailing out!${DEFAULT_COLOR}"
+ exit 1
+ fi
+ verbose_msg "creating group \"$GROUPNAME\" with id=\"$N\""
+ groupadd -g $N $GROUPNAME
+ fi
+
+ if [ -n "$INSTALLWATCHFILE" ] ; then
+ invoke_installwatch
+ fi
+}
+
+
+# function: add_priv_user
+# usage : add_priv_user username:groupname [adduseropts [adduseropts]...]
+# info : adds username:groupname and passes adduseropts to 'adduser'
+function add_priv_user() {
+ local USERNAME GROUPNAME
+ debug_msg "function add_priv_user ($@)"
+
+ if [ -n "$INSTALLWATCHFILE" ] ; then
+ devoke_installwatch
+ fi
+ USERNAME=$(echo $1 | cut -d: -f1)
+ GROUPNAME=$(echo $1 | cut -d: -f2)
+
+ if [ -z "$USERNAME" ] ; then
+ message "${PROBLEM_COLOR}!add_priv_user: no username specified${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if [ -z "$GROUPNAME" ] ; then
+ message "${PROBLEM_COLOR}!add_priv_user: no groupname specified${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ if id $USERNAME &> /dev/null ; then
+ verbose_msg "user \"$USERNAME\" already exists, not creating or modifying"
+ else
+ if grep -q "^$GROUPNAME:" /etc/group ; then
+ verbose_msg "group \"$GROUPNAME\" already exists, not creating"
+ else
+ if ! add_priv_group $GROUPNAME ; then
+ exit 1
+ fi
+ fi
+
+ # add the user:
+ for (( N=0 ; N<100 ; N++)) ; do
+ if [ -z "$(cat /etc/passwd | cut -d: -f3 | grep "^$N$" )" ] ; then
+ break
+ fi
+ done
+ if [ "$N" == "100" ] ; then
+ message "${PROBLEM_COLOR}!add_priv_user: no more user id's left under uid=100, bailing out!${DEFAULT_COLOR}"
+ exit 1
+ fi
+
+ shift
+
+ verbose_msg "creating user \"$USERNAME\" (opts=\"-u $N -g $GROUPNAME $@\")"
+ useradd -u $N -g $GROUPNAME $USERNAME $@
+
+ fi
+
+ if [ -n "$INSTALLWATCHFILE" ] ; then
+ invoke_installwatch
+ fi
+}
+
diff --git a/libs/view.lunar b/libs/view.lunar
new file mode 100644
index 0000000..1e5cb62
--- /dev/null
+++ b/libs/view.lunar
@@ -0,0 +1,26 @@
+#!/bin/bash
+# #
+# display.lunar - functions to view files #
+# #
+####################################################################
+
+
+# function : view_file
+# usage : view_file FILENAME
+# purpose : to view a file
+view_file() {
+ debug_msg "view_file ($@)"
+ if [ -n "$1" ] ; then
+ # show a file $1
+ case $(file -b $1 | cut -d' ' -f1) in
+ bzip2) bzcat $1 | ${PAGER:-less} ;;
+ gzip) zcat $1 | ${PAGER:-less} ;;
+ *)
+ # default fallback
+ cat $1 | ${PAGER:-less} ;;
+ esac
+ else
+ cat | ${PAGER:-less}
+ fi
+}
+
diff --git a/man/lcrash.8 b/man/lcrash.8
new file mode 100644
index 0000000..61fe74a
--- /dev/null
+++ b/man/lcrash.8
@@ -0,0 +1,61 @@
+.TH "lcrash" "8" "Release $Revision$" "Terry Chan" "Lunar Crash Recovery"
+.SH "NAME"
+.LP
+\fBlcrash\fR \- Lunar Crash Recovery manual
+.SH "OVERVIEW"
+.LP
+This manual page was written to give some pointers on how to recover from a "lunar update" crash, or an otherwise broken set of lunar tools.
+.SH "DO NOT PANIC"
+.LP
+These are the suggested steps after your system has been able to successfully boot back into a \fBLunar Linux\fR bash command prompt but you are not able to do a "lunar update" because of a crash/abort/power failure/whatever occuring in the middle of a "lunar update" and it did not finish installing the lunar commands and Moonbase. All of these instructions should be run as "root".
+
+\fB1. Update Your Lunar or Theedge: \fRUsing a web browser or wget, download a copy of http://www.lunar-linux.com/lunar/lunar.tar.bz2 or http://www.lunar-linux.com/lunar/theedge.tar.bz2. If you use wget please do these steps:
+.IP
+cd /var/spool/lunar
+.IP
+wget http://www.lunar-linux.com/lunar/lunar.tar.bz2
+.LP
+If you use a web browser then go to the location mentioned above and download lunar.tar.bz2 and save it to the /var/spool/lunar directory.
+.LP
+\fB2. Manually unpack Lunar: \fRNow unpack the tar.bz2 file with these commands:
+.IP
+cd /
+.IP
+bzcat /var/spool/lunar/lunar.tar.bz2 | tar xv
+.IP
+cd lunar ; ./install
+.LP
+Now your system should be able to run a \fBlunar update\fR. This process will update the base scripts and the package collection (Moonbase).
+.LP
+
+.SH "LIFESAVERS"
+.LP
+Below are some useful addresses
+.P
+
+\fBWebsite: \fRhttp://www.lunar\-linux.org/
+.P
+
+\fBMaillist: \fRhttp://www.lunar\-linux.org/mailman/listinfo/lunar
+.P
+
+\fBIRC: \fRirc.freenode.net #lunar
+
+.SH "NOTES"
+.LP
+This is a work in progress. Expect frequent updates.
+.SH "SEE ALSO"
+.LP
+lunar(8), moonbase(5), lin(8), lvu(1), lget(8), lrm(8)
+.SH "DISCLAIMER"
+.LP
+The information and examples given here are for illustrative purposes. Use at
+your own risk. Every attempt has been made to insure that the content of this
+document was accurate when written. If you find inaccuracies, please send me
+clarifications.
+.SH "COPYRIGHT"
+.LP
+This document is Copyrighted Terry Chan 2002-2003. It may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies.
+.SH "AUTHOR"
+.LP
+Terry Chan <tchan at lunar-linux.org>
diff --git a/man/lfirsttime.8 b/man/lfirsttime.8
new file mode 100644
index 0000000..bcf0eb3
--- /dev/null
+++ b/man/lfirsttime.8
@@ -0,0 +1,308 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. | will give a
+.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.\"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "lfirsttime 8"
+.TH lfirsttime 8 "2005-03-09" "Moritz Heiber" "Lunar Linux for the first time"
+.SH "NAME"
+lfirsttime \- or 'What to do after a successful installation?'
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+This manual page has been written in order to ease the life of the system administrator after the installation part of \fBLunar Linux\fR.
+.SH "DO NOT PANIC!"
+.IX Header "DO NOT PANIC!"
+These are the suggested tasks you should accomplish immediately after the first boot of a newly installed Lunar box.
+.PP
+All of the lunar related commands mentioned below either feature a whole manpage or at least a very useful helpscreen. If you need immediate assistance regarding any of those commands, issue:
+.PP
+\&\fBman 'command'\fR or \fB'command' \-\-help\fR
+.PP
+at your console.
+.PP
+The operations described below follow a strict logic and they should be executed in sequence.
+.PP
+\&\fBPlease remember that the Lunar Install/Rescue \s-1ISO\s0 is not a full featured system.\fR
+.SH "NETWORK SETTINGS"
+.IX Header "NETWORK SETTINGS"
+This step is crucial to your future success with \fBLunar Linux\fR. If you haven't set up your network card yet try it with \fBlnet\fR. Remember, you need to know about your current network card's driver and have the kernel build the appropriate modules for it.
+.Sh "Check your network settings"
+.IX Subsection "Check your network settings"
+Once you've set up your network card correctly, try to ping out.
+.PP
+Example: \fBping google.com\fR
+.PP
+If it doesn't work you may be having a name resolution problem, try pinging to the \s-1IP\s0 address instead of the name.
+.PP
+Example: \fBping 216.239.57.99\fR
+.PP
+If pinging to \s-1IP\s0 is working but pinging to name fails, check the \fB/etc/resolv.conf\fR file and see if the nameserver entries are there. You may also want to check the man page, \fBman resolv.conf\fR if you are not familiar with the entries which should be in that file.
+.Sh "Check the network device"
+.IX Subsection "Check the network device"
+If pinging the \s-1IP\s0 address fails, check to see if your network interface is up and running. You may use the command \fBifconfig\fR to see the interface's status. You must be able to see the details of your network interface in the output of ifconfig.
+.PP
+If you cannot, then check if your \fB\s-1NIC\s0 (network interface card)\fR module is loaded (assuming you are using a modular kernel); use the command \fBlsmod\fR to see the already loaded modules and see wether the module for your network card is already loaded.
+.PP
+If you do not know for sure what type of network card you have try executing the command: \fBcat /proc/pci|grep Ethernet\fR or \fBlspci\fR. This should give the manufacturer and model name of your ethernet card.
+.PP
+If your \s-1NIC\s0 module is there but your interface is not up, reconfigure the interface with \fBlnet\fR and test again. If your \s-1NIC\s0 module is still not listed in the output of \fBlsmod\fR, the chances are you have misconfigured the kernel or misconfigured your network. To check the kernel modules, try \fBls \-l /lib/modules/`uname \-r`/kernel/drivers/net\fR to see the network modules available with the current kernel. If the your \s-1NIC\s0's kernel module doesn't show up you probably have to reconfigure and recompile your current kernel to include the appropriate module(s).
+.Sh "lnet or manual configuration"
+.IX Subsection "lnet or manual configuration"
+Your network setting can be configured completely using \fBlnet\fR; just make sure you set up your interface correctly as needed. If you encounter problems after having configured your network with \fBlnet\fR you probably want to adjust the configuration manually.
+.PP
+The network configuration file for your Lunar installation may be found in \fB/etc/config.d/network/'interface'\fR (f.e. 'eth0' \-> /etc/config.d/network/eth0). Any time you adjust your interface's configuration manually or through \fBlnet\fR you will have to restart the network to make use of any changes that have been done in the meantime. The init script used to start/stop/restart network is \fB/etc/init.d/network\fR.
+.PP
+Example: \fB/etc/init.d/network restart\fR
+.PP
+Good luck and please remember that you \fBhave to\fR to be able to ping f.e. 'google.com' to install any other packages or update your system!
+.SH "CORE UPDATES AND SETUP"
+.IX Header "CORE UPDATES AND SETUP"
+Since Lunar Linux is a source based distribution, some of the binaries and/or modules on the \s-1CD\s0 may have been upgraded to newer versions already. Here are the first steps you should take to get an up\-to\-date, smoothly running and fast system:
+.Sh "Update your coretools"
+.IX Subsection "Update your coretools"
+You need to get the most recent version of the available \fBcoretools\fR. The \fBcoretools\fR are the heart of every \fBLunar Linux\fR system. They provide you with all the necessary commands to maintain a working installation thus it's always recommended to have the latest version installed. There are two different choices:
+.PP
+\&\fBlunar\fR or \fBtheedge\fR
+.PP
+\&\fBlunar\fR is the stable branch of the lunar \fBcoretools\fR. It's meant to run with stable production environments. \fBtheedge\fR is the unstable branch. It might occasionally contain bugs, however it's generally used to test out new features and bugfixes before they're migrated to the stable branch. If you'd like to help out with the lunar development or you discovered a bug in \fBlunar\fR you might want to give \fBtheedge\fR a try.
+.PP
+Since the \s-1ISO\s0 ships with \fBtheedge\fR preinstalled you \fBhave to\fR update \fBtheedge\fR before you do anything else -- even if you're planning to use \fBlunar\fR later on!
+.PP
+Execute: \fBlin theedge\fR
+.PP
+If you want to keep \fBLunar Linux\fR as stable as possible you need to install the stable \fBcoretools\fR branch now by running
+.PP
+Execute: \fBlin lunar\fR
+.Sh "Core Components"
+.IX Subsection "Core Components"
+A very brief explanation of the most important coretool components. For further information regarding the referenced parts please refer to their manpages (i.e. man <part>):
+.IP "\fBlin\fR; usage: lin <module>" 4
+.IX Item "lin; usage: lin <module>"
+Install a package/module.
+.IP "\fBlvu\fR; usage: lvu <options> <module>" 4
+.IX Item "lvu; usage: lvu <options> <module>"
+Gather information about a package/module.
+.IP "\fBlrm\fR; usage: lrm <module>" 4
+.IX Item "lrm; usage: lrm <module>"
+Remove a package/module.
+.IP "\fBlunar\fR; usage: lunar <options>" 4
+.IX Item "lunar; usage: lunar <options>"
+Lunar configuration utility
+.Sh "Update your moonbase"
+.IX Subsection "Update your moonbase"
+The package repository from where the \fBcoretools\fR gather their \fBpackage information\fR is called \fBmoonbase\fR. Also, packages are usually referred to as \fBmodules\fR. Since the moonbase on your installation is probably outdated it's strongly recommended to update your moonbase right after your coretools.
+.PP
+Execute: \fBlin moonbase\fR
+.Sh "Set your preferences"
+.IX Subsection "Set your preferences"
+\&\fBLunar Linux\fR can easily be customized and is highly configurable. For changing the options that affect your system you may use the menu driven \fBlunar\fR configuration utility. It's based upon ncurses which means you can even run it in the console of your choice. You need to become root to use it.
+.IP "\fBOptimizations\fR" 4
+.IX Item "Optimizations"
+Set the right optimizations for your computer. Be aware that changing your optimizations to the wrong values might actually break your whole installation so be really careful about what you're choosing. The \s-1ISO\s0 has been built with a minimum of available optimizations to ensure the highest amount of flexibility. To see whether or not your processor supports a certain feature try a \fBcat /proc/cpu\fR. It usually shows the available settings that suit your machine.
+.IP "\fBIntegrity checking\fR" 4
+.IX Item "Integrity checking"
+Lunar is performing a range of security checks on tarballs and installed packages to prevent faulty tarballs and possible intruders from taking over your system. It also ensures that none of your currently installed packages is broken.
+.Sp
+You may select the amount of checks from the \fBIntegrity checking\fR submenu at the \fBOptions\fR menu. It's generally recommended to at least chose \fB\s-1FIND_CHECK\s0\fR and \fB\s-1LDD_CHECK\s0\fR.
+.IP "\fBFeature menu\fR" 4
+.IX Item "Feature menu"
+As mentioned before, Lunar is highly configurable. Thus you have a whole menu to select its features from. It's strongly advised to at least take a look at it and get used to them. Explanations are usually displayed as soon as you select an item.
+.IP "\fBApart from that\fR" 4
+.IX Item "Apart from that"
+Take a look at the \fBlunar\fR configuration tool. It can be a \fBpowerful companion\fR while achieving the goal of setting up your system.
+.SH "GENERAL UPDATES"
+.IX Header "GENERAL UPDATES"
+Right now you're set to update your whole system. Before you do that make sure you have the most recent \fBcoretools\fR and \fBmoonbase\fR installed.
+.PP
+The next step can be omitted -- however, it is highly recommended that you rebuild the following modules in the right order to ensure that your system is working right.
+.PP
+Here we go:
+.PP
+Execute: \fBlin \-cr gcc glibc gcc bash coreutils tar wget\fR
+.PP
+\&\fBExplanation:\fR
+.PP
+\&\fBlin\fR is obviously used to install a module. It also accepts multiple modules in a row. The '\-cr' switch means 'compile (c)' and 'reconfigure (r)'. They're explained at the manpage. One needs to update gcc thus the first gcc statement. Right after that one should recompile glibc to ensure that it's working well with the latest compiled gcc. And finally gcc again to make use of the newly compiled glibc. The modules right afterwards are used by \fBLunar Linux\fR itself thus they need to be up-to-date and compiled against the latest available gcc and glibc.
+.Sh "\fBA complete update\fP"
+.IX Subsection "A complete update"
+Now, to update your whole system you need to issue the following
+.PP
+Execute: \fBlunar update\fR
+.PP
+It's going to compare your system's installed modules against the moonbases' definitions and update the installed modules accordingly. It's going to give you a list of modules that are going to be updated. If you're not sure wether you want a certain module to be updated remove it from the list. Once you're done the coretools are going to start the update which usually is going to take a very long time on a freshly installed system since most of its components will probably be outdated. So grab a coffee and/or a book and wait for it to finish ;\-)
+.PP
+Once it is done it is going to present you with a summary about how many module where successfully updated and which of them failed. \fBlvu\fR ('lvu activity') is going to show you which of them failed and usually why. \fBlvu\fR ('lvu compile <module>') is also going to show you the compilation's logfile which should clearly point you to the error that led to the failure of the module's compilation.
+.PP
+The first thing to do would be to 're'lin' (i.e. execute \fBlin \-c\fR once more. It is always advised to use the \-c and the \-r switch in case a module fails to compile) all the failed modules by hand. If you think you will not be able to resolve the matter on your own you can still file a bugreport at the \fBLunar Linux bugtracker\fR http://bugs.lunar\-linux.org or report the error to the \fBLunar Linux mailinglist\fR. However, you will have to subscribe to the list at http://foo\-projects.org/mailman/listinfo/lunar before being able to post any mail to it.
+.PP
+Once the update has been completed successfully you may go ahead and customize your installation to suit your own needs. Well done!
+.SH "HINTS"
+.IX Header "HINTS"
+.IP "\fBTAB-completion\fR" 4
+.IX Item "TAB-completion"
+All of the coretools are able to do tab\-completion. Say, you want to install the module 'xfce4\-panel' just go ahead and type 'lin xfce4\-p<\s-1TAB\s0>' and lin is going to append the rest of the module's name to the command. Once there are too few characters to resolve the name into one single module you just need to hit \s-1TAB\s0 twice to get a list of all the modules starting with the characters you just typed i.e. 'lin xfce<\s-1TAB\s0><\s-1TAB\s0>' is going to give you a list of all modules starting with 'xfce'.
+.IP "\fBLeftovers\fR" 4
+.IX Item "Leftovers"
+In case of a compilation failure the sources of the failed module are left in \f(CW$BUILD_DIRECTORY\fR (usually /usr/src/). Moreover, a few tracking files lunar creates to monitor the running installation process might be left in /tmp. Make sure you tidy up these two locations from time to time.
+.Sp
+\&\fB\s-1CAUTION:\s0\fR Directories like 'linux\-2.x' are kernel source directories and _must_ be left intact. Otherwise your system is going to break! Only delete them if you're absolutely sure that they don't belong to your currently running kernel.
+.IP "\fBRunning coretools processes\fR" 4
+.IX Item "Running coretools processes"
+If you're interrupting a module installation process (f.e. by pressing '\s-1CTRL\-C\s0) you should check if there are any running coretools processes running in the background as another try to install the module might fail because of them. Have a closer look at \fBps aux\fR and \fBkill/killall\fR all the remaining coretools instances of a failed installation attempt.
+.Sp
+\&\fB\s-1CAUTION:\s0\fR Lunar allows you to run multiple installations independently. Be sure about the processes' purpose you're terminating!
+.IP "\fB\s-1IRC\s0 channel\fR" 4
+.IX Item "IRC channel"
+The fastest help you get is by chatting with the developers directly. Join the \fBLunar Linux \s-1IRC\s0 channel\fR at freenode
+.Sp
+irc://irc.freenode.net/#lunar
+.SH "NOTES"
+.IX Header "NOTES"
+This is merely an introduction to what should be done to get a ready-to-go Lunar system. Please consult the documentation at the Lunar website for more information.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+Documentation at the Lunar Linux website at http://lunar\-linux.org
+.PP
+\&\fIlunar\fR\|(8), \fImoonbase\fR\|(1), \fIlin\fR\|(8), \fIlvu\fR\|(1), \fIlget\fR\|(8), \fIlrm\fR\|(8), \fIlnet\fR\|(8)
+.SH "DISCLAIMER"
+.IX Header "DISCLAIMER"
+The information and examples given here are for illustrative purposes. If you encounter any inaccuracies please send an email to the authors.
+.SH "COPYRIGHT"
+.IX Header "COPYRIGHT"
+This document is originally Copyrighted Kagan Kongar 2002.
+.PP
+Portions of this document Copyrighted (C) 2003\-2004 Terry Chan
+.PP
+It has been almost completely rewritten by Moritz Heiber for the Lunar Linux development team under the Creative Commons License, (C) 2005
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+Kagan Kongar <kongar at tsrsb.org.tr>
+.PP
+Terry Chan <tchan at lunar\-linux.org>
+.PP
+Moritz Heiber <moe at lunar\-linux.org>
diff --git a/man/lget.8 b/man/lget.8
new file mode 100644
index 0000000..eaa49e6
--- /dev/null
+++ b/man/lget.8
@@ -0,0 +1,105 @@
+.TH LGET 8 "August 2003" "Lunar Linux" LUNAR
+.SH NAME
+lget \- downloads module source files
+.SH SYNOPSIS
+.B lget
+module_1 module_2 module_3
+.PP
+.B lget -h|--help
+.PP
+.B lget -a|--all
+.PP
+.B lget -d|--debug|-f|--from|-u|--url|-v|--verbose|-w|--want
+module_1 module_2
+.SH COPYRIGHT
+.if n lget(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.if t lget(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.SH "EXAMPLE"
+To download emacs type:
+.IP
+.B lget
+emacs
+.SH "DESCRIPTION"
+.I lget
+is part of the
+.SM Lunar
+source-code package management suite. It is a command-line tool
+for automatically downloading a modules associated source files.
+.SH "OPTIONS"
+.TP
+.B lget
+module_1 <module_2> <module_3>
+.PP
+This automatically downloads the specified module sources.
+.TP
+.B lget -a|--all
+.PP
+Download the source code for every single module in moonbase (about 2.5G as of 08/08/2003).
+This is useful if you have a fast link or want to start your own Lunar source code mirror.
+.TP
+.B lget -d|--debug
+.PP
+Enables debug messages, very useful when emailing a bug report.
+.TP
+.B lget -f|--from path/dir
+.PP
+This specifies a different
+.I /var/spool/lunar
+directory. This is the default location for downloaded sources.
+.TP
+.B lget -h|--help
+.PP
+Outputs short help.
+.TP
+.B lget -u|--url URL module_1
+.PP
+This tries to download the specified module from a different location. This is
+useful if the original link is down.
+.TP
+.B lget -w|--want version
+.PP
+Attempt to download version version of the module by substituting the current
+version of the module with the wanted version. May fail if the package requires
+more than one file download, or other reasons.
+.TP
+.B lget -v|--verbose
+.PP
+Increases the level of message output
+.SH "FILES"
+.TP
+.I /etc/lunar/config & /etc/lunar/local/config
+.IP
+These files store the settings for default locations. Its best to leave
+these alone as they are in quite good places by default. See lin(8) for more
+details about these files.
+.IP
+.TP
+.I /var/lib/lunar/functions/*.lunar
+.IP
+Contains functions used by
+.B lget
+.SH ADVANCED USAGE
+Specifing a different download location for linux
+.IP
+lget
+.B --url http://ftp.mirror.ac.uk/sites/ftp.kernel.org/linux/kernel/2.4/linux-2.4.20.tar.bz2 linux
+.SH "NOTES"
+Do not include
+.SM version
+or
+.SM section
+when specifying a package. To get complete listing of installed software
+packages and versions type
+.B lvu installed
+.SH "AUTHOR"
+Thomas Stewart
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Updated by Terry Chan 08/08/2003
+.SH "REPORTING BUGS"
+Report bugs to <maintainer at lunar-linux.org>
+.SH "SEE ALSO"
+lunar(8), lin(8), lvu(1), lrm(8)
+.SH "WARRANTY"
+This is free software with ABSOLUTELY NO WARRANTY
diff --git a/man/lin.8 b/man/lin.8
new file mode 100644
index 0000000..a0f8115
--- /dev/null
+++ b/man/lin.8
@@ -0,0 +1,168 @@
+.TH "LIN" "8" "August 2003" "Lunar Linux" "LUNAR"
+.SH "NAME"
+lin \- Lunar install software modules
+.SH "SYNOPSIS"
+.B lin
+[options] [package1[/version]] ... [package2[/version]] ...
+.SH "COPYRIGHT"
+.if n lin(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
+.if t lin(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
+.SH "EXAMPLE"
+To install emacs type:
+.IP
+.B lin emacs
+.SH "DESCRIPTION"
+.I lin
+is part of the
+.B Lunar
+source\-code package management suite. It is a command\-line tool for automatically retrieving, unpacking, compiling, installing, and tracking software installations.
+.SH "OPTIONS"
+.TP
+.B "\-c, \-\-compile"
+Compiles module even if there is a compile cache in /var/cache/lunar.
+.TP
+.B "-d, --debug"
+Enables debug messages, very useful when emailing a bug report.
+.TP
+.B "\-\-deps"
+Configures the modules and determines their dependencies, but they are not
+compiled or installed.
+.TP
+.B "-f, \-\-from" directory
+Specify an alternate directory to search for source code tarballs. An alternative
+to /var/spool/lunar.
+.TP
+.B "\-h, \-\-help"
+Outputs short help.
+.TP
+.B "\-p, \-\-probe"
+Only lin if the module was not previously installed.
+.TP
+.B "\-r, \-\-reconfigure"
+Select new configuration and dependencies for modules.
+.TP
+.B "\-\-opts (configure flags)"
+Add arbitrary options to the configure stage of the module. The options are saved for future upgrades but will be erased by using "-r".
+.TP
+.B "\-R, \-\-resurrect"
+Reinstalls a module which has been removed but still has the compiled version available.
+.TP
+.B "\-w, \-\-want (version number)"
+Try to install a different version than the current one in moonbase. Integrity checking is turned off. Success not guaranteed.
+.TP
+.B "\-s, \-\-silent"
+Decreases the level of message output.
+.TP
+.B "\-v, \-\-verbose"
+Increases the level of message output.
+.SH "FILES"
+All files can be edited by hand, but its easier to edit them with
+.B lunar.
+.TP
+.I /etc/lunar/config
+.IP
+Configuration options.
+.TP
+.I /etc/lunar/mirrors
+.IP
+Mirror information.
+.TP
+.I /etc/lunar/local/*
+.IP
+Local settings.
+.TP
+.I /etc/lunar/local/config
+.IP
+Various local settings and compiler optimization parameters (select with lunar).
+.TP
+.I /etc/lunar/local/depends/*
+.IP
+Dependency and configuration information for modules.
+.TP
+.I /var/lib/lunar/functions/*.lunar
+.IP
+Contains functions used by
+.B lin.
+.I
+.SH "ENVIRONMENT"
+.PP
+The following settings can be altered in
+.I /etc/lunar/local/config
+It is easier, faster and less error prone to edit them with
+.B lunar.
+.IP GNU_URL
+The GNU Mirror (default: ftp.gnu.org).
+.IP KERNEL_URL
+The kernel mirror (default: ftp.kernel.org).
+.IP XFREE86_URL
+The xfree86 mirror (default: ftp.xfree86.org).
+.IP GNOME_URL
+The GNOME mirror (default: ftp.gnome.org).
+.IP KDE_URL
+The KDE mirror (default: ftp.kde.org).
+.IP SFORGE_URL
+The Sourceforge mirror. (default: none).
+.IP PATCH_URL
+The default patch mirror. (default: download.lunar\-linux.org/lunar/patches).
+.IP LRESORT_URL
+The default lunar mirror. If all else fails go here! (default: download.lunar\-linux.org/lunar/cache)
+.IP MOONBASE_URL
+The lunar moonbase mirrors. (default: download.lunar\-linux.org/lunar/).
+.IP color
+If set to yes lin outputs nice colour. Green for messages, gray for compiling, yellow for questions, and red for errors.
+.IP PROMPT_DELAY
+The delay in seconds that
+.B lin
+pauses when waiting for responses from you.
+.IP MAIL_REPORTS
+If set to yes, installation logs will be mailed to the admin upon a successful compile. Compile logs will be mailed instead upon a failed compilation.
+.IP ADMIN'S_EMAIL
+The mailbox where the reports will be mailed. The admin's email address.
+.IP PRESERVE
+When set to yes, configuration files that have been edited will not get deleted when the module is re\-installed
+.IP SOUND
+If set to yes then sounds will be enabled if the
+.I lunar\-sound
+module is installed
+.IP SUSTAIN
+When set to yes this disallows removing of modules that would cause terrible malfunctions. eg glibc, gcc, bash, to name some obvious ones.
+.IP VIEW_REPORTS
+If set to yes then you will be prompted whether to view reports before and after installation.
+.IP VOYEUR
+If set to yes then compiler output will be displayed in real time.
+.IP REAP
+Deletes files when removing.
+.IP AUTOFIX
+If set to yes whenever a library is updated all packages that depend on that library will be rebuilt. See FIND_CHECK, MD5SUM_CHECK, LDD_CHECK, SYM_CHECK for autofix settings.
+.IP FIND_CHECK MD5SUM_CHECK LDD_CHECK SYM_CHECK
+See the \-f options above for explanations of these.
+.SH "ADVANCED USAGE"
+.PP
+Using source code tarballs from an alternate location.
+.IP
+lin
+.B \-\-from
+/root/spool/lunar
+emacs
+Unless the
+.B \-from
+option is specified lin will always check the
+.I /var/spool/lunar
+directory first to see if the package exists. If the package does not
+exist it downloads the package via the Internet.
+.SH "AUTHOR"
+Kyle Sallee
+.PP
+Updated Thomas Stewart 01/15/2002
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Updated by Chuck Mead 07/17/2003
+.PP
+Updated by Terry Chan 08/08/2003
+.SH "REPORTING BUGS"
+Report bugs to <maintainer at lunar\-linux.org>
+.SH "SEE ALSO"
+lunar(8), lrm(8), lvu(1), lget(8), moonbase(5)
+.SH "WARRANTY"
+This is free software with ABSOLUTELY NO WARRANTY
diff --git a/man/lrm.8 b/man/lrm.8
new file mode 100644
index 0000000..30debe3
--- /dev/null
+++ b/man/lrm.8
@@ -0,0 +1,113 @@
+.TH LRM 8 "August 2003" "Lunar\-Linux" LUNAR
+.SH NAME
+lrm \- removes Lunar software modules
+.SH SYNOPSIS
+.B lrm
+[options] [module1] ... [module2] ...
+.PP
+.B lrm
+-h|--help
+.PP
+.B lrm
+-d|--debug|-k|--keepconfig|-n|--nosustain|-p|--purge|-u|--upgrade|
+-v|--verbose <module(s)>
+.PP
+.B lrm
+-D|--downgrade <module> <version>
+.PP
+.SH COPYRIGHT
+.if n lrm(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.if t lrm(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.SH "EXAMPLE"
+To uninstall emacs type:
+.IP
+.B lrm
+emacs
+.SH "DESCRIPTION"
+.I lrm
+is part of the
+.SM Lunar\-Linux
+source-code package management suite. It is a command-line tool
+for automatically uninstalling a module and its associated
+files.
+.SH "OPTIONS"
+.TP
+.B "-d, --debug"
+enables debug messages, very useful when emailing a bug report
+.TP
+.B "-D, --downgrade"
+downgrade is an option for removing the selected module and restoring
+a previously installed version
+.TP
+.B "-h, --help"
+outputs short help
+.TP
+.B "-k, --keepconfig"
+remove module(s) but keep dependencies and config info
+.TP
+.B "-n, --nosustain"
+emoves module(s) even if they are sustained
+.TP
+.B "-u, --upgrade"
+perform an upgrade-removal. This skips running of pre/post-removal scripts
+and implies -n and -k
+.TP
+.B "-v, --verbose"
+increases the level of message output
+.TP
+.B "-p, --purge"
+remove all modules that require "module" through dependencies
+.SH "FILES"
+.TP
+.I /var/lib/lunar/excluded
+.IP
+List of files that are excluded during a lin or lrm.
+.TP
+.I /var/lib/lunar/protected
+.IP
+Contains a list of files that will not be removed.
+.TP
+.I /var/lib/lunar/solo
+.IP
+List of solo modules.
+.TP
+.I /var/lib/lunar/sustained
+.IP
+List of modules that are essential to system, and lrm of these modules is not permitted.
+Installing and upgrading is fine.
+.TP
+.I /var/lib/lunar/functions/*.lunar
+.IP
+Contains functions used by
+.B lrm
+.SH ADVANCED USAGE
+Rolling back to a previous version of a package
+.IP
+lrm
+.B --downgrade
+glibc 2.2.3
+.SH "NOTES"
+Do not include
+.SM version
+or
+.SM section
+when specifying a package. To get complete listing of installed software
+packages and versions type
+.B lvu installed
+.SH "NOTES"
+Downgrade will only rollback to versions that were previously installed.
+It will not download older versions from the Internet.
+.SH "AUTHOR"
+Kyle Sallee
+.PP
+Updated Thomas Stewart 01/15/2002
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Updated by Auke Kok 09/21/2004
+.SH "REPORTING BUGS"
+Report bugs to <maintainer at lunar-linux.org>
+.SH "SEE ALSO"
+lunar(8), lin(8), lvu(1), lget(8)
+.SH "WARRANTY"
+This is free software with ABSOLUTELY NO WARRANTY
diff --git a/man/lunar.8 b/man/lunar.8
new file mode 100644
index 0000000..d84697b
--- /dev/null
+++ b/man/lunar.8
@@ -0,0 +1,168 @@
+.TH "LUNAR" "8" "August 2003" "Lunar-Linux.org" "Lunar"
+.SH "NAME"
+lunar \- menu\-driven software package management utility
+.SH "SYNTAX"
+.B lunar
+-d|--debug|-h|--help|-v|--verbose
+.PP
+.B lunar
+[prune|renew|update|rebuild|optimize|fix|nofix|fixdepends|resurrect|install|remove|hold|unhold|exile|unexile]
+.SH "COPYRIGHT"
+.if n lunar(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
+.if t lunar(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
+.SH "DESCRIPTION"
+.I lunar
+is an easy\-to\-use menu\-driven (dialog\-based) interface to the
+.I Lunar
+source\-based package management system.
+.SH "OPTIONS"
+.I lunar
+without options will start the menu\-driven package management utility.
+.PP
+.B "-d, --debug"
+enables debug messages, very useful when emailing a bug report
+.TP
+.B "-h, --help"
+outputs short help
+.TP
+.B "-v, --verbose"
+increases the level of message output
+.TP
+.I prune
+.IP
+Removes all old source code and old backups. Since the number of sources on the system grows steadily on a running system, you will need to clean some of the kept copies of sources and compile caches. The source code from previous versions are kept so that the packages can be rolled back to older versions. This does not delete sources that are up to date,
+but not installed.
+.PP
+.I renew
+.IP
+Update all packages without fetching a fresh moonbase first. Does not run prune or autofix.
+.PP
+.I update
+.IP
+Fetches a new moonbase, updates all packages and runs (optionally) a prune and autofix.
+.PP
+.I rebuild
+.IP
+automatically rebuilds all installed software packages. This option is non\-interactive and does not start up the menu\-driven interface. It is suitable for use in cron jobs and is useful for rebuilding distributed binaries from source.
+.PP
+.I optimize
+.IP
+jump straight into the compiler optimizations menu.
+.PP
+.I fix
+.IP
+Check and fix all modules and internal state of lunar. Four methods are available. The methods can be toggled using lunar\->Option\->Integrity Checking. A fix is automatically issued afer a
+.B lunar update.
+.IP
+.I "Find Check"
+.IP
+Discovers missing binary executables, libraries and header files.
+.IP
+.I MD5 Sum
+.IP
+Discovers modified executables and libraries.
+.IP
+.I Ldd Check
+.IP
+Discovers Broken executables and libraries.
+.IP
+.I Sym Check
+.IP
+Discovers mis\-owned symbolic links to files.
+.TP
+.I nofix
+.IP
+Check but do not fix modules and internal state.
+.PP
+.I fixdepends
+.IP
+Check and fix the dependency database of lunar.
+Reconstructs the depends database without recompiling modules. This might help if your depends database is missing or corrupted.
+.PP
+.I resurrect
+.IP
+Reinstalls a module which has been removed but still has the compiled version available.
+.PP
+.I install
+.IP
+Installs a module.
+.PP
+.I remove
+.IP
+Removes a module.
+.PP
+.I hold
+.IP
+Places a module on hold so it cannot be built/rebuilt.
+.PP
+.I unhold
+.IP
+Removes a module from hold status so it can be built/rebuilt.
+.PP
+.I exile
+.IP
+Prevents a module from being installed or resurrected. Perhaps because you've installed a customized module.
+.PP
+.I unexile
+.IP
+Removes a module from exiled status.
+.PP
+.SH "REQUIREMENTS"
+.I lunar
+requires a connection to the Internet
+.PP
+.I Bash
+version 2 or higher
+.PP
+.I Dialog
+version 0.9a or higher
+.PP
+.I Linux
+kernel version 2.4.x or higher.
+.SH "NOTES"
+Options on the
+.I Package Menu
+add or remove software packages to/from installation and removal queues. The actual installation and/or removal of the packages will not be performed until either
+.I Foreground Execution
+or
+.I Background Execution
+are selected from the main menu.
+.SH "OPERATION"
+.I Navigating the Menus
+.PP
+To return to a previous menu press
+.I <Esc>
+or use the
+.I Cancel button
+.PP
+To exit the program from the main menu press
+.I <Esc>
+or use the
+.I Cancel button
+.PP
+To toggle between buttons press
+.I <Tab>
+.PP
+To select whichever button is highlighted press
+.I <Enter>
+.PP
+To select/deselect items from a checklist press
+.I <Space>
+.SH "AUTHOR"
+Kyle Sallee
+.PP
+Updated Thomas Stewart 01/15/2002
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Updated by Chuck Mead 07/17/2003
+.PP
+Updated by Terry Chan 08/08/2003
+.SH "REPORTING BUGS"
+Report bugs to <maintainer at lunar\-linux.org>
+.SH "SEE ALSO"
+moonbase(5), lin(8), lvu(1), lget(8), lrm(8), lcrash(8)
+.SH "WARRANTY"
+This is free software with ABSOLUTELY NO WARRANTY
+
+
diff --git a/man/lvu.1 b/man/lvu.1
new file mode 100644
index 0000000..6c6087d
--- /dev/null
+++ b/man/lvu.1
@@ -0,0 +1,312 @@
+.TH "LVU" "1" "June 2009" "Lunar Linux" "LUNAR"
+.SH "NAME"
+lvu \- query/view lunar package management information
+.SH "SYNOPSIS"
+.B lvu
+alien|leafs|orphans|pam
+.PP
+.B lvu
+cd|what|where|website|sources|urls|maintainer|version <module>
+.PP
+.B lvu
+compile|compiler|links|install|sum|md5sum <module>
+.PP
+.B lvu
+export|import [snapshot]
+.PP
+.B lvu
+moonbase|html|updatelog|activity
+.PP
+.B lvu
+search "phrase"
+.PP
+.B lvu
+service port|acronym
+.PP
+.B lvu
+newer|older <yyyymmdd>
+.PP
+.B lvu
+from <path/file>
+.PP
+.B lvu
+installed [module]
+.PP
+.B lvu
+conflicts
+.PP
+.B lvu
+held|exiled|expired
+.PP
+.B lvu
+section [section]
+.PP
+.B lvu
+voyeur [delay or module]
+.PP
+.B lvu
+depends <module>
+.PP
+.B lvu
+tree <module>
+.PP
+.B lvu
+eert <module>
+.PP
+.B lvu
+size [module]
+.PP
+.B lvu
+new|submit|edit|unedit [module]
+.PP
+.B lvu
+$MODULE_SCRIPT <module>
+.SH "COPYRIGHT"
+.if n lvu(1) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
+.if n lvu(1) also contains material which is Copyright (C) Lunar\-Linux team.
+
+.SH "DESCRIPTION"
+.I lvu
+is part of the lunar source\-based package management suite. It is a general purpose command\-line tool for displaying package logs, version information, checking for installed packages, checksums, message digests, maintainer information, package URL information, displaying new packages, untracked files, sections, searching for files that are installed, finding when modules were created and packages in the software catalogue. It can even take and retrieve snapshots of currently installed packages for easy duplication.
+.SH "OPTIONS"
+.B alien
+.IP
+find and display all files which are not currently tracked by the lunar package management system
+.PP
+.B leafs
+.IP
+displays installed modules that have no explicit dependencies on them
+.PP
+.B orphans
+.IP
+displays installed modules that are missing required dependencies
+.PP
+.B pam
+.IP
+display modules installed that are pam aware
+.PP
+.B cd
+<module>
+.IP
+changes current directory to the given module and execs a new shell
+.PP
+.B what
+<module>
+.IP
+view the long package description
+.PP
+.B where
+<module>
+.IP
+display the section a module belongs to
+.PP
+.B website
+<module>
+.IP
+display the URL for the specified module
+.PP
+.B sources
+<module>
+.IP
+list all source files contained in a module
+.PP
+.B urls
+<module>
+.IP
+list all URLs for a module
+.PP
+.B maintainer
+<module>
+.IP
+display the email address of the person currently responsible for maintaining a specified module
+.PP
+.B version
+<module>
+.IP
+display version of module in moonbase
+.PP
+.B compile
+<module>
+.IP
+show the compiler output generated when the module was built
+.PP
+.B compiler
+<module>
+.IP
+display the version of compiler used for creating the ELF files in modules
+.PP
+.B links
+<module>
+.IP
+display the modules that this module's ELF binary files actually links to
+.PP
+.B install
+<module>
+.IP
+used to determine what files were installed by a module and where those files are located
+.PP
+.B conflicts
+.IP
+display modules with conflicting files
+.PP
+.B held
+.IP
+display held modules
+.PP
+.B exiled
+.IP
+display exiled modules
+.PP
+.B expired
+.IP
+display a list of modules which will be updated by a `lunar renew`
+.PP
+.B sum
+<module>
+.IP
+print CRC checksums for modules(s). If no module is given it defaults to all.
+.PP
+.B md5sum
+<module>
+.IP
+print module MD5 message digests (fingerprints). If no module is given it default to all
+.PP
+.B export
+.IP
+take a snapshot of all modules and configuration currently installed
+.PP
+.B import
+snapshot
+.IP
+restore the snapshot from a previous
+.I lvu export command (see the export option)
+.PP
+.B moonbase
+.IP
+prints the entire moonbase
+.PP
+.B html
+.IP
+prints the entire moonbase in a nice html format
+.PP
+.B updatelog
+.IP
+view summary log of previous lunar update
+.PP
+.B activity
+.IP
+view the main lunar activity log
+.PP
+.B search
+"phrase"
+.IP
+Searches modules long descriptions for
+.I phrase
+.PP
+.B service
+port|acronym
+.IP
+displays modules that provide the given service
+.I port|acronym
+.PP
+.B newer
+date
+.IP
+print packages that are newer than a specified date. the date must be specified in the 'yyyymmdd' format, where y=year, m=month, and d=day
+.PP
+.B older
+date
+.IP
+print packages that are older than a specified date. the date must be specified in the 'yyyymmdd' format, where y=year, m=month, and d=day
+.PP
+.B from
+<path/><file>
+.IP
+find out what module has
+.I <path>/file
+installed
+.PP
+.B installed
+<module>
+.IP
+view all installed packages and corresponding version numbers or check
+to see whether a particular package is installed and if it is
+installed display its version number
+.PP
+.B section
+<module>
+.IP
+view a list of all sections in the software catalogue or display a list of packages from a specific section
+.PP
+.B size
+<module>
+.IP
+display the size of a given module or all your installed modules in KB
+.PP
+.B voyeur
+<module>
+.IP
+start looking at what lin is compiling at the moment and outputs it. A module can be optionally specified.
+.PP
+.B depends
+<module>
+.IP
+displays the modules that explicitly or recursively depend on this module.
+.PP
+.B tree
+<module>
+.IP
+displays a tree of the module's dependencies.
+.PP
+.B eert
+<module>
+.IP
+displays a tree of the module's reverse dependencies.
+.PP
+.B new
+<module>
+.IP
+Attempt to create a module DETAILS file from scratch using cut-n-paste data from the user. Very dirty method to get a module started by just having 4 pieces of information handy: download url, descriptions and name
+.PP
+.B edit
+<module>
+.IP
+Copy an existing module to zlocal so it can be edited. Turn on ZLOCAL_OVERRIDES to make sure your edited module gets used instead of the default module.
+.PP
+.B unedit
+<module>
+.IP
+Discards your 'edit'ed zlocal module. Works the same as removing it.
+.PP
+.B submit
+<module>
+.IP
+Submit a module to the lunar module submission list/mail alias. Please only submit tested changes.
+.PP
+.B $MODULE_SCRIPT
+<module>
+.IP
+replace $MODULE_SCRIPT with any of the following DETAILS | CONFIGURE | CONFLICTS | PRE_BUILD | BUILD | POST_BUILD | POST_INSTALL | POST_REMOVE to show module scripts for the
+.I module
+.SH "AUTHOR"
+Original version written by Brian Peterson
+.PP
+Modified by Kyle Sallee
+.PP
+Updated Thomas Stewart 01/15/2002
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Edited and new functions added by Chuck Mead 05/21/2002
+.PP
+Updated again by Terry Chan 08/08/2003
+.PP
+Updated by Stefan Wold 06/07/2009
+.SH "REPORTING BUGS"
+Report bugs to <maintainer at lunar\-linux.org>
+.SH "SEE ALSO"
+lunar(8), lin(8), lrm(8), lget(8), moonbase(5)
+.SH "WARRANTY"
+This is free software with ABSOLUTELY NO WARRANTY
+
+
diff --git a/man/moonbase.5 b/man/moonbase.5
new file mode 100644
index 0000000..4fd6096
--- /dev/null
+++ b/man/moonbase.5
@@ -0,0 +1,133 @@
+.TH MOONBASE "5" "June 2009" "Lunar Linux" LUNAR
+.SH NAME
+moonbase \- the software catalog for the Lunar-Linux distribution
+.SH COPYRIGHT
+.if n moonbase(5) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.if t moonbase(5) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
+.SH "DESCRIPTION"
+The software catalog is a list of software modules (simply referred to
+as "modules") divided into sections. Each module contains one
+or more description files. Description files contain such information as
+module name, version, URL, directory information, etc. Other description files provide unpacking, compilation, installation, and tracking instructions. One section in the
+software catalog of particular interest is PROFILES. Profiles are
+groups of modules. With profiles you can automatically install predefined or
+custom-built module sets using a single command.
+.SH "SUMMARY"
+The moonbase is found under /var/lib/lunar. The top level of directories
+are the section names. The directories under the section names are the
+modules. Each module directory will have a BASH description file called
+DETAILS and optionally contain one or more of the following description files:
+CONFIGURE, DEPENDS, CONFLICTS, PRE_BUILD, BUILD, POST_BUILD, POST_INSTALL, POST_REMOVE.
+If a description file does not exist in the module directory then a set of default
+description instructions are used. The default instructions for each description
+file can be found in /var/lib/lunar/functions/*.lunar.
+.SH "DETAILS"
+\fBPROFILES\fR
+.PP
+Each profile contains a simplified DETAILS file: profile name, version, and
+description. Profiles are effectively just a DEPEND file with a list of
+modules to be installed.
+.PP
+\fBDESCRIPTION FILES\fR
+.PP
+A typical source code installation might look like this (assume the
+application is called foo):
+.IP
+step 1) find the URL and download the tarball
+.IP
+step 2) tar xvfz foo-1.00.tar.gz
+.IP
+step 3) cd foo
+.IP
+step 4) less README (perhaps you skip this step?)
+.IP
+step 5) less INSTALL (... and this one?)
+.IP
+step 6) ./configure
+.IP
+step 7) make
+.IP
+step 8) make install
+.PP
+.PP
+Here is a breakdown of the description files and how they relate to the above
+installation procedure:
+.PP
+\fBDETAILS\fR
+.IP
+This file is required and describes the URL for step 1. It also contains version information,
+module name, source name, source directory, and a description of the module.
+.PP
+\fBCONFIGURE\fR
+.IP
+The configure script.
+.PP
+\fBDEPENDS\fR
+.IP
+This file contains a list of other modules upon which the module depends.
+If dependencies are turned on then the modules listed are installed in order
+prior to installing module.
+.PP
+.PP
+\fBCONFLICTS\fR
+.IP
+Contains a list of modules that conflict with this module. Use sparingly. A good example of a reasonable
+use is when you have two modules in the moonbase that are the same but one is patched. eg apache and apache-mod_ssl
+.PP
+\fBPRE_BUILD\fR
+.IP
+This describes the unpacking process as performed in step 2. The default PRE_BUILD will work for
+tarballs with gzip or bzip2 compression.
+.PP
+\fBBUILD\fR
+.IP
+This describes the compilation and installation processes as performed in steps 6-8. If the
+software module compiles and installs using these 3 steps then the default
+BUILD can be used.
+.PP
+\fBPOST_BUILD\fR
+.IP
+The default POST_BUILD simply calls the software tracking script.
+.PP
+\fBPOST_INSTALL\fR
+.IP
+There is no default POST_INSTALL. If no POST_INSTALL is present in the
+module directory then no operations are performed in this step. Normally
+used to start daemons or extra cleanup or install default configuration files,
+after the module is ready to execute.
+.PP
+\fBPOST_REMOVE\fR
+.IP
+This is called, if present, after removing the module. See lrm(8).
+.PP
+.SH "NOTES"
+The best way to learn the software catalog is to examine some of the
+description files yourself. Most software catalog entries are simple. For
+example try looking under /var/lib/lunar/moonbase/editors/emacs.
+If however you want to look at a very unusual, but much more complex example look at
+/var/lib/lunar/moonbase/xorg7. To understand how the software
+catalog works, it is also important to look at /var/lib/lunar/functions/*.lunar and
+examine the functions default_pre_build, default_build, and default_post_build.
+.SH "AUTHOR"
+Kyle Sallee
+.PP
+Updated Thomas Stewart 01/15/2002
+.PP
+Converted to Lunar by Terry Chan 03/23/2002
+.PP
+Updated by Terry Chan 5/22/2002
+.PP
+Updated by Terry Chan 8/08/2003
+.PP
+Updated by Stefan Wold 6/07/2009
+.PP
+.SH "REPORTING BUGS"
+.PP
+Report bugs to <maintainer at lunar-linux.org>
+.SH "SEE ALSO"
+lunar(8), lin(8), lrm(8), lvu(1), lget(8)
+.PP
+.SH "WARRANTY"
+.PP
+This is free software with ABSOLUTELY NO WARRANTY
+
diff --git a/menu/alias.menu b/menu/alias.menu
new file mode 100644
index 0000000..3760d1b
--- /dev/null
+++ b/menu/alias.menu
@@ -0,0 +1,85 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# Copyright 2007 (c) GPLv2 - Auke Kok #
+# #
+############################################################
+
+
+alias_menu_list_aliases()
+{
+ for A in `cut -d: -f1 $MOONBASE/aliases`; do
+ echo ${A:1}
+ CHOICE=$(get_local_config `echo LUNAR_ALIAS_${A:1}`)
+ if [ -n "$CHOICE" ] ; then
+ echo "$CHOICE"
+ else
+ echo "[unset]"
+ fi
+ done
+}
+
+
+alias_menu_list_alias_choices()
+{
+ echo "None"
+ echo "None"
+ if [ -z "$(get_local_config `echo LUNAR_ALIAS_$1`)" ] ; then
+ echo "on"
+ else
+ echo "off"
+ fi
+ IFS=$STANDARD_IFS
+ for C in `grep "^%$1:" $MOONBASE/aliases | cut -d: -f2`; do
+ echo "$C"
+ echo "$C"
+ if [ $(get_local_config `echo LUNAR_ALIAS_$1`) == "$C" ] ; then
+ echo "on"
+ else
+ echo "off"
+ fi
+ done
+}
+
+
+select_aliases()
+{
+ export IFS=$ENTER_IFS
+
+ while true ; do
+ DEFAULT=${CHOICE}
+ CHOICE=`$DIALOG --title "Select Lunar Aliases" \
+ --ok-label "Select" \
+ --cancel-label "Close" \
+ --default-item "$DEFAULT" \
+ --menu "" 0 0 0 \
+ $(alias_menu_list_aliases)`
+ if [ $? != 0 ]; then
+ return
+ fi
+
+ # modify an alias
+ DEFAULT=$(get_local_config `echo LUNAR_ALIAS_$CHOICE`)
+ if [ -z "$DEFAULT" ] ; then
+ DEFAULT="None"
+ fi
+ ACHOICE=`$DIALOG --title "Select Lunar Aliases" \
+ --ok-label "Select" \
+ --cancel-label "Close" \
+ --default-item "$DEFAULT" \
+ --radiolist "" 0 0 0 \
+ $(alias_menu_list_alias_choices $CHOICE)`
+ if [ $? == 0 ]; then
+ # modify it
+ if [ "$ACHOICE" != "None" ] ; then
+ set_local_config `echo LUNAR_ALIAS_$CHOICE` "$ACHOICE"
+ else
+ unset_local_config `echo LUNAR_ALIAS_$CHOICE`
+ fi
+ fi
+ done
+}
diff --git a/menu/dmodule.menu b/menu/dmodule.menu
new file mode 100644
index 0000000..c5e9cfa
--- /dev/null
+++ b/menu/dmodule.menu
@@ -0,0 +1,55 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/dmodule #
+# includes menu for setting the default lunar module #
+# #
+# 20020715 #
+# #
+############################################################
+# #
+# Portions Copyrighted Kyle Sallee under GPL #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+set_default_module(){
+
+ PROMPT="Please select the master Lunar module.
+
+This setting permits the SA to track different base
+scripts via selecting the appropriate module. There
+are at least two base modules at the time of writing.
+
+Regardless of the number of modules listed here,
+*lunar* module is the default and stable one.
+
+The modules MUST exist in the moonbase and MUST meet
+some common criteria. Better do not hack by yourself."
+
+ LUNAR_MODULES=$(echo "$LUNAR_MODULES" | tr " " "\t")
+ LUNAR_MODULES=${LUNAR_MODULES:-lunar}
+ LUNAR_MODULE=${LUNAR_MODULE:-lunar}
+
+ unset SDM
+ for LUNAR in $LUNAR_MODULES ; do
+ [ "$LUNAR" == "$LUNAR_MODULE" ] && ONOFF="on" || ONOFF="off"
+ SDM=$SDM"$LUNAR:module:$ONOFF:"
+ done
+
+ SDM=$(echo "$SDM" | tr ":" "\t")
+
+ LUNAR_MODULE=`$DIALOG --title "Default Lunar Module" \
+ --ok-label "Commit" \
+ --radiolist \
+ "$PROMPT" \
+ 0 0 0 $SDM`
+
+ set_local_config "LUNAR_MODULE" "$LUNAR_MODULE"
+
+}
+
diff --git a/menu/download.menu b/menu/download.menu
new file mode 100644
index 0000000..9805a7f
--- /dev/null
+++ b/menu/download.menu
@@ -0,0 +1,320 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/download #
+# includes menu for download options in lunar #
+# #
+# 20020714 #
+# #
+############################################################
+# #
+# Portions Copyrighted Kyle Sallee under GPL #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# proxy portions Copyright 2002 by rodzilla #
+# #
+############################################################
+
+
+inputbox() {
+
+ $DIALOG --nocancel \
+ --inputbox \
+ "$1" 0 0 "$2"
+}
+
+configure_proxy() {
+
+ HTTP_PROMPT="Please enter the HTTP proxy server. \
+Example: http://192.168.1.1:8080/"
+
+ FTP_PROMPT="Please enter the FTP proxy server. \
+Example: http://192.168.1.1:8080/"
+
+ NO_PROMPT="Please enter all domains/ip addresses \
+(comma-separated) proxy should NOT be used for: \
+Example: .mit.edu,mysite.com"
+
+ HPROXY=`inputbox "$HTTP_PROMPT" "$http_proxy"` &&
+
+ [ "$ftp_proxy" == "" ] && ftp_proxy="$HPROXY"
+
+ FPROXY=`inputbox "$FTP_PROMPT" "$ftp_proxy"` &&
+ NPROXY=`inputbox "$NO_PROMPT" "$no_proxy"`
+
+}
+
+confirm_proxy_settings() {
+
+ confirm() {
+ $DIALOG $2 --nocancel --yesno "$1" 8 50
+ }
+
+ FINISHED=NO
+
+ while [ "$FINISHED" != "YES" ] ; do
+ PROMPT="Are these settings correct?"
+ PROMPT="$PROMPT\nHTTP Proxy: $HPROXY"
+ PROMPT="$PROMPT\n FTP Proxy: $FPROXY"
+ PROMPT="$PROMPT\n No Proxy: $NPROXY"
+
+ if confirm "$PROMPT" "--cr-wrap" ; then
+ FINISHED=YES
+ else
+ configure_proxy
+ FINISHED=NO
+ fi
+ done
+
+ set_local_config "http_proxy" "$HPROXY"
+ set_local_config "ftp_proxy" "$FPROXY"
+ set_local_config "no_proxy" "$NPROXY"
+}
+
+proxy_exit_message() {
+
+ $DIALOG --cr-wrap \
+ --title "Lunar Proxy Settings Complete" \
+ --msgbox \
+"Your proxy configuration has been saved.
+
+Please note that these proxy settings will only be used by
+Lunar (wget) and possibly some other command-line utilities.
+
+You will still have to configure proxy settings in your
+favorite web browser, etc..." 12 65
+
+}
+
+proxy_menu()
+{
+ configure_proxy
+ confirm_proxy_settings
+ proxy_exit_message
+}
+
+download_options() {
+
+set_download_rate() {
+ PROMPT="Please enter the maximum bytes per second for lgeting. \
+Example: enter 8000 for downloading no faster then \
+8 kBps, 80k for 80 kBps, or 1m for 1mBps"
+
+ if DOWNLOAD_RATE=`$DIALOG --title "Download Rate" \
+ --ok-label "Commit" \
+ --inputbox \
+ "$PROMPT" \
+ 0 0 "$DOWNLOAD_RATE"`
+ then
+ set_local_config "DOWNLOAD_RATE" "$DOWNLOAD_RATE"
+ fi
+}
+
+set_repository_threshold() {
+ PROMPT="Please enter the minimum time between repository updates in minutes, \
+enter 0 for no threshold. Default threshold is 10 minutes"
+
+ if REPOSITORY_THRESHOLD=`$DIALOG --title "Repository threshold" \
+ --ok-label "Commit" \
+ --inputbox \
+ "$PROMPT" \
+ 0 0 "$REPOSITORY_THRESHOLD"`
+ then
+ set_local_config "REPOSITORY_THRESHOLD" "$REPOSITORY_THRESHOLD"
+ fi
+}
+
+
+
+set_ftp_active(){
+
+ PROMPT="Please select the connection type for ftp downloads.
+
+Passive ftp is the safe and default option. However, if you
+are behind a weird firewall, or if you are experiencing
+download problems, select active ftp option.
+
+This option can also be set per module basis. Add
+FTP_ACTIVE=on in DETAILS file :=) or vice-versa."
+
+ FTP_ACTIVE=${FTP_ACTIVE:-off}
+ FTP_PASSIVE=${FTP_PASSIVE:-on}
+
+ [ "$FTP_ACTIVE" == "on" ] &&
+ FTP_PASSIVE=off ||
+ FTP_PASSIVE=on
+
+ FTP_CONNECTION=`$DIALOG --title "Ftp Connection" \
+ --ok-label "Commit" \
+ --radiolist \
+ "$PROMPT" \
+ 0 0 0 \
+ "Passive" "normal behaviour" $FTP_PASSIVE \
+ "Active" "behind a firewall" $FTP_ACTIVE`
+
+ case $FTP_CONNECTION in
+ Active) FTP_ACTIVE=on
+ ;;
+
+ Passive) FTP_ACTIVE=off
+ ;;
+ esac
+
+ set_local_config "FTP_ACTIVE" "$FTP_ACTIVE"
+}
+
+set_partial_downloads(){
+
+ PROMPT="Please enable/disable the partial download option.
+
+This is the -c option of wget. Enable is default
+and works fine on almost all cases.
+
+This option can also be set per module basis. Add
+CONTINUE=off in DETAILS file :=) or vice-versa."
+
+ CONTINUE=${CONTINUE:-on}
+
+ PARTIAL=`$DIALOG --title "Partial Downloads" \
+ --ok-label "Commit" \
+ --checklist \
+ "$PROMPT" \
+ 0 0 0 \
+ "Enable" "partial downloads" $CONTINUE`
+
+ #lets get rid of " and spaces in the variable
+ PARTIAL=`echo $PARTIAL | sed s/\"//g | tr -d " "`
+
+ if [ "$PARTIAL" == "Enable" ] ; then
+ set_local_config "CONTINUE" "on"
+ else
+ set_local_config "CONTINUE" "off"
+ fi
+}
+
+
+set_cache_usage(){
+
+ PROMPT="Please enable/disable the cache usage.
+
+This options controls the use of cache for http downloads.
+Default is ON. If this option is set to off, wget will send
+a Pragma: no-cache directive to http server.
+
+This option can also be set per module basis. Add
+USE_CACHE=off in DETAILS file :=) or vice-versa."
+
+ USE_CACHE=${USE_CACHE:-on}
+
+ CACHE=`$DIALOG --title "Cache Usage" \
+ --ok-label "Commit" \
+ --checklist \
+ "$PROMPT" \
+ 0 0 0 \
+ "Enable" "http cache usage" $USE_CACHE`
+
+ #lets get rid of " and spaces in the variable
+ CACHE=`echo $CACHE | sed s/\"//g | tr -d " "`
+
+ if [ "$CACHE" == "Enable" ] ; then
+ set_local_config "USE_CACHE" "on"
+ else
+ set_local_config "USE_CACHE" "off"
+ fi
+}
+
+set_retries() {
+ PROMPT="Please enter the maximum number of retries.
+
+Example: enter 3 for retrying the download three times.
+The default value (if unset) is 5. Enter 0 for infinite
+number of retries.
+
+This option can also be set per module basis. Add
+NUM_RETRY=<n> in DETAILS file :=)"
+
+ NUM_RETRY=${NUM_RETRY:-5}
+
+ if NUM_RETRY=`$DIALOG --title "Number of Retries" \
+ --ok-label "Commit" \
+ --inputbox \
+ "$PROMPT" \
+ 0 0 "$NUM_RETRY"`
+ then
+ set_local_config "NUM_RETRY" "$NUM_RETRY"
+ fi
+}
+
+set_exhaustive() {
+ PROMPT="If you want, lget may try downloading the file from all
+available mirrors, instead of the one you select from the mirror
+menu. All mirrors will be tried until the file is found.
+
+This is not recommended for normal downloads, broken downloads
+should be reported to maintainer at lunar-linux.org.
+"
+
+ EXHAUSTIVE=${EXHAUSTIVE:-off}
+
+ EXHAUSTIVE=`$DIALOG --title "Exhaustive mirror testing: " \
+ --ok-label "Commit" \
+ --checklist \
+ "$PROMPT" \
+ 0 0 0 \
+ "Enable" "exhaustive mirror testing" $EXHAUSTIVE`
+
+ EXHAUSTIVE=`echo $EXHAUSTIVE | sed s/\"//g | tr -d " "`
+
+ if [ "$EXHAUSTIVE" == "Enable" ] ; then
+ set_local_config "EXHAUSTIVE" "on"
+ else
+ set_local_config "EXHAUSTIVE" "off"
+ fi
+
+}
+
+
+
+while
+ A_HELP="Active or passive connections while using ftp"
+ C_HELP="Continue to get or re-get the partial downloads"
+ N_HELP="How many times will wget try to download the file?"
+ H_HELP="Cache usage for http downloads"
+ R_HELP="Per process download rate"
+ P_HELP="Proxy Settings"
+ E_HELP="Test all mirrors available on download"
+ T_HELP="Repository update threshold time"
+
+ COMMAND=`$DIALOG --title "Download Options" \
+ --item-help \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --menu \
+ "" \
+ 0 40 8 \
+ "A" "Ftp Active/Passive" "$A_HELP" \
+ "C" "Partial Downloads" "$C_HELP" \
+ "H" "Cache Usage" "$H_HELP" \
+ "N" "Number of Retries" "$N_HELP" \
+ "P" "Proxies" "$P_HELP" \
+ "R" "Download Rate" "$R_HELP" \
+ "E" "Exhaustive mirrors" "$E_HELP" \
+ "T" "Repository update threshold" "$T_HELP"`
+
+ do
+ case $COMMAND in
+ A) set_ftp_active ;;
+ C) set_partial_downloads ;;
+ H) set_cache_usage ;;
+ N) set_retries ;;
+ P) proxy_menu ;;
+ R) set_download_rate ;;
+ E) set_exhaustive ;;
+ T) set_repository_threshold ;;
+ esac
+ done
+}
+
diff --git a/menu/integrity.menu b/menu/integrity.menu
new file mode 100644
index 0000000..b94abd6
--- /dev/null
+++ b/menu/integrity.menu
@@ -0,0 +1,61 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/integrity #
+# includes menu for lunar fix integrity checking options #
+# #
+# 20020714 #
+# #
+############################################################
+# #
+# Portions Copyrighted Kyle Sallee under GPL #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+integrity_menu() {
+ INT_TITLE="Integrity Checking Selection Menu"
+ INT_HELP="Please select the tests which lunar fix should execute."
+ FIND_HELP="Discover missing binary executables, libraries, and header files"
+ LDD_HELP="Discover broken binary executables, and libraries"
+ SYM_HELP="Discover misowned symbolic links to files"
+ MD5SUM_HELP="Discover modified binary executables, and libraries"
+
+ if INT_CHECKS=`$DIALOG --title "$INT_TITLE" \
+ --no-cancel \
+ --item-help \
+ --separate-output \
+ --checklist \
+ "$INT_HELP" \
+ 0 0 0 \
+ "FIND_CHECK" "" "$FIND_CHECK" "$FIND_HELP" \
+ "MD5SUM_CHECK" "" "$MD5SUM_CHECK" "$MD5SUM_HELP" \
+ "LDD_CHECK" "" "$LDD_CHECK" "$LDD_HELP" \
+ "SYM_CHECK" "" "$SYM_CHECK" "$SYM_HELP"`
+ then
+ FIND_CHECK=off
+ MD5SUM_CHECK=off
+ LDD_CHECK=off
+ SYM_CHECK=off
+
+ for CHECK in $INT_CHECKS; do
+ case $CHECK in
+ FIND_CHECK) FIND_CHECK=on ;;
+ MD5SUM_CHECK) MD5SUM_CHECK=on ;;
+ LDD_CHECK) LDD_CHECK=on ;;
+ SYM_CHECK) SYM_CHECK=on ;;
+ esac
+ done
+
+ set_local_config "FIND_CHECK" "$FIND_CHECK"
+ set_local_config "LDD_CHECK" "$LDD_CHECK"
+ set_local_config "MD5SUM_CHECK" "$MD5SUM_CHECK"
+ set_local_config "SYM_CHECK" "$SYM_CHECK"
+
+ fi
+}
+
diff --git a/menu/license.menu b/menu/license.menu
new file mode 100644
index 0000000..01bd3a1
--- /dev/null
+++ b/menu/license.menu
@@ -0,0 +1,71 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/license #
+# includes menu for setting the accepted/rejected licenses #
+# #
+# 20051105 #
+# #
+############################################################
+# #
+# Copyrighted Auke Kok 2005 under GPLv2 #
+# #
+############################################################
+
+set_accepted_licenses()
+{
+
+ PROMPT="Please select acceptable licenses
+
+Lunar by default only accept osi-approved licenses. You will
+need to tell lunar to explicitly accept or reject licenses if
+you wish to change this behaviour.
+
+You have several ways of doing so:
+ o Enter \"all\" in this field to accept every license.
+ o Enter \"osi\" to accept any known osi approved license.
+ o Or enter any specific license name in here to accept it.
+ o Enter licenses in the REJECTED_LICENSES and leave this
+ field empty to reject only those licenses.
+
+Currently known osi licenses: gpl gpl2 lgpl gfdl bsd mpl cc apache
+artistic qpl."
+
+ ACCEPTED_LICENSES=`$DIALOG --title "Select accepted licenses" \
+ --ok-label "Commit" --inputbox \
+ "$PROMPT" 0 0 "$ACCEPTED_LICENSES"`
+
+ set_local_config ACCEPTED_LICENSES "$ACCEPTED_LICENSES"
+
+}
+
+set_rejected_licenses()
+{
+
+ PROMPT="Please select rejected licenses
+
+Lunar by default only accepts osi-approved licenses. You will
+need to tell lunar to explicitly accept or reject licenses if
+you wish to change this behaviour.
+
+You have several ways of doing so:
+ o use the ACCEPTED_LICENSES field to accept only specific licenses
+ o enter any license name in here to reject it - however \"osi\"
+ or \"all\" does not work in this field - you must use the exact
+ name.
+
+Remember that if you leave ACCEPTED_LICENSES empty, all licenses will
+be accepted that do not match the REJECTED_LICENSES list."
+
+ REJECTED_LICENSES=`$DIALOG --title "Select rejected licenses" \
+ --ok-label "Commit" --inputbox \
+ "$PROMPT" 0 0 "$REJECTED_LICENSES"`
+
+ set_local_config REJECTED_LICENSES "$REJECTED_LICENSES"
+
+}
+
diff --git a/menu/mirrors.menu b/menu/mirrors.menu
new file mode 100644
index 0000000..9b8df55
--- /dev/null
+++ b/menu/mirrors.menu
@@ -0,0 +1,83 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/mirror #
+# includes menu for software mirrors selection in lunar #
+# #
+# 20020712 #
+# #
+############################################################
+# #
+# Portions Copyrighted Kyle Sallee under GPL #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+mirror_list() {
+ sort -r $MIRRORS/$1 | tr -s "\t" | tr "\t" "\n" | tac
+}
+
+select_mirror() {
+ $DIALOG --title "Select Mirror Please" \
+ --ok-label "Select" \
+ --menu \
+ "" \
+ 0 80 10 \
+ $(mirror_list $1)
+}
+
+mirror_menu() {
+ while
+ G_HELP="Select mirror for downloading GNU sources."
+ K_HELP="Select mirror for downloading KDE sources."
+ N_HELP="Select mirror for downloading GNOME sources."
+ L_HELP="Select mirror for downloading kernel related sources."
+ SF_HELP="Select mirror for downloading SourceForge sources."
+ LR_HELP="Select the mirror for a last resort download place."
+ X_HELP="Select mirror for downloading XFree86 related sources."
+ XORG_HELP="Select mirror for downloading XOrg related sources."
+ HELP="Selecting a mirror site can speed your downloads."
+
+ COMMAND=`$DIALOG --title "Mirror Menu" \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --item-help \
+ --menu "" 0 0 0 \
+ "GNOME" "" "$N_HELP" \
+ "GNU" "" "$G_HELP" \
+ "KDE" "" "$K_HELP" \
+ "KERNEL" "" "$L_HELP" \
+ "SFORGE" "" "$SF_HELP" \
+ "LRESORT" "" "$LR_HELP" \
+ "XFREE86" "" "$X_HELP" \
+ "XORG" "" "$XORG_HELP"`
+
+ do
+ case $COMMAND in
+ GNOME) MIRROR=" GNOME_URL" ;;
+ GNU) MIRROR=" GNU_URL" ;;
+ KDE) MIRROR=" KDE_URL" ;;
+ KERNEL) MIRROR=" KERNEL_URL" ;;
+ XFREE86) MIRROR=" XFREE86_URL" ;;
+ XORG) MIRROR=" XORG_URL" ;;
+ SFORGE) MIRROR=" SFORGE_URL" ;;
+ LRESORT) MIRROR=" LRESORT_URL" ;;
+ esac
+
+ if MIRROR_URL=$(select_mirror $COMMAND); then
+ if [ "$MIRROR_URL" == "Custom" ]; then
+ MIRROR_URL=$($DIALOG --inputbox "Please enter the URL." 0 0)
+ fi
+
+ if [ -n "$MIRROR_URL" ] ; then
+ set_local_config "$MIRROR" "$MIRROR_URL" &&
+ $DIALOG --msgbox "$MIRROR=$MIRROR_URL saved in $LOCAL_CONFIG" 8 60
+ fi
+ fi
+ done
+}
+
diff --git a/menu/moonbase.menu b/menu/moonbase.menu
new file mode 100644
index 0000000..6f63c88
--- /dev/null
+++ b/menu/moonbase.menu
@@ -0,0 +1,47 @@
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# $MENUS/moonbase #
+# includes menu for setting the default moonbase branch #
+# #
+# 20120317 #
+# #
+############################################################
+# #
+# Portions of dmodule.menu - Check COPYRIGHT there #
+# Copyright Jean Bruenn <wdp at lunar-linux.org> (GPLv2) #
+# #
+############################################################
+
+set_default_moonbase() {
+
+ PROMPT="Please choose the moonbase branch to use.
+
+ This setting controls whether the stable or
+ unstable branch of lunar linux' moonbase will
+ be used.";
+
+ MOONBASE_TYPES=$(echo "$MOONBASE_TYPES" | tr " " "\t")
+ MOONBASE_TYPES=${MOONBASE_TYPES:-stable}
+ MOONBASE_TYPE=${MOONBASE_TYPE:-stable}
+ unset SDM
+ for MOONBASE in $MOONBASE_TYPES; do
+ [ "$MOONBASE" == "$MOONBASE_TYPE" ] && ONOFF="on" || ONOFF="off"
+ SDM=$SDM"$MOONBASE:type:$ONOFF:"
+ done
+
+ SDM=$(echo "$SDM" | tr ":" "\t")
+
+ MOONBASE_TYPE=`$DIALOG --title "Default Moonbase Branch" \
+ --ok-label "Commit" \
+ --radiolist \
+ "$PROMPT" \
+ 0 0 0 $SDM`
+
+ set_local_config "MOONBASE_TYPE" "$MOONBASE_TYPE"
+
+}
diff --git a/mirrors/GNOME b/mirrors/GNOME
new file mode 100644
index 0000000..008468b
--- /dev/null
+++ b/mirrors/GNOME
@@ -0,0 +1,18 @@
+Custom Mirror Custom
+Master Site FTP ftp://ftp.gnome.org/pub/GNOME/
+Master Site HTTP http://ftp.gnome.org/pub/GNOME/
+Australia http://mirror.aarnet.edu.au/pub/GNOME/
+Australia http://planetmirror.com/pub/gnome/
+Belgium http://ftp.belnet.be/mirror/ftp.gnome.org/
+France ftp://fr.rpmfind.net/linux/gnome.org/
+France ftp://fr2.rpmfind.net/linux/gnome.org/
+Italy http://ftp.unina.it/pub/linux/GNOME/
+Norway ftp://ftp.no.gnome.org/pub/GNOME/
+Poland ftp://sunsite.icm.edu.pl/pub/Linux/GNOME/
+Spain ftp://ftp.dit.upm.es/pub/GNOME/
+Sweden ftp://ftp.dataplus.se/pub/GNOME/
+Sweden ftp://ftp.acc.umu.se/pub/GNOME/
+United Kingdom http://ftp.linux.org.uk/mirrors/ftp.gnome.org/
+US ftp://ftp.cse.buffalo.edu/pub/Gnome/
+US or Canada http://archive.progeny.com/GNOME/
+US or Canada http://ftp.rpmfind.net/linux/gnome.org/
diff --git a/mirrors/GNU b/mirrors/GNU
new file mode 100644
index 0000000..62be5a3
--- /dev/null
+++ b/mirrors/GNU
@@ -0,0 +1,107 @@
+"Master Site" ftp://ftp.gnu.org/pub/gnu/
+"Custom Mirror" Custom
+California ftp://gatekeeper.dec.com/pub/GNU/
+California ftp://ftp.keystealth.org/pub/gnu/
+Illinois ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/
+Indiana ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/
+Kentucky ftp://gnu.ms.uky.edu/pub/mirrors/gnu/
+Maryland ftp://ftp.digex.net/pub/gnu/
+Massachusetts ftp://aeneas.mit.edu/pub/gnu/
+Missouri ftp://wuarchive.wustl.edu/systems/gnu/
+New York ftp://ftp.cs.columbia.edu/archives/gnu/prep/
+New York ftp://ftp.stealth.net/pub/mirrors/ftp.gnu.org/
+North Carolina http://metalab.unc.edu/pub/gnu/
+Pennsylvania ftp://boron.club.cc.cmu.edu/gnu/
+Tennessee ftp://sunsite.utk.edu/pub/gnu/ftp/
+Tennessee ftp://thales.memphis.edu/pub/gnu/
+Wisconsin ftp://ftp.twtelecom.net/pub/GNU/
+South Africa ftp://ftp.sun.ac.za/gnu/
+Brazil ftp://ftp.unicamp.br/pub/gnu/
+Brazil ftp://master.softaplic.com.br/pub/gnu/
+Brazil ftp://ftp.matrix.com.br/pub/gnu/
+Canada ftp://ftp.cs.ubc.ca/mirror2/gnu/
+Chile ftp://ftp.inf.utfsm.cl/pub/gnu/
+Costa Rica ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/
+Mexico ftp://www.gnu.unam.mx/pub/gnu/software/
+Mexico ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/
+Australia ftp://ftp.progsoc.uts.edu.au/pub/gnu/
+Australia ftp://mirror.aarnet.edu.au/pub/gnu/
+Australia ftp://gnu.mirror.pacific.net.au/gnu/
+China ftp://ftp.sea9.com/pub/gnu/
+China ftp://ftp.cs.cuhk.edu.hk/pub/gnu/
+China ftp://sunsite.ust.hk/pub/gnu/
+China ftp://ftp.shellhung.org/pub/gnu/
+India ftp://ftp.kernel.org.in/gnu.org/ftp/
+Indonesia ftp://sapi.vlsm.org/gnu/
+Indonesia http://sapi.vlsm.org/gnu/
+Japan ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep/
+Japan ftp://core.ring.gr.jp/pub/GNU/
+Japan ftp://ftp.ring.gr.jp/pub/GNU/
+Japan ftp://mirrors.hbi.co.jp/gnu/
+Japan ftp://ftp.ayamura.org/pub/gnu/
+Korea ftp://ftpmirror.hanyang.ac.kr/GNU/
+Korea ftp://ftp.linux.sarang.net/mirror/gnu/gnu/
+Korea ftp://ftp.xgate.co.kr/pub/mirror/gnu/
+Saudi Arabia ftp://ftp.isu.net.sa/pub/mirrors/ftp.gnu.org/gnu/
+Taiwan ftp://coda.nctu.edu.tw/UNIX/gnu/
+Taiwan ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/
+Taiwan ftp://ftp.nctu.edu.tw/UNIX/gnu/
+Austria ftp://ftp.gnu.vbs.at/
+Austria ftp://ftp.univie.ac.at/packages/gnu/
+Austria ftp://gd.tuwien.ac.at/gnu/gnusrc/
+Austria http://gd.tuwien.ac.at/gnu/gnusrc/
+Czeck Republic ftp://ftp.fi.muni.cz/pub/gnu/
+Denmark ftp://ftp.denet.dk/mirrors/ftp.gnu.org/pub/gnu/
+Denmark ftp://ftp.dkuug.dk/pub/gnu/
+Denmark ftp://sunsite.dk/mirrors/gnu/
+Denmark http://mirrors.sunsite.dk/gnu/
+Finland ftp://ftp.funet.fi/pub/gnu/prep/
+France ftp://ftp.irisa.fr/pub/gnu/
+France ftp://ftp.medasys-digital-systems.fr/pub/gnu/
+Germany ftp://ftp.cs.tu-berlin.de/pub/gnu/
+Germany ftp://ftp.informatik.rwth-aachen.de/pub/gnu/
+Germany ftp://ftp.leo.org/pub/comp/os/unix/gnu/
+Germany ftp://ftp.de.uu.net/pub/gnu/
+Germany ftp://ftp.freenet.de/pub/ftp.gnu.org/gnu/
+Germany ftp://ftp.cs.uni-bonn.de/pub/gnu/
+Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/
+Greece ftp://tp.forthnet.gr/pub/gnu/
+Greece ftp://ftp.ntua.gr/pub/gnu/
+Greece ftp://ftp.duth.gr/pub/gnu/
+Greece ftp://ftp.aua.gr/pub/mirrors/GNU/
+Greece ftp://ftp.physics.auth.gr/pub/gnu/
+Ireland ftp://ftp.esat.net/pub/gnu/
+Italy ftp://ftp.oasi.gpa.it/pub/gnu/
+Netherlands ftp://ftp.nluug.nl/pub/gnu/
+Netherlands ftp://ftp.mirror.nl/pub/mirror/gnu/
+Netherlands ftp://ftp.nl.uu.net/pub/gnu/
+Norway ftp://ftp.ntnu.no/pub/gnu/
+Norway ftp://ftp.gnu.no/
+Norway ftp://sunsite.uio.no/pub/gnu/
+Poland ftp://ftp.task.gda.pl/pub/gnu/
+Poland ftp://sunsite.icm.edu.pl/pub/gnu/
+Portugal ftp://ftp.ci.uminho.pt/pub/mirrors/gnu/
+Portugal http://ciumix.ci.uminho.pt/mirrors/gnu/
+Portugal ftp://ftp.ist.ut1.pt/pub/gnu/
+Portugal ftp://mirrors.netvisao.pt/gnu/
+Romania ftp://archive.logicnet.ro/mirrors/ftp.gnu.org/gnu/
+Romania ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/
+Russia ftp://ftp.chg.ru/pub/gnu/
+Slovenia ftp://ftp.arnes.si/gnu/
+Spain ftp://ftp.etsimo.uniovi.es/pub/gnu/
+Spain ftp://ftp.rediris.es/pub/gnu/
+Sweden ftp://ftp.isy.liu.se/pub/gnu/
+Sweden ftp://ftp.staken.kth.se/pub/gnu/
+Sweden ftp://ftp.luth.se/pub/unix/gnu/
+Sweden ftp://ftp.sunet.se/pub/gnu/
+Sweden ftp://ftp.ch1.chalmers.se/pub/gnu/
+Switzerland ftp://ftp.eunet.ch/mirrors4/gnu/
+Switzerland ftp://sunsite.cnlab-switch.ch/mirrors/gnu/
+Turkey ftp://ftp.baskent.edu.tr/gnu/ftp/
+Turkey ftp://ftp.ulak.net.tr/pub/gnu/
+United Kingdom ftp://ftp.mcc.ac.uk/pub/gnu/
+United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/pub/gnu/
+United Kingdom ftp://ftp.warwick.ac.uk/pub/gnu/
+United Kingdom ftp://sunsite.org.uk/gnu/
+United Kingdom ftp://ftp.hands.com/ftp.gnu.org/
diff --git a/mirrors/KDE b/mirrors/KDE
new file mode 100644
index 0000000..e554980
--- /dev/null
+++ b/mirrors/KDE
@@ -0,0 +1,82 @@
+"Master Site" ftp://ftp.kde.org/pub/kde/
+"Custom Mirror" Custom
+USA ftp://download.sourceforge.net/pub/mirrors/kde/
+USA http://download.sourceforge.net/mirrors/kde/
+USA ftp://kde.us.themoes.org/pub/kde/
+USA http://kde.us.themos.org/pub/kde/
+USA ftp://ftp.us.kde.org/pub/kde/
+USA http://ftp.us.kde.org/pub/kde/
+USA ftp://csociety-ftp.ecn.purdue.edu/pub/kde/
+USA http://csociety-ftp.ecn.purdue.edu/pub/kde/
+United Kingdom ftp://kde.uk.themoes.org/pub/kde/
+United Kingdom http://kde.uk.themoes.org/pub/kde/
+United Kingdom ftp://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
+United Kingdom http://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
+Australia ftp://ftp.au.kde.org/pub/kde/
+Australia http://ftp.au.kde.org/pub/kde/
+Austria ftp://ftp.at.kde.org/hci/kde/
+Austria http://ftp.at.kde.org/hci/kde/
+Czech Republic ftp://ftp.fi.muni.cz/pub/kde/
+Czech Republic http://ftp.fi.muni.cz/pub/kde/
+Czech Republic ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
+Czech Republic http://sunsite.mff.cuni.cz/MIRRORS/ftp.kde.org/pub/kde/
+Germany ftp://ftp.de.kde.org/pub/kde/
+Germany http://ftp.de.kde.org/pub/kde/
+Germany ftp://ftp.fh-heilbronn.de/pub/mirrors/kde/
+Germany ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/
+Germany ftp://ftp.gwdg.de/pub/x11/kde/
+Germany http://ftp.gwdg.de/pub/x11/kde/
+Germany ftp://ftp.tu-chemnitz.de/pub/X11/kde/
+Germany http://cgi.tu-chemnitz.de/ftp-home/pub/X11/kde/
+Germany ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde/
+Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/
+Germany ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde/
+Netherlands ftp://ftp.eu.uu.net/pub/kde/
+Poland ftp://ftp.tuniv.szczecin.pl/pub/kde/
+Poland htp://ftp.tuniv.szczecin.pl/pub/kde/
+Poland ftp://ftp.task.gda.pl/pub/unix/kde/
+Poland http://ftp.task.gda.pl/pub/unix/kde/
+Poland ftp://sunsite.icm.edu.pl/pub/unix/kde/
+Switzerland ftp://sunsite.cnlab-switch.ch/mirror/kde/
+Denmark ftp://sunsite.dk/mirrors/kde/
+Denmark http://mirrors.sunsite.dk/kde/
+Sweden ftp://ftp.se.kde.org/pub/kde/
+Sweden http://ftp.se.kde.org/pub/kde/
+Sweden ftp://ftp.dataplus.se/pub/linux/kde/
+Greece ftp://ftp.duth.gr/pub/kde/
+Greece http://ftp.duth.gr/pub/kde/
+Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/
+Yugoslavia ftp://ftp.kde.org.yu/mirrors/ftp.kde.org/pub/kde/
+Belgium ftp://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
+Belgium http://ftp.belnet.be/pub/mirror/ftp.kde.org/pub/kde/
+Belgium ftp://ftp.easynet.be/kde/
+Belgium http://ftp.easynet.be/kde/
+France ftp://ftp.lip6.fr/pub/X11/kde/
+France http:://www-ftp.lip6.fr/pub/X11/kde/
+Ireland ftp://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
+Ireland http://ftp.esat.net/mirrors/ftp.kde.org/pub/kde/
+Portugal ftp://ftp.dei.uc.pt/pub/kde/
+Portugal http://ftp.dei.uc.pt/pub/kde/
+Portugal ftp://ftp.eq.uc.pt/pub/software/unix/KDE/
+Portugal http://ftp.eq.uc.pt/software/unix/KDE/
+United Kingdom ftp://ftp.net.lut.ac.uk/kde/
+United Kingdom http://ftp.net.lut.ac.uk/kde/
+United Kingdom ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.kde.org/pub/kde/
+Bulgaria ftp://ftp.digsys.bg/pub/kde/
+Romania ftp://ftp.lbi.ro/pub/Linux/KDE/
+Romania ftp://ftp.tuiasi.ro/pub/mirrors/ftp.kde.org/pub/kde/
+Russia ftp://ftp.chg.ru/pub/X11/kde/
+Hong Kong ftp://ftp.dll.com.hk/pub/mirrors/KDE/
+Japan ftp://mirror.nucba.ac.jp/mirror/KDE/
+Japan http://mirror.nucba.ac.jp/mirror/KDE/
+Republic of Korea ftp://linux.sarang.net/mirror/desktop/kde/
+Singapore ftp://kde.lugs.org.sg/pub/kde.org/
+South Africa ftp://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
+South Africa http://ftp.sun.ac.za/sites/ftp.kde.org/pub/kde/
+USA ftp://ftp.rutgers.edu/pub/kde/
+USA http://ftp.rutgers.edu/pub/kde/
+USA ftp://mirror.chpc.utah.edu/pub/kde/
+Brazil ftp://ftp.matrix.com.br/pub/kde/
+Brazil http://ftp.matrix.com.br/pub/kde/
+Costa Rica ftp://ftp.ucr.ac.cr/pub/Unix/linux/kde/
diff --git a/mirrors/KERNEL b/mirrors/KERNEL
new file mode 100644
index 0000000..a939dbd
--- /dev/null
+++ b/mirrors/KERNEL
@@ -0,0 +1,482 @@
+"Master Site" ftp://ftp.kernel.org/
+"Custom Mirror" Custom
+Albania http://www.al.kernel.org/
+Albania ftp://ftp.al.kernel.org/
+Algeria http://www.dz.kernel.org/
+Algeria ftp://ftp.dz.kernel.org/
+American Samoa http://www.as.kernel.org/
+American Samoa ftp://ftp.as.kernel.org/
+Andorra http://www.ad.kernel.org/
+Andorra ftp://ftp.ad.kernel.org/
+Angola http://www.ai.kernel.org/
+Angola ftp://ftp.ai.kernel.org/
+Anguilla http://www.ai.kernel.org/
+Anguilla ftp://ftp.ai.kernel.org/
+Antarctica http://www.aq.kernel.org/
+Antarctica ftp://ftp.aq.kernel.org/
+Antigua and Barbuda http://www.ag.kernel.org/
+Antigua and Barbuda ftp://ftp.ag.kernel.org/
+Argentina http://www.ag.kernel.org/
+Argentina ftp://ftp.ag.kernel.org/
+Armenia http://www.am.kernel.org/
+Armenia ftp://ftp.am.kernel.org/
+Aruba http://www.aw.kernel.org/
+Aruba ftp://ftp.aw.kernel.org/
+Ascension Island http://www.ac.kernel.org/
+Ascension Island ftp://ftp.ac.kernel.org/
+Australia http://www.au.kernel.org/
+Australia ftp://ftp.au.kernel.org/
+Austria http://www.at.kernel.org/
+Austria ftp://ftp.at.kernel.org/
+Azerbaijan http://www.az.kernel.org/
+Azerbaijan ftp://ftp.az.kernel.org/
+Aland http://www.av.kernel.org/
+Aland ftp://ftp.av.kernel.org/
+Bahamas http://www.bs.kernel.org/
+Bahamas ftp://ftp.bs.kernel.org/
+Bahrain http://www.bh.kernel.org/
+Bahrain ftp://ftp.bh.kernel.org/
+Bangladesh http://www.bd.kernel.org/
+Bangladesh ftp://ftp.bd.kernel.org/
+Barbados http://www.bb.kernel.org/
+Barbados ftp://ftp.bb.kernel.org/
+Belarus http://www.by.kernel.org/
+Belarus ftp://ftp.by.kernel.org/
+Belgium http://www.be.kernel.org/
+Belgium ftp://ftp.be.kernel.org/
+Belize http://www.bz.kernel.org/
+Belize ftp://ftp.bz.kernel.org/
+Benin http://www.bj.kernel.org/
+Benin ftp://ftp.bj.kernel.org/
+Bermuda http://www.vm.kernel.org/
+Bermuda ftp://ftp.bm.kernel.org/
+Bhuta'n http://www.bt.kernel.org/
+Bhuta'n ftp://ftp.bt.kernel.org/
+Bolivia http://www.bo.kernel.org/
+Bolivia ftp://ftp.bo.kernel.org/
+Bosnia and Herzegowina http://www.ba.kernel.org/
+Bosnia and Herzegowina ftp://ftp.ba.kernel.org/
+Botswana http://www.bw.kernel.org/
+Botswana ftp://ftp.bw.kernel.org/
+Bouvet Island http://www.bv.kernel.org/
+Bouvet Island ftp://ftp.bv.kernel.org/
+Brazil http://www.br.kernel.org/
+Brazil ftp://ftp.br.kernel.org/
+British Indian Ocean Territory http://www.io.kernel.org/
+British Indian Ocean Territory ftp://ftp.io.kernel.org/
+Brunei Darussalam http://www.bn.kernel.org/
+Brunei Darussalam ftp://ftp.bn.kernel.org/
+Bulgaria http://www.bg.kernel.org/
+Bulgaria ftp://ftp.bg.kernel.org/
+Burkina Faso http://www.bf.kernel.org/
+Burkina Faso ftp://ftp.bf.kernel.org/
+Burundi http://www.bi.kernel.org/
+Burundi ftp://ftp.bi.kernel.org/
+Cambodia http://www.kh.kernel.org/
+Cambodia ftp://ftp.kh.kernel.org/
+Cameroon http://www.cm.kernel.org/
+Cameroon ftp://ftp.cm.kernel.org/
+Canada http://www.ca.kernel.org/
+Canada ftp://ftp.ca.kernel.org/
+Canary Islands http://www.ic.kernel.org/
+Canary Islands ftp://ftp.ic.kernel.org/
+Cape Verde http://www.cv.kernel.org/
+Cape Verde ftp://ftp.cv.kernel.org/
+Cayman Islands http://www.ky.kernel.org/
+Cayman Islands ftp://ftp.ky.kernel.org/
+Central African Republic http://www.cf.kernel.org/
+Central African Republic ftp://ftp.cf.kernel.org/
+Ceuta, Melilla http://www.ea.kernel.org/
+Ceuta, Melilla ftp://ftp.ea.kernel.org/
+Chad http://www.td.kernel.org/
+Chad ftp://ftp.td.kernel.org/
+Chile http://www.cl.kernel.org/
+Chile ftp://ftp.cl.kernel.org/
+China http://www.cn.kernel.org/
+China ftp://ftp.cn.kernel.org/
+Christmas Island http://www.cx.kernel.org/
+Christmas Island ftp://ftp.cx.kernel.org/
+Clipperton Island http://www.cp.kernel.org/
+Clipperton Island ftp://ftp.cp.kernel.org/
+Cocos (Keeling) Islands http://www.cc.kernel.org/
+Cocos (Keeling) Islands ftp://ftp.cc.kernel.org/
+Colombia http://www.co.kernel.org/
+Colombia ftp://ftp.co.kernel.org/
+Comoros http://www.km.kernel.org/
+Comoros ftp://ftp.km.kernel.org/
+Congo, Republic of http://www.cg.kernel.org/
+Congo, Republic of ftp://ftp.cg.kernel.org/
+Congo, Democratic Republic of The http://www.cd.kernel.org/
+Congo, Democratic Republic of The ftp://ftp.cd.kernel.org/
+Cook Islands http://www.ck.kernel.org/
+Cook Islands ftp://ftp.ck.kernel.org/
+Costa Rica http://www.cr.kernel.org/
+Costa Rica ftp://ftp.cr.kernel.org/
+Co^te D'Ivoire http://www.ci.kernel.org/
+Co^te D'Ivoire ftp://ftp.ci.kernel.org/
+Croatia http://www.hr.kernel.org/
+Croatia ftp://ftp.hr.kernel.org/
+Cyprus http://www.cy.kernel.org/
+Cyprus ftp://ftp.cy.kernel.org/
+Czech Republic http://www.cz.kernel.org/
+Czech Republic ftp://ftp.cz.kernel.org/
+Denmark http://www.dk.kernel.org/
+Denmark ftp://ftp.dk.kernel.org/
+Diego Garcia http://www.dg.kernel.org/
+Diego Garcia ftp://ftp.dg.kernel.org/
+Djibouti http://www.dj.kernel.org/
+Djibouti ftp://ftp.dj.kernel.org/
+Dominica http://www.dm.kernel.org/
+Dominica ftp://ftp.dm.kernel.org/
+Dominican Republic http://www.do.kernel.org/
+Dominican Republic ftp://ftp.do.kernel.org/
+East Timor http://www.tp.kernel.org/
+East Timor ftp://ftp.tp.kernel.org/
+Ecuador http://www.ec.kernel.org/
+Ecuador ftp://ftp.ec.kernel.org/
+Egypt http://www.eg.kernel.org/
+Egypt ftp://ftp.eg.kernel.org/
+El Salvador http://www.sv.kernel.org/
+El Salvador ftp://ftp.sv.kernel.org/
+Equatorial Guinea http://www.gq.kernel.org/
+Equatorial Guinea ftp://ftp.gq.kernel.org/
+Eritrea http://www.er.kernel.org/
+Eritrea ftp://ftp.er.kernel.org/
+Estonia http://www.ee.kernel.org/
+Estonia ftp://ftp.ee.kernel.org/
+Ethiopia http://www.et.kernel.org/
+Ethiopia ftp://ftp.et.kernel.org/
+Falkland Islands (Malvinas) http://www.fk.kernel.org/
+Falkland Islands (Malvinas) ftp://ftp.fk.kernel.org/
+Faroe Islands http://www.fo.kernel.org/
+Faroe Islands ftp://ftp.fo.kernel.org/
+Fiji http://www.fj.kernel.org/
+Fiji ftp://ftp.fj.kernel.org/
+Finland http://www.fi.kernel.org/
+Finland ftp://ftp.fi.kernel.org/
+France http://www.fr.kernel.org/
+France ftp://ftp.fr.kernel.org/
+French Guiana http://www.gf.kernel.org/
+French Guiana ftp://ftp.gf.kernel.org/
+French Polynesia http://www.pf.kernel.org/
+French Polynesia ftp://ftp.pf.kernel.org/
+French Southern Territories http://www.tf.kernel.org/
+French Southern Territories ftp://ftp.tf.kernel.org/
+Gabon http://www.ga.kernel.org/
+Gabon ftp://ftp.ga.kernel.org/
+Gambia http://www.gm.kernel.org/
+Gambia ftp://ftp.gm.kernel.org/
+Georgia http://www.ge.kernel.org/
+Georgia ftp://ftp.ge.kernel.org/
+Germany http://www.de.kernel.org/
+Germany ftp://ftp.de.kernel.org/
+Ghana http://www.gh.kernel.org/
+Ghana ftp://ftp.gh.kernel.org/
+Gibraltar http://www.gi.kernel.org/
+Gibraltar ftp://ftp.gi.kernel.org/
+Greece http://www.gr.kernel.org/
+Greece ftp://ftp.gr.kernel.org/
+Greenland http://www.gl.kernel.org/
+Greenland ftp://ftp.gl.kernel.org/
+Grenada http://www.gd.kernel.org/
+Grenada ftp://ftp.gd.kernel.org/
+Guadeloupe http://www.gp.kernel.org/
+Guadeloupe ftp://ftp.gp.kernel.org/
+Guam http://www.gu.kernel.org/
+Guam ftp://ftp.gu.kernel.org/
+Guatemala http://www.gt.kernel.org/
+Guatemala ftp://ftp.gt.kernel.org/
+Guernsey http://www.gg.kernel.org/
+Guernsey ftp://ftp.gg.kernel.org/
+Guinea http://www.gn.kernel.org/
+Guinea ftp://ftp.gn.kernel.org/
+Guinea-Bissau http://www.gw.kernel.org/
+Guinea-Bissau ftp://ftp.gw.kernel.org/
+Guyana http://www.gy.kernel.org/
+Guyana ftp://ftp.gy.kernel.org/
+Haiti http://www.ht.kernel.org/
+Haiti ftp://ftp.ht.kernel.org/
+Heard and Mc Donald Islands http://www.hm.kernel.org/
+Heard and Mc Donald Islands ftp://ftp.hm.kernel.org/
+Honduras http://www.hn.kernel.org/
+Honduras ftp://ftp.hn.kernel.org/
+Hong Kong http://www.hk.kernel.org/
+Hong Kong ftp://ftp.hk.kernel.org/
+Hungary http://www.hu.kernel.org/
+Hungary ftp://ftp.hu.kernel.org/
+Iceland http://www.is.kernel.org/
+Iceland ftp://ftp.is.kernel.org/
+India http://www.in.kernel.org/
+India ftp://ftp.in.kernel.org/
+Indonesia http://www.id.kernel.org/
+Indonesia ftp://ftp.id.kernel.org/
+Ireland http://www.ie.kernel.org/
+Ireland ftp://ftp.ie.kernel.org/
+Isle of Man http://www.im.kernel.org/
+Isle of Man ftp://ftp.im.kernel.org/
+Israel http://www.il.kernel.org/
+Israel ftp://ftp.il.kernel.org/
+Italy http://www.it.kernel.org/
+Italy ftp://ftp.it.kernel.org/
+Jamaica http://www.jm.kernel.org/
+Jamaica ftp://ftp.jm.kernel.org/
+Japan http://www.jp.kernel.org/
+Japan ftp://ftp.jp.kernel.org/
+Jersey http://www.je.kernel.org/
+Jersey ftp://ftp.je.kernel.org/
+Jordan http://www.jo.kernel.org/
+Jordan ftp://ftp.jo.kernel.org/
+Kazakhstan http://www.kz.kernel.org/
+Kazakhstan ftp://ftp.kz.kernel.org/
+Kenya http://www.ke.kernel.org/
+Kenya ftp://ftp.ke.kernel.org/
+Kiribati http://www.ki.kernel.org/
+Kiribati ftp://ftp.ki.kernel.org/
+Korea, South http://www.kr.kernel.org/
+Korea, South ftp://ftp.kr.kernel.org/
+Kuwait http://www.kw.kernel.org/
+Kuwait ftp://ftp.kw.kernel.org/
+Kyrgyzstan http://www.kg.kernel.org/
+Kyrgyzstan ftp://ftp.kg.kernel.org/
+Laos http://www.la.kernel.org/
+Laos ftp://ftp.la.kernel.org/
+Latvia http://www.lv.kernel.org/
+Latvia ftp://ftp.lv.kernel.org/
+Lebanon http://www.lb.kernel.org/
+Lebanon ftp://ftp.lb.kernel.org/
+Lesotho http://www.ls.kernel.org/
+Lesotho ftp://ftp.ls.kernel.org/
+Liberia http://www.lr.kernel.org/
+Liberia ftp://ftp.lr.kernel.org/
+Liechtenstein http://www.li.kernel.org/
+Liechtenstein ftp://ftp.li.kernel.org/
+Lithuania http://www.lt.kernel.org/
+Lithuania ftp://ftp.lt.kernel.org/
+Luxembourg http://www.lu.kernel.org/
+Luxembourg ftp://ftp.lu.kernel.org/
+Macau http://www.mo.kernel.org/
+Macau ftp://ftp.mo.kernel.org/
+Macedonia http://www.mk.kernel.org/
+Macedonia ftp://ftp.mk.kernel.org/
+Madagascar http://www.mg.kernel.org/
+Madagascar ftp://ftp.mg.kernel.org/
+Malawi http://www.mw.kernel.org/
+Malawi ftp://ftp.mw.kernel.org/
+Malaysia http://www.my.kernel.org/
+Malaysia ftp://ftp.my.kernel.org/
+Maldives http://www.mv.kernel.org/
+Maldives ftp://ftp.mv.kernel.org/
+Mali http://www.ml.kernel.org/
+Mali ftp://ftp.ml.kernel.org/
+Malta http://www.mt.kernel.org/
+Malta ftp://ftp.mt.kernel.org/
+Marshall Islands http://www.mh.kernel.org/
+Marshall Islands ftp://ftp.mh.kernel.org/
+Martinique http://www.mq.kernel.org/
+Martinique ftp://ftp.mq.kernel.org/
+Mauritania http://www.mr.kernel.org/
+Mauritania ftp://ftp.mr.kernel.org/
+Mauritius http://www.mu.kernel.org/
+Mauritius ftp://ftp.mu.kernel.org/
+Mayotte http://www.yt.kernel.org/
+Mayotte ftp://ftp.yt.kernel.org/
+Mexico http://www.mx.kernel.org/
+Mexico ftp://ftp.mx.kernel.org/
+Micronesia, Federated States of http://www.fm.kernel.org/
+Micronesia, Federated States of ftp://ftp.fm.kernel.org/
+Moldova http://www.md.kernel.org/
+Moldova ftp://ftp.md.kernel.org/
+Monaco http://www.mc.kernel.org/
+Monaco ftp://ftp.mc.kernel.org/
+Mongolia http://www.mn.kernel.org/
+Mongolia ftp://ftp.mn.kernel.org/
+Montserrat http://www.ms.kernel.org/
+Montserrat ftp://ftp.ms.kernel.org/
+Morocco http://www.ma.kernel.org/
+Morocco ftp://ftp.ma.kernel.org/
+Mozambique http://www.mz.kernel.org/
+Mozambique ftp://ftp.mz.kernel.org/
+Myanmar (Burma) http://www.mm.kernel.org/
+Myanmar (Burma) ftp://ftp.mm.kernel.org/
+Namibia http://www.na.kernel.org/
+Namibia ftp://ftp.na.kernel.org/
+Nauru http://www.nr.kernel.org/
+Nauru ftp://ftp.nr.kernel.org/
+Nepal http://www.np.kernel.org/
+Nepal ftp://ftp.np.kernel.org/
+Netherlands http://www.nl.kernel.org/
+Netherlands ftp://ftp.nl.kernel.org/
+Netherlands Antilles http://www.an.kernel.org/
+Netherlands Antilles ftp://ftp.an.kernel.org/
+New Caledonia http://www.nc.kernel.org/
+New Caledonia ftp://ftp.nc.kernel.org/
+New Zealand http://www.nz.kernel.org/
+New Zealand ftp://ftp.nz.kernel.org/
+Nicaragua http://www.ni.kernel.org/
+Nicaragua ftp://ftp.ni.kernel.org/
+Niger http://www.ne.kernel.org/
+Niger ftp://ftp.ne.kernel.org/
+Nigeria http://www.ng.kernel.org/
+Nigeria ftp://ftp.ng.kernel.org/
+Niue http://www.nu.kernel.org/
+Niue ftp://ftp.nu.kernel.org/
+Norfolk Island http://www.nf.kernel.org/
+Norfolk Island ftp://ftp.nf.kernel.org/
+Northern Mariana Islands http://www.mp.kernel.org/
+Northern Mariana Islands ftp://ftp.mp.kernel.org/
+Norway http://www.no.kernel.org/
+Norway ftp://ftp.no.kernel.org/
+Oman http://www.om.kernel.org/
+Oman ftp://ftp.om.kernel.org/
+Pakistan http://www.pk.kernel.org/
+Pakistan ftp://ftp.pk.kernel.org/
+Palau http://www.pw.kernel.org/
+Palau ftp://ftp.pw.kernel.org/
+Palestinian Territory http://www.ps.kernel.org/
+Palestinian Territory ftp://ftp.ps.kernel.org/
+Panama' http://www.pa.kernel.org/
+Panama' ftp://ftp.pa.kernel.org/
+Papua New Guinea http://www.py.kernel.org/
+Papua New Guinea ftp://ftp.py.kernel.org/
+Paraguay http://www.py.kernel.org/
+Paraguay ftp://ftp.py.kernel.org/
+Peru' http://www.pe.kernel.org/
+Peru' ftp://ftp.pe.kernel.org/
+Philippines http://www.ph.kernel.org/
+Philippines ftp://ftp.ph.kernel.org/
+Pitcairn Islands http://www.pn.kernel.org/
+Pitcairn Islands ftp://ftp.pn.kernel.org/
+Poland http://www.pl.kernel.org/
+Poland ftp://ftp.pl.kernel.org/
+Portugal http://www.pt.kernel.org/
+Portugal ftp://ftp.pt.kernel.org/
+Puerto Rico http://www.pr.kernel.org/
+Puerto Rico ftp://ftp.pr.kernel.org/
+Qatar http://www.qa.kernel.org/
+Qatar ftp://ftp.qa.kernel.org/
+Re'union http://www.re.kernel.org/
+Re'union ftp://ftp.re.kernel.org/
+Romania http://www.ro.kernel.org/
+Romania ftp://ftp.ro.kernel.org/
+Russian Federation http://www.ru.kernel.org/
+Russian Federation ftp://ftp.ru.kernel.org/
+Rwanda http://www.rw.kernel.org/
+Rwanda ftp://ftp.rw.kernel.org/
+Saint Helena http://www.sh.kernel.org/
+Saint Helena ftp://ftp.sh.kernel.org/
+Saint Kitts and Nevis http://www.kn.kernel.org/
+Saint Kitts and Nevis ftp://ftp.kn.kernel.org/
+Saint Lucia http://www.lc.kernel.org/
+Saint Lucia ftp://ftp.lc.kernel.org/
+Saint Pierre and Miquelon http://www.pm.kernel.org/
+Saint Pierre and Miquelon ftp://ftp.pm.kernel.org/
+Saint Vincent and The Grenadines http://www.vc.kernel.org/
+Saint Vincent and The Grenadines ftp://ftp.vc.kernel.org/
+Samoa http://www.ws.kernel.org/
+Samoa ftp://ftp.ws.kernel.org/
+San Marino http://www.sm.kernel.org/
+San Marino ftp://ftp.sm.kernel.org/
+Sa~o Tome' and Pri'ncipe http://www.st.kernel.org/
+Sa~o Tome' and Pri'ncipe ftp://ftp.st.kernel.org/
+Saudi Arabia http://www.sa.kernel.org/
+Saudi Arabia ftp://ftp.sa.kernel.org/
+Senegal http://www.sn.kernel.org/
+Senegal ftp://ftp.sn.kernel.org/
+Seychelles http://www.sc.kernel.org/
+Seychelles ftp://ftp.sc.kernel.org/
+Sierra Leone http://www.sl.kernel.org/
+Sierra Leone ftp://ftp.sl.kernel.org/
+Singapore http://www.sg.kernel.org/
+Singapore ftp://ftp.sg.kernel.org/
+Slovakia http://www.sk.kernel.org/
+Slovakia ftp://ftp.sk.kernel.org/
+Slovenia http://www.si.kernel.org/
+Slovenia ftp://ftp.si.kernel.org/
+Solomon Islands http://www.sb.kernel.org/
+Solomon Islands ftp://ftp.sb.kernel.org/
+Somalia http://www.so.kernel.org/
+Somalia ftp://ftp.so.kernel.org/
+South Africa http://www.za.kernel.org/
+South Africa ftp://ftp.za.kernel.org/
+South Georgia and The South Sandwich Islands http://www.gs.kernel.org/
+South Georgia and The South Sandwich Islands ftp://ftp.gs.kernel.org/
+Spain http://www.es.kernel.org/
+Spain ftp://ftp.es.kernel.org/
+Sri Lanka http://www.lk.kernel.org/
+Sri Lanka ftp://ftp.lk.kernel.org/
+Suriname http://www.sr.kernel.org/
+Suriname ftp://ftp.sr.kernel.org/
+Svalbard and Jan Mayen Islands http://www.sj.kernel.org/
+Svalbard and Jan Mayen Islands ftp://ftp.sj.kernel.org/
+Swaziland http://www.sz.kernel.org/
+Swaziland ftp://ftp.sz.kernel.org/
+Sweden http://www.se.kernel.org/
+Sweden ftp://ftp.se.kernel.org/
+Switzerland http://www.ch.kernel.org/
+Switzerland ftp://ftp.ch.kernel.org/
+Taiwan http://www.tw.kernel.org/
+Taiwan ftp://ftp.tw.kernel.org/
+Tajikistan http://www.tj.kernel.org/
+Tajikistan ftp://ftp.tj.kernel.org/
+Tanzania http://www.tz.kernel.org/
+Tanzania ftp://ftp.tz.kernel.org/
+Thailand http://www.th.kernel.org/
+Thailand ftp://ftp.th.kernel.org/
+Togo http://www.tg.kernel.org/
+Togo ftp://ftp.tg.kernel.org/
+Tokelau http://www.tk.kernel.org/
+Tokelau ftp://ftp.tk.kernel.org/
+Tonga http://www.to.kernel.org/
+Tonga ftp://ftp.to.kernel.org/
+Trinidad and Tobago http://www.ta.kernel.org/
+Trinidad and Tobago ftp://ftp.ta.kernel.org/
+Tunisia http://www.tn.kernel.org/
+Tunisia ftp://ftp.tn.kernel.org/
+Turkey http://www.tr.kernel.org/
+Turkey ftp://ftp.tr.kernel.org/
+Turkmenistan http://www.tm.kernel.org/
+Turkmenistan ftp://ftp.tm.kernel.org/
+Turks and Caicos Islands http://www.tc.kernel.org/
+Turks and Caicos Islands ftp://ftp.tc.kernel.org/
+Tuvalu http://www.tv.kernel.org/
+Tuvalu ftp://ftp.tv.kernel.org/
+Uganda http://www.ug.kernel.org/
+Uganda ftp://ftp.ug.kernel.org/
+Ukraine http://www.ua.kernel.org/
+Ukraine ftp://ftp.ua.kernel.org/
+United Arab Emirates http://www.ae.kernel.org/
+United Arab Emirates ftp://ftp.ae.kernel.org/
+United Kingdom http://www.uk.kernel.org/
+United Kingdom ftp://ftp.uk.kernel.org/
+United States http://www.us.kernel.org/
+United States ftp://ftp.us.kernel.org/
+United States Minor Outlying Islands http://www.um.kernel.org/
+United States Minor Outlying Islands ftp://ftp.um.kernel.org/
+Uruguay http://www.uy.kernel.org/
+Uruguay ftp://ftp.uy.kernel.org/
+Uzbekistan http://www.uz.kernel.org/
+Uzbekistan ftp://ftp.uz.kernel.org/
+Vanuatu http://www.vu.kernel.org/
+Vanuatu ftp://ftp.vu.kernel.org/
+Vatican City (Holy See) http://www.va.kernel.org/
+Vatican City (Holy See) ftp://ftp.va.kernel.org/
+Venezuela http://www.ve.kernel.org/
+Venezuela ftp://ftp.ve.kernel.org/
+Vietnam http://www.vn.kernel.org/
+Vietnam ftp://ftp.vn.kernel.org/
+Virgin Islands (British) http://www.vg.kernel.org/
+Virgin Islands (British) ftp://ftp.vg.kernel.org/
+Virgin Islands (U.S.) http://www.vi.kernel.org/
+Virgin Islands (U.S.) ftp://ftp.vi.kernel.org/
+Wallis and Futuna Islands http://www.wf.kernel.org/
+Wallis and Futuna Islands ftp://ftp.wf.kernel.org/
+Western Sahara http://www.eh.kernel.org/
+Western Sahara ftp://ftp.eh.kernel.org/
+Yemen http://www.ye.kernel.org/
+Yemen ftp://ftp.ye.kernel.org/
+Yugoslavia http://www.yu.kernel.org/
+Yugoslavia ftp://ftp.yu.kernel.org/
+Zambia http://www.zm.kernel.org/
+Zambia ftp://ftp.zm.kernel.org/
+Zimbabwe http://www.zw.kernel.org/
+Zimbabwe ftp://ftp.zw.kernel.org/
diff --git a/mirrors/LRESORT b/mirrors/LRESORT
new file mode 100644
index 0000000..655aa46
--- /dev/null
+++ b/mirrors/LRESORT
@@ -0,0 +1,9 @@
+Custom Custom
+Mirror site - TX-US http://tx-us.lunar-linux.org/lunar/cache/
+Mirror site - SE http://jkp-se.lunar-linux.org/lunar/cache/
+Mirror site - SE http://vxj-se.lunar-linux.org/lunar/cache/
+Mirror site - SE http://su-se.lunar-linux.org/lunar/cache/
+Mirror site - BE http://be.lunar-linux.org/lunar/cache/
+Mirror site - DE http://de.lunar-linux.org/lunar/cache/
+Mirror site - DE http://fr-de.lunar-linux.org/lunar/cache/
+Master site - NL http://lunar-linux.org/lunar/cache/
diff --git a/mirrors/SFORGE b/mirrors/SFORGE
new file mode 100644
index 0000000..1c2efd3
--- /dev/null
+++ b/mirrors/SFORGE
@@ -0,0 +1,31 @@
+AUTO (Auto-GEO) http://downloads.sourceforge.net/sourceforge
+Sydney (AU) http://optusnet.dl.sourceforge.net/sourceforge
+flow (AU) http://flow.dl.sourceforge.net/sourceforge
+Brussels (BE) http://belnet.dl.sourceforge.net/sourceforge
+Curitiba (BR) http://ufpr.dl.sourceforge.net/sourceforge
+Bern (CH) http://puzzle.dl.sourceforge.net/sourceforge
+Lausanne (CH) http://switch.dl.sourceforge.net/sourceforge
+cesnet (CZ) http://cesnet.dl.sourceforge.net/sourceforge
+Berlin (DE) http://dfn.dl.sourceforge.net/sourceforge
+Duesseldorf (DE) http://mesh.dl.sourceforge.net/sourceforge
+Paris (FR) http://ovh.dl.sourceforge.net/sourceforge
+Dublin (IE) http://heanet.dl.sourceforge.net/sourceforge
+Ishikawa (JP) http://jaist.dl.sourceforge.net/sourceforge
+Amsterdam (NL) http://surfnet.dl.sourceforge.net/sourceforge
+citkit (RU) http://citkit.dl.sourceforge.net/sourceforge
+Tainan (TW) http://nchc.dl.sourceforge.net/sourceforge
+nvhv (TW) http://nvhv.dl.sourceforge.net/sourceforge
+Kent (UK) http://kent.dl.sourceforge.net/sourceforge
+San Jose CA (US) http://internap.dl.sourceforge.net/sourceforge
+Seattle WA (US) http://superb-west.dl.sourceforge.net/sourceforge
+McLean VA (US) http://superb-east.dl.sourceforge.net/sourceforge
+Phoenix AZ (US) http://easynews.dl.sourceforge.net/sourceforge
+United States http://aleron.dl.sourceforge.net/sourceforge
+United States http://telia.dl.sourceforge.net/sourceforge
+United States http://twtelecom.dl.sourceforge.net/sourceforge
+United States http://unc.dl.sourceforge.net/sourceforge
+Minneapolis MN (US) http://umn.dl.sourceforge.net/sourceforge
+United States http://west.dl.sourceforge.net/sourceforge
+OSDN (US) http://osdn.dl.sourceforge.net/sourceforge
+voxel (US) http://voxel.dl.sourceforge.net/sourceforge
+cogent (US) http://cogent.dl.sourceforge.net/sourceforge
diff --git a/mirrors/XFREE86 b/mirrors/XFREE86
new file mode 100644
index 0000000..76ca9a8
--- /dev/null
+++ b/mirrors/XFREE86
@@ -0,0 +1,44 @@
+"Master Site" ftp://ftp.xfree86.org/pub/XFree86/
+"Custom Mirror" Custom
+Korea ftp://ftp.kreonet.re.kr/pub/Linux/xfree86/
+Japan ftp://ftp.netlab.is.tsukuba.ac.jp/pub/XFree86/
+Japan ftp://ftp.iij.ad.jp/pub/X/XFree86/
+Japan ftp://kddlabs.co.jp/X/XFree86/
+Australia and New Zeland http://www.planetmirror.com/pub/XFree86/
+Australia and New Zeland ftp://ftp.planetmirror.com/pub/XFree86/
+Australia and New Zeland ftp://mirror.aarnet.edu.au/pub/XFree86/
+Australia and New Zeland ftp://x.physics.usyd.edu.au/pub/XFree86/
+Costa Rica ftp://xfree.ulatina.ac.cr/
+Austria ftp://gd.tuwien.Ac.at/hci/X11/XFree86/
+Czech Republic ftp://ftp.fee.vutbr.cz/pub/XFree86/
+Denmark ftp://mirror.inet.tele.dk/mirrors/ftp.xfree86.org/pub/XFree86/
+Finland ftp://ftp.funet.fi/pub/X11/XFree86/
+France ftp://ftp.free.fr/pub/XFree86/
+France ftp://ftp.lip6.fr/pub/X11/XFree86/
+France ftp://ftp.ovh.net/mirrors/
+Germany ftp://ftp.cs.tu-berlin.de/pub/X/XFree86/
+Germany ftp://ftp.gwdg.de/pub/xfree86/XFree86/
+Germany ftp://ftp.mpi-sb.mpg.de/pub/X/mirror/ftp.xfree86.org/XFree86/
+Germany ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/
+Germany ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.xfree86/
+Germany ftp://ftp.uni-stuttgart.de/pub/X11/Xfree86/
+Germany http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86/
+Italy ftp://ftp.unina.it/pub/XFree86/
+Ireland ftp://ftp.esat.net/pub/X11/XFree86/
+Netherlands ftp://ftp.nl.uu.net/pub/XFree86/
+Netherlands ftp://dl.xs4all.nl/pub2/mirror/XFree/
+Norway ftp://sunsite.uio.no/pub/XFree86/
+Poland ftp://sunsite.icm.edu.pl/pub/X11/XFree86/
+Poland ftp://ftp.task.gda.pl/pub/XFree86/
+Spain ftp://ftp.cica.es/pub/XFree86/
+Spain ftp://ftp.cica.es/mirrors/XFree86/
+United Kingdom ftp://sunsite.doc.ic.ac.uk/packages/XFree86/
+United States ftp://ftp.calderasystems.com/pub/mirrors/xfree86/
+United States ftp://carroll.cac.psu.edu/pub/XFree86/
+United States ftp://ftp.cs.umn.edu/pub/XFree86/
+United States ftp://download.sourceforge.net/pub/mirrors/XFree86/
+United States ftp://ftp.freesoftware.com/pub/XFree86/
+United States ftp://ftp.infomagic.com/pub/mirrors/XFree86/
+United States ftp://mirror.sftw.com/pub/XFree86/
+United States ftp://phyppro1.phy.bnl.gov/pub/XFree86/
+United States ftp://ftp.rge.com/pub/X/XFree86/
diff --git a/mirrors/XORG b/mirrors/XORG
new file mode 100644
index 0000000..5361b05
--- /dev/null
+++ b/mirrors/XORG
@@ -0,0 +1,47 @@
+"Master Site" ftp://ftp.x.org/pub/
+"Custom Mirror" Custom
+Australia ftp://mirror.isp.net.au/pub/x.org/
+Belgium ftp://x.mirrors.skynet.be/pub/x.org/
+Belgium http://x.mirrors.skynet.be/pub/x.org/
+Brazilia ftp://ftp.unicamp.br/pub/X11/releases/
+France ftp://mirror.cict.fr/x.org/
+France http://mirror.cict.fr/x.org/
+Germany ftp://ftp.gwdg.de/pub/x11/x.org/pub/
+Germany ftp://ftp.portal-to-web.de/pub/mirrors/x.org/
+Germany http://www.portal-to-web.de/pub/mirrors/x.org/
+Germany ftp://ftp.fu-berlin.de/unix/X11/FTP.X.ORG/pub/
+Greece ftp://ftp.ntua.gr/pub/X11/
+HongKong ftp://ftp.cs.cuhk.edu.hk/pub/X11/
+Italy http://mi.mirror.garr.it/mirrors/x.org/
+Italy ftp://mi.mirror.garr.it/mirrors/x.org/
+Japan ftp://sunsite.sut.ac.jp/pub/archives/X11/
+Japan ftp://ftp.nara.wide.ad.jp/pub/X11/x.org/
+Japan http://ftp.nara.wide.ad.jp/pub/X11/x.org/
+Japan ftp://ftp.u-aizu.ac.jp/pub/x11/x.org/
+Japan http://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/
+Japan ftp://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/
+Korea ftp://ftp.kreonet.re.kr/pub/X11/ftp.x.org/
+Netherlands http://x-org.mirror.intouch.nl/
+Netherlands ftp://xorg.mirror.intouch.nl/mirrors/xorg/
+Poland ftp://sunsite.icm.edu.pl/pub/X11/x.org/
+Poland ftp://ftp.task.gda.pl/mirror/ftp.x.org/
+Poland http://ftp.pl.debian.org/mirror/ftp.x.org/pub/
+Russia ftp://xorg.freshsoft.ru/ftp.x.org/
+Russia http://xorg.freshsoft.ru/ftp.x.org/
+Russia http://ftp.chg.ru/pub/X11/x.org/
+Russia ftp://ftp.chg.ru/pub/X11/x.org/
+Spain ftp://ftp.cica.es/pub/X/
+Spain ftp://ftp.sunet.se/pub/X11/
+South Afrika ftp://ftp.is.co.za/pub/x.org/
+Switzerland http://xorg.mirror.solnet.ch/
+Switzerland ftp://ftp.solnet.ch/mirror/x.org/
+Switzerland ftp://mirror.switch.ch/mirror/X11/
+Switzerland http://mirror.switch.ch/ftp/mirror/X11/
+Taiwan http://x.cs.pu.edu.tw/
+United Kingdom http://www.mirror.ac.uk/mirror/ftp.x.org/
+United Kingdom http://www.mirrorservice.org/sites/ftp.x.org/
+United Kingdom ftp://ftp.mirrorservice.org/sites/ftp.x.org/
+United States ftp://mirror.sg.depaul.edu/pub/x.org/
+United States http://mirror.sg.depaul.edu/pub/x.org/
+United States http://x.paracoda.com/
+United States http://x.hostingzero.com/
diff --git a/misc/excluded b/misc/excluded
new file mode 100644
index 0000000..690bbd7
--- /dev/null
+++ b/misc/excluded
@@ -0,0 +1,12 @@
+^/dev/
+^/home/
+^/proc/
+^/root/
+^/tmp/
+^/usr/src/
+^/var/cache/ccache/
+^/var/lock/
+^/var/log/
+^/var/run/
+^/var/state/lunar/
+^/var/tmp/
diff --git a/misc/init-functions b/misc/init-functions
new file mode 100644
index 0000000..cb1484c
--- /dev/null
+++ b/misc/init-functions
@@ -0,0 +1,467 @@
+#!/bin/bash
+
+############################################################
+# #
+# lunar.init - a collection of init.d script functions #
+# #
+############################################################
+# #
+# Copyrighted Auke Kok <koka at geo.vu.nl> 2002 under GPLv2 #
+# Copyright 2009 by Stefan Wold under GPLv2 #
+# #
+############################################################
+
+# we really need to do this:
+trap ":" QUIT TSTP SEGV
+export PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
+
+#
+# work notes:
+#
+# Need to install status() and other return codes
+# Need to rectify daemon-restart test and script deletion of /var/run/<prog>.pid
+# Need to assess impact of the above changes elswehere
+#
+#
+#
+#
+
+#
+# for whoever called us, we would like to know the follofing data,
+# so we may probe for changes, get and or set variables, etc.
+#
+# chkconfig: [ the chkconfig style data for the symlinks ]
+# config: [ one or more config files to watch ]
+# description: [ a multiline description for this script ]
+# short: [ one liner to be displayed during start ]
+# pidfile: [ the pidfile ]
+# processname: [ name of the process ]
+# sigstop: [ signal to stop (defaults to TERM) ]
+# sigreload: [ signal to reload (defaults to HUP) ]
+#
+
+#
+# the functionality in here can be called in 2 ways. Either run the script
+# itself by `$0 start`, or by calling the default_start (for instance)
+# functions directly.
+#
+# the default actions available are: (`$0 <action>`)
+#
+# start|start_daemon starts the process
+# stop|killproc kills the process
+# restart restarts it
+# probe probes (checks dates on configs) for a reload
+# reload reloads it
+# status check if it's alive
+# <empty or invalid> display default usage message
+# install install the required symlinks
+# uninstall remove the appropriate symlinks
+#
+# analog to that, you may also directly reference the functions:
+#
+# default_{start|stop|restart|probe|reload|status}
+#
+
+ CHKCONFIG=`grep '^# chkconfig:' $0 | cut -d : -f 2-2`
+CONFIGFILES=`grep '^# config:' $0 | cut -d : -f 2-2 | tr -d " "`
+# DESCRIPTION=`grep '^# description: ' $0 | cut -d : -f 2-2 | tr -d " "`
+ SHORT=`grep '^# short:' $0 | cut -d : -f 2-2 | tr -d " "`
+ PIDFILE=`grep '^# pidfile:' $0 | cut -d : -f 2-2 | tr -d " "`
+ PROCESS=`grep '^# processname:' $0 | cut -d : -f 2-2 | tr -d " "`
+ SIGSTOP=`grep '^# sigstop:' $0 | cut -d : -f 2-2 | tr -d " "`
+ SIGRELOAD=`grep '^# sigreload:' $0 | cut -d : -f 2-2 | tr -d " "`
+ RUNAS=`grep '^# runas:' $0 | cut -d : -f 2-2 | tr -d " "`
+
+get_data () {
+ # define these
+ LINKNAME=${0##*/}
+ BASENAME=${LINKNAME#*[SK][0-9][0-9]}
+
+ # attempt to get these right:
+ if [ ! -z $PROCESS ] ; then
+ if [ "${PROCESS:0:1}" = "/" ]; then
+ PROCESS_FULL=$PROCESS
+ PROCESS_BASE=`basename $PROCESS`
+ else
+ if ! which 2> /dev/null ; then
+ PROCESS_FULL=`which $PROCESS`
+ PROCESS_BASE=`basename $PROCESS`
+ else
+ PROCESS=
+ fi
+ fi
+ [ -z $PIDFILE ] && PIDFILE=/var/run/$PROCESS_BASE.pid
+ [ -z $SHORT ] && SHORT=$BASENAME
+ [ -z $SIGSTOP ] && SIGSTOP=TERM
+ [ -z $SIGRELOAD ] && SIGRELOAD=HUP
+ fi
+
+ # VITAL INFO: SERVPID
+ if [ -f "$PIDFILE" ] ; then
+ if [ -d "/proc/$(cat $PIDFILE)" ] ; then
+ SERVPID=$(cat $PIDFILE)
+ fi
+ fi
+}
+
+
+# define the output string colors and text
+ ESC=`echo -en "\033"`
+ RESULT_OK="${ESC}[\061;32m${ESC}[70G[\040\040\040OK\040\040\040]${ESC}[m"
+RESULT_FAIL="${ESC}[\061;31m${ESC}[70G[\040FAILED\040]${ESC}[m"
+RESULT_WARN="${ESC}[\061;33m${ESC}[70G[\040\040WARN\040\040]${ESC}[m"
+JUNK="]]]]]]"
+
+
+# Handy
+pgrep () {
+ if [ -n "$SERVPID" ] ; then
+ # we will kill the daemon:
+ if [ -d /proc/$SERVPID ] ; then
+ return 0
+ else
+ return 1
+ fi
+ else
+ # where is the new daemon???
+ if [ -f "$PIDFILE" ] ; then
+ if [ -d "/proc/$(cat $PIDFILE)" ] ; then
+ return 0
+ else
+ return 255
+ fi
+ else
+ # sleep 1
+ # second chance:
+ if [ -f "$PIDFILE" ] ; then
+ if [ -d "/proc/$(cat $PIDFILE)" ] ; then
+ return 0
+ else
+ return 255
+ fi
+ else
+ return 255
+ fi
+ fi
+ fi
+}
+
+
+pkill () {
+ if [ -z "$SERVPID" ] ; then
+ return 255
+ else
+ if kill -$SIGSTOP $SERVPID >& /dev/null ; then
+ if [ -f $PIDFILE ] ; then
+ rm -f $PIDFILE
+ fi
+ return 0
+ else
+ return 255
+ fi
+ fi
+}
+
+
+prload () {
+ if [ ! -f $PIDFILE ] ; then
+ return 255
+ else
+ if kill -$SIGRELOAD $SERVPID >& /dev/null ; then
+ return 0
+ else
+ return 255
+ fi
+ fi
+}
+
+
+mkpid () {
+ if [ ! -e $PIDFILE ] ; then
+ echo -n "[PID] "
+ /bin/pgrep -o -P 1 "^$PROCESS_BASE$" > $PIDFILE && return 0 || return 255
+ else
+ return
+ fi
+}
+
+
+pidok () {
+ if [ -e $PIDFILE ] ; then
+ if pgrep ; then
+ return 0
+ else
+ return 255
+ fi
+ else
+ return 255
+ fi
+}
+
+
+log_success_msg () {
+ echo -e "$1 $RESULT_OK"
+}
+
+
+log_failure_msg () {
+ echo -e "$1 $RESULT_FAIL"
+}
+
+
+log_warning_msg () {
+ echo -e "$1 $RESULT_WARN"
+}
+
+
+start_process () {
+ if [ ! -z "$RUNAS" ]; then
+ /bin/su $RUNAS -c "$PROCESS_FULL $ARGS" &&
+ return 0 || return 255
+ else
+ $PROCESS_FULL $ARGS &&
+ return 0 || return 255
+ fi
+}
+
+
+# the main functions are defined as default_ so you may call these
+# directly from a script too
+default_start () {
+ get_data
+ # start the daemon
+ echo -n "Starting $SHORT: "
+ # check to see if it's not already running
+ if ! pgrep ; then
+ # sanity check:
+ if [ -f $PIDFILE ] ; then
+ rm -f $PIDFILE
+ fi
+ # start it up ourselves
+ if start_process ; then
+ # starup succeeded, now check if it really is running
+ if pgrep ; then
+ echo -e $RESULT_OK
+ else
+ # here's the broken daemon case
+ mkpid
+ if pgrep ; then
+ echo -e $RESULT_OK
+ else
+ # startup failed on our side
+ echo -e $RESULT_FAIL
+ fi
+ fi
+ fi
+ else
+ # it's already running idiot
+ echo -n "already running"
+ echo -e $RESULT_WARN
+ fi
+}
+
+
+default_stop () {
+ get_data
+ # stop the daemon
+ echo -n "Stopping $SHORT: "
+ if pgrep ; then
+ pkill
+ for COUNT in 1 2 3 4 5 ; do
+ pgrep && pkill
+ pgrep && echo -n "." && sleep 1
+ if ! pgrep ; then
+ # killed OK
+ [ -e $PIDFILE ] && rm $PIDFILE
+ echo -e $RESULT_OK
+ break
+ fi
+ done
+ if pgrep ; then
+ # FAILED!
+ mkpid
+ echo -e "kill failed$RESULT_FAIL"
+ fi
+ else
+ echo -e "not running $RESULT_WARN"
+ fi
+}
+
+
+default_restart () {
+ get_data
+ # restart ourselves
+ $0 stop && $0 start
+}
+
+
+default_probe () {
+ get_data
+ # see if we need to reload it based on the configs
+ if [ -e $PIDFILE ] ; then
+ # is it really there?
+ if pidok ; then
+ # test date of config files against PID dile
+ NEEDRELOAD="false"
+ for CONFIGFILE in $CONFIGFILES ; do
+ [ $CONFIGFILE -nt $PIDFILE ] && NEEDRELOAD="true"
+ done
+ if [ "X$NEEDRELOAD" == "Xtrue" ] ; then
+ # we need to reload
+ $0 reload
+ else
+ # no need to reload
+ echo "Reload of $SHORT not needed"
+ fi
+ else
+ # our process died!
+ [ -e $PIDFILE ] && rm $PIDFILE
+ echo "Reload of $SHORT failed: process died!"
+ fi
+ else
+ # no pid file???
+ echo "Reload of $SHORT failed: cannot find process"
+ fi
+}
+
+
+default_reload () {
+ get_data
+ # reload it
+ echo -n "Reloading $SHORT: "
+ if [ -e $PIDFILE ] ; then
+ # we have a pid file
+ prload
+ # test existence
+ if pidok ; then
+ # still running then
+ touch $PIDFILE
+ echo -e $RESULT_OK
+ else
+ # something went wrong
+ if pgrep ; then
+ # changed PID
+ mkpid
+ echo -e $RESULT_OK
+ else
+ # it died
+ [ -e $PIDFILE ] && rm $PIDFILE
+ echo -e "process died!$RESULT_FAIL"
+ fi
+ fi
+ else
+ # no pid file???
+ echo -e "cannot find process$RESULT_FAIL"
+ fi
+}
+
+
+default_status () {
+ get_data
+ # check if it is running
+ echo -n "Checking $SHORT: "
+ if pidok ; then
+ # we have a pid file and it's okay
+ echo -e "$RESULT_OK"
+ else
+ # something went wrong
+ if pgrep ; then
+ # changed PID
+ mkpid
+ echo -e "Was reloaded$RESULT_OK"
+ else
+ # it died
+ [ -e $PIDFILE ] && rm $PIDFILE
+ echo -e "process died!$RESULT_FAIL"
+ fi
+ fi
+}
+
+
+default_install () {
+ get_data
+ # make the links for this file go to the right places
+ LEVELS=`echo $CHKCONFIG | cut -d ' ' -f 1`
+ LSTART=`echo $CHKCONFIG | cut -d ' ' -f 2`
+ LSTOP=`echo $CHKCONFIG | cut -d ' ' -f 3`
+ ls /etc/rc?.d/???$BASENAME > /dev/null 2>&1 &&
+ echo "Warning: some links already exist!"
+ for LEVEL in 0 1 2 3 4 5 6 ; do
+ echo $LEVELS | grep -q $LEVEL && {
+ # make start link
+ echo ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/S$LSTART$BASENAME
+ ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/S$LSTART$BASENAME || true
+ } || {
+ # make stop link
+ echo ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/K$LSTOP$BASENAME
+ ln -s ../init.d/$BASENAME /etc/rc$LEVEL.d/K$LSTOP$BASENAME || true
+ }
+ done
+}
+
+
+default_uninstall () {
+ get_data
+ # remove the links for this script
+ LEVELS=`echo $CHKCONFIG | cut -d ' ' -f 1`
+ LSTART=`echo $CHKCONFIG | cut -d ' ' -f 2`
+ LSTOP=`echo $CHKCONFIG | cut -d ' ' -f 3`
+ for LEVEL in 0 1 2 3 4 5 6 ; do
+ echo $LEVELS | grep -q $LEVEL && {
+ # remove start link
+ echo rm /etc/rc$LEVEL.d/S$LSTART$BASENAME
+ rm /etc/rc$LEVEL.d/S$LSTART$BASENAME || true
+ } || {
+ # remove stop link
+ echo rm /etc/rc$LEVEL.d/K$LSTOP$BASENAME
+ rm /etc/rc$LEVEL.d/K$LSTOP$BASENAME || true
+ # if ANYONE can explain why that || true is NEEDED
+ # tell me PLEASE!!!
+ }
+ done
+ ls /etc/rc?.d/???$BASENAME > /dev/null 2>&1 &&
+ echo "Warning: some links still exist!"
+}
+
+
+default_usage () {
+ # default usage message
+ echo "usage: $0 {start|stop|restart|reload|status}"
+}
+
+
+# default when no action passed
+[ -z $1 ] && ACTION=usage || ACTION=$1
+
+# and run the code
+if set | grep -q "^$ACTION ()" ; then
+ # do the custom function
+ $ACTION $@
+else
+ get_data
+ # these are always available:
+ case $ACTION in
+ (install) default_install ; return ;;
+ (uninstall) default_uninstall ; return ;;
+ esac
+ # double check these:
+ if [ -z $PROCESS ]; then
+ echo -e "Processname is not defined!$RESULT_FAIL"
+ exit 1
+ fi
+ if [ ! -x $PROCESS_FULL ]; then
+ echo -e "The executable $PROCESS_BASE does not exist!$RESULT_FAIL"
+ exit 1
+ fi
+ # do the builtin function
+ case $ACTION in
+ (start|start_daemon) default_start ;;
+ (stop|killproc) default_stop ;;
+ (restart) default_restart ;;
+ (probe) default_probe ;;
+ (reload) default_reload ;;
+ (status) default_status ;;
+ *) default_usage ;;
+ esac
+fi
+
diff --git a/misc/protected b/misc/protected
new file mode 100644
index 0000000..7c59851
--- /dev/null
+++ b/misc/protected
@@ -0,0 +1,134 @@
+bin/awk
+bin/basename
+bin/bash
+bin/cat
+bin/chmod
+bin/cp
+bin/cut
+bin/date
+bin/dirname
+bin/file
+bin/grep
+bin/install
+bin/login
+bin/make
+bin/md5sum
+bin/mkdir
+bin/mknod
+bin/mv
+bin/ranlib
+bin/rm
+bin/rmdir
+bin/sed
+bin/sh
+bin/sha1sum
+bin/sleep
+bin/sort
+bin/su
+bin/tail
+bin/tee
+bin/tr
+bin/uname
+^/boot/
+^/boot/grub/menu.1st
+^/etc/aliases
+^/etc/audit
+^/etc/bonobo-activation/
+^/etc/config.d/ospmd.conf
+^/etc/courier/
+^/etc/cups/
+^/etc/dhcpd.conf
+^/etc/exim.conf
+^/etc/exports
+^/etc/fstab
+^/etc/group
+^/etc/group-
+^/etc/grsec/
+^/etc/hostname
+^/etc/httpd/
+^/etc/httpd/
+^/etc/httpsd/
+^/etc/init.d/bootmisc.sh
+^/etc/inittab
+^/etc/ld.so.cache
+^/etc/ld.so.conf
+^/etc/lftp.conf
+^/etc/lilo.conf
+^/etc/localtime
+^/etc/lunar/local/
+^/etc/modules
+^/etc/modules.conf
+^/etc/mtab
+^/etc/named.conf
+^/etc/nsswitch.conf
+^/etc/ntp.conf
+^/etc/passwd
+^/etc/passwd-
+^/etc/postfix/
+^/etc/ppp/
+^/etc/printcap
+^/etc/procmailrc
+^/etc/proftpd.conf
+^/etc/protocols
+^/etc/pureftpd.passwd
+^/etc/pureftpd.pdb
+^/etc/rcS.d/S99bootmisc
+^/etc/resolv.conf
+^/etc/rndc.conf
+^/etc/rndc.key
+^/etc/samba/
+^/etc/security/
+^/etc/services
+^/etc/sgml/catalog
+^/etc/shadow
+^/etc/shadow-
+^/etc/snort
+^/etc/snort.conf
+^/etc/squid/
+^/etc/ssh/
+^/etc/ssl/
+^/etc/ssl/certs/
+^/etc/sudoers
+^/etc/sysctl.conf
+^/etc/syslog.conf
+^/etc/vsftpd.conf
+^/etc/webmin/
+^/etc/X11/
+^/etc/X11/fs/config
+^/etc/X11/XF86Config
+^/etc/X11/XftConfig
+^/etc/X11/XftConfig.gdkxftsaved
+^/etc/X11/xinit/xinitrc
+^/etc/xinetd.conf
+^/etc/xml/catalog
+^/etc/xml/docbook
+^/etc/yp.conf
+/fonts.dir$
+^/lib/ld-linux.so.2
+^/lib/ld-linux-x86-64.so.2
+^/lib/modules/
+/perllocal.pod$
+^/usr/include/bits/syscall.h
+^/usr/include/gnu/stubs.h
+^/usr/lib/installwatch.so
+^/usr/lib/sasl/smtpd.conf
+^/usr/share/httpd/
+^/usr/share/httpsd/
+^/usr/share/info/dir
+^/usr/X11R6/lib/X11/app-defaults
+^/usr/X11R6/lib/X11/xinit/xinitrc
+^/var/lib/lunar/excluded
+^/var/lib/lunar/protected
+^/var/lib/mysql/
+^/var/mailman/Mailman/mm_cfg.py
+^/var/mailman/archives
+^/var/mailman/data
+^/var/mailman/lists
+^/var/mailman/qfiles
+^/var/named/
+^/var/nis/
+^/var/spool/
+^/var/state/
+^/var/state/dhcpd.leases
+^/var/state/dhcpd.leases~
+^/var/yp/
diff --git a/misc/solo b/misc/solo
new file mode 100644
index 0000000..1200df3
--- /dev/null
+++ b/misc/solo
@@ -0,0 +1,8 @@
+bash
+binutils
+gcc
+gcc2
+glibc
+lunar
+moonbase
+theedge
diff --git a/misc/sustained b/misc/sustained
new file mode 100644
index 0000000..92af90b
--- /dev/null
+++ b/misc/sustained
@@ -0,0 +1,35 @@
+acl
+attr
+bash
+binutils
+bzip2
+coreutils
+cracklib
+dialog
+e2fsprogs
+file
+findutils
+gawk
+gcc
+gettext
+glibc
+grep
+gzip
+installwatch
+less
+lunar
+make
+modutils
+nano
+ncurses
+net-tools
+patch
+readline
+sed
+shadow
+tar
+theedge
+util-linux
+util-linux-crypto
+wget
+zlib
diff --git a/misc/unset.sh b/misc/unset.sh
new file mode 100644
index 0000000..a48b40c
--- /dev/null
+++ b/misc/unset.sh
@@ -0,0 +1,103 @@
+unset ACTIVITY_LOG
+unset ADDON
+unset ADMIN
+unset ARCHIVE
+unset AUTOFIX
+unset AUTOPRUNE
+unset BLACK
+unset BLUE
+unset BOLD
+unset BOOST_LOCK
+unset BOPT
+unset BUILD
+unset CHECK_COLOR
+unset COLOR
+unset COMPILE_LOGS
+unset CONFIG_CACHE
+unset COPT
+unset CPU
+unset CYAN
+unset DEFAULT
+unset DEFAULT_COLOR
+unset DEPENDS_CONFIG
+unset DEPENDS_STATUS
+unset DEPENDS_STATUS_BACKUP
+unset DIALOGRC
+unset EXCLUDED
+unset EXHAUSTIVE
+unset FILE
+unset FILE_COLOR
+unset FIND_CHECK
+unset FPM
+unset FTP_ACTIVE
+unset FUNCTIONS
+unset GARBAGE
+unset GNOME_URL
+unset GNU_URL
+unset GREEN
+unset INSTALL_CACHE
+unset INSTALL_LOGS
+unset INSTALL_QUEUE
+unset KDE_URL
+unset KERNEL_URL
+unset LDD_CHECK
+unset LDF
+unset LINES
+unset LOCAL_CONFIG
+unset LOCAL_EXCLUDED
+unset LRESORT_URL
+unset LRM_COLOR
+unset LUNAR_MODULE
+unset LUNAR_MODULES
+unset LUNAR_PRIORITY
+unset MAKES
+unset MAX_SOURCES
+unset MD5SUM_CHECK
+unset MD5SUM_LOGS
+unset MENUS
+unset MESSAGE_COLOR
+unset MIRRORS
+unset MODULE_COLOR
+unset MODULE_INDEX
+unset MODULE_STATUS
+unset MODULE_STATUS_BACKUP
+unset MOONBASE
+unset MOONBASE_TYPE
+unset MOONBASE_TYPES
+unset MOONBASE_URL
+unset PATCH_URL
+unset PLATFORM
+unset PRESERVE
+unset PROBLEM_COLOR
+unset PROMPT_DELAY
+unset PROTECTED
+unset PWD
+unset QUERY_COLOR
+unset REAP
+unset RED
+unset REMOVE_QUEUE
+unset RESURRECT_COLOR
+unset SFORGE_URL
+unset SHELL
+unset SOLO
+unset SOUND
+unset SOUND_THEME
+unset SOURCE_CACHE
+unset SPD
+unset SUBROUTINES
+unset SUSTAIN
+unset SUSTAINED
+unset SYM_CHECK
+unset SYMLINK_COLOR
+unset TRACKED
+unset UNIQID
+unset USE_CACHE
+unset VERSION_COLOR
+unset VIEW_REPORTS
+unset VIOLET
+unset VOYEUR
+unset WHITE
+unset XFREE86_URL
+unset XORG_URL
+unset XTRA
+unset YELLOW
diff --git a/plugins/build-zpatches.plugin b/plugins/build-zpatches.plugin
new file mode 100644
index 0000000..dc46ac4
--- /dev/null
+++ b/plugins/build-zpatches.plugin
@@ -0,0 +1,80 @@
+#!/bin/bash
+#############################################################
+# #
+# build-zpatches.plugin - build handling of custom #
+# patches that need to be applied #
+# to a module without editing #
+# DETAILS/BUILD files #
+# #
+#############################################################
+# #
+# Copyright 2007 by Stefan Wold under GPLv2 #
+# #
+#############################################################
+
+
+plugin_zpatches_apply()
+{
+ local PATCHDIRS FPATCH PATCH TARCMD GZCMD TMPFILE1 TMPFILE2
+ if [ -d $MOONBASE/zlocal/_patches/$MODULE ]; then
+ cd $SOURCE_DIRECTORY
+ PATCHDIRS+=" $MOONBASE/zlocal/_patches/$MODULE"
+ # Check for version based patch dir
+ if [ -d $MOONBASE/zlocal/_patches/$MODULE/$VERSION ]; then
+ PATCHDIRS+=" $MOONBASE/zlocal/_patches/$MODULE/$VERSION"
+ fi
+ # Now find all patches and apply them
+ # We also sort them so it possible to apply patch order
+ # by prefixing a patch with 01, 02, 03 etc
+ find $PATCHDIRS -maxdepth 1 -type f | sed 's;[^/]*$;& &;' | sort -t ' ' -k 2 | while read FPATCH PATCH; do
+ verbose_msg "Applying custom patch for $MODULE ($PATCH)"
+
+ if [[ -n `echo $PATCH | grep '\.tar'` ]] ; then
+ TARCMD="tar x -O"
+ else
+ TARCMD="cat"
+ fi
+
+ if [[ -n `echo $PATCH | grep '\.bz2$'` ]] ; then
+ GZCMD="bzcat"
+ elif [[ -n `echo $PATCH | grep '\.gz$'` ]] ; then
+ GZCMD="zcat"
+ else
+ GZCMD="cat"
+ fi
+
+ TMPFILE1=$(temp_create "zpatch_1")
+ TMPFILE2=$(temp_create "zpatch_2")
+
+ if $GZCMD $FPATCH > $TMPFILE1 ; then
+ # uncompress OK
+ if cat $TMPFILE1 | $TARCMD > $TMPFILE2 ; then
+ # untar OK
+ # Trying -p1 first or else we try -p0
+ # An error will be visible if -p1 fail which is normal
+ # Only return error if both -p1 and -p0 fail
+ patch -p1 -t < $TMPFILE2 || patch -p0 -t < $TMPFILE2
+ if [ $? -ne 0 ]; then
+ message "${PROBLEM_COLOR}ERROR: Failed to apply ${PATCH} for ${MODULE}${DEFAULT_COLOR}"
+ temp_destroy $TMPFILE1
+ temp_destroy $TMPFILE2
+ return 1
+ else
+ temp_destroy $TMPFILE1
+ temp_destroy $TMPFILE2
+ fi
+ fi
+ fi
+ done
+ if [ $? != 0 ]; then
+ exit 1
+ else
+ return 2
+ fi
+ else
+ # No patchdir for that module found just continue
+ return 2
+ fi
+}
+
+plugin_register BUILD_BUILD plugin_zpatches_apply
diff --git a/plugins/check-find.plugin b/plugins/check-find.plugin
new file mode 100644
index 0000000..c451299
--- /dev/null
+++ b/plugins/check-find.plugin
@@ -0,0 +1,54 @@
+#!/bin/bash
+#############################################################
+# #
+# check-find.plugin - plugin that performs file presence #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_find() {
+ if [ "$FIND_CHECK" == "off" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_find ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+ FIND_STATUS=2
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" | grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/")
+
+ for ITEM in $LOG ; do
+ if [ ! -e "$ITEM" ]; then
+ (
+ export IFS="$IFS_OLD"
+ message "${FILE_COLOR}${ITEM}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing.${DEFAULT_COLOR}"
+ )
+ FIND_STATUS=1
+ fi
+ done
+ else
+ (
+ export IFS="$IFS_OLD"
+ message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
+ )
+ FIND_STATUS=1
+ fi
+ return $FIND_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_find
+
+
diff --git a/plugins/check-ldd.plugin b/plugins/check-ldd.plugin
new file mode 100644
index 0000000..8d4ec77
--- /dev/null
+++ b/plugins/check-ldd.plugin
@@ -0,0 +1,48 @@
+#!/bin/bash
+#############################################################
+# #
+# check-ldd.plugin - plugin that performs ldd checking #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_ldd() {
+ if [ "$LDD_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_ldd ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+ LDD_STATUS=2
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ # fast-construct per-module LD path including all /lib/ like directories
+ NEW_LD=$(cat $I_LOG | grep "/lib/" | files | sed 's/\(.*\)\/\([^\/]*\)$/\1/g' | uniq | tr '\n' ':')
+ LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/lib/\|/sbin/\|/libexec/" | grep -v "/doc/\|/fonts/\|/include/\|/locale/\|/man/\|/modules/\|/var/")
+
+ for FILE in $LOG; do
+ if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" | grep -q "ELF" && LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep -q "not found" ; then
+ (
+ export IFS="$IFS_OLD"
+ message "${FILE_COLOR}${FILE}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE} ${PROBLEM_COLOR}is broken. ${DEFAULT_COLOR}"
+ LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep "not found"
+ )
+ LDD_STATUS=1
+ fi
+ done
+ fi
+ return $LDD_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_ldd
diff --git a/plugins/check-md5sum.plugin b/plugins/check-md5sum.plugin
new file mode 100644
index 0000000..c165631
--- /dev/null
+++ b/plugins/check-md5sum.plugin
@@ -0,0 +1,52 @@
+#!/bin/bash
+#############################################################
+# #
+# check-md5sum.plugin - plugin that performs integrity #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_md5sum() {
+ # return CONTINUE if we're disabled
+ if [ "$MD5SUM_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_md5sum ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ MD5_LOG="$MD5SUM_LOGS/$MODULE-$VERSION"
+ # by default, do not return OK but CONTINUE
+ MD5SUM_STATUS=2
+
+ if [ -e "$MD5_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS=$'\t\n'
+
+ cat $MD5_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
+ grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/" |
+ while read LINE ; do
+ if ! echo $LINE | md5sum --check --status ; then
+ FILE=$(echo $LINE | awk '{ print $2 }')
+ if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" |
+ egrep -q "executable|shared object|current ar archive|ASCII C?? program" ; then
+ message "${FILE_COLOR}$FILE${DEFAULT_COLOR} of ${MODULE_COLOR}$MODULE${PROBLEM_COLOR} has wrong md5sum.${DEFAULT_COLOR}"
+ MD5SUM_STATUS=1
+ fi
+ fi
+ done
+ else
+ message "${MODULE_COLOR}$MODULE${PROBLEM_COLOR} is missing a md5sum log.${DEFAULT_COLOR}"
+ fi
+ return $MD5SUM_STATUS
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_md5sum
+
+
diff --git a/plugins/check-symlinks.plugin b/plugins/check-symlinks.plugin
new file mode 100644
index 0000000..ea31314
--- /dev/null
+++ b/plugins/check-symlinks.plugin
@@ -0,0 +1,56 @@
+#!/bin/bash
+#############################################################
+# #
+# check-symlinks.plugin - plugin that performs symlink #
+# checking of installed modules #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_module_check_symlinks() {
+ # return CONTINUE if we're disabled
+ if [ "$SYM_CHECK" == "off" ]; then
+ return 2
+ fi
+ debug_msg "plugin_module_check_symlinks ($@)"
+
+ MODULE=$1
+ VERSION=$(installed_version $MODULE)
+ I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+
+ if [ -e "$I_LOG" ]; then
+ IFS_OLD="$IFS"
+ export IFS="
+"
+
+ cat $I_LOG | while read ITEM ; do
+ if [ -h "$ITEM" ] && [ -f "$ITEM" ] ; then
+ TARGET=$( basename $( ls -la "$ITEM" | cut -d '>' -f2 | cut -c 2- ) )
+ if ! grep -q "$TARGET" $I_LOG ; then
+ (
+ export IFS="$IFS_OLD"
+ F_TMP=$(temp_create "$MODULE.remove-line")
+ cp $I_LOG $F_TMP
+ grep -v $ITEM $F_TMP > $I_LOG
+ temp_destroy $F_TMP
+ message "Symbolic link: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} is owned by ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+ message "Target of symbolic link is ${FILE_COLOR}${TARGET}${DEFAULT_COLOR}"
+ message "${FILE_COLOR}${TARGET}${DEFAULT_COLOR} is owned by $(grep "^$TARGET$" $INSTALL_LOGS/* | cut -d: -f1)"
+ message "Removed: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} from ${I_LOG}"
+ )
+ fi
+ fi
+ done
+ fi
+ # always return CONTINUE
+ return 2
+}
+
+
+plugin_register MODULE_CHECK plugin_module_check_symlinks
+
+
diff --git a/plugins/configd.plugin b/plugins/configd.plugin
new file mode 100644
index 0000000..f7f84c0
--- /dev/null
+++ b/plugins/configd.plugin
@@ -0,0 +1,37 @@
+#!/bin/bash
+######################################################
+# #
+# configd.plugin - handling of /etc/config.d files #
+# #
+######################################################
+# #
+# Copyright 2010 by Stefan Wold under GPLv2 #
+# #
+######################################################
+
+
+plugin_configd_post_build()
+{
+ local FILE
+
+ debug_msg "plugin_configd_post_build ($@)"
+
+ if [ -d $SCRIPT_DIRECTORY/config.d ]; then
+ verbose_msg "Handling 'config.d' files"
+ invoke_installwatch
+
+ [ -d /etc/config.d ] || mkdir -p /etc/config.d
+
+ for FILE in $SCRIPT_DIRECTORY/config.d/*; do
+ if [ ! -f /etc/config.d/${FILE##*/} ]; then
+ verbose_msg "Installing ${FILE##*/} into /etc/config.d"
+ /usr/bin/install -g 0 -o 0 -m 0644 $FILE /etc/config.d/
+ fi
+ done
+ devoke_installwatch
+ fi
+
+ return 2
+}
+
+plugin_register BUILD_POST_BUILD plugin_configd_post_build
diff --git a/plugins/download-file.plugin b/plugins/download-file.plugin
new file mode 100644
index 0000000..4a7a4d6
--- /dev/null
+++ b/plugins/download-file.plugin
@@ -0,0 +1,24 @@
+#!/bin/bash
+#############################################################
+# #
+# download-file.plugin - plugin that downloads file:// urls #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_download_file() {
+ # check if we can handle this type of URL:
+ if [ ${1:0:7} != "file://" ]; then
+ return 2
+ fi
+ debug_msg "plugin_source_download_file ($@)"
+
+ cp "${1:7}$2" $3
+}
+
+
+plugin_register SOURCE_DOWNLOAD plugin_source_download_file
diff --git a/plugins/download-generic.plugin b/plugins/download-generic.plugin
new file mode 100644
index 0000000..79e7f8c
--- /dev/null
+++ b/plugins/download-generic.plugin
@@ -0,0 +1,82 @@
+#!/bin/bash
+############################################################
+# #
+# download-generic.plugin - download http/ftp urls #
+# #
+############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+############################################################
+
+
+plugin_source_download_generic() {
+ # check if we can handle this type of URL:
+ if [ ${1:0:7} != "http://" -a ${1:0:8} != "https://" -a ${1:0:6} != "ftp://" ]; then
+ return 2
+ fi
+ debug_msg "plugin_source_download_generic ($@)"
+
+ URL=$1
+ # add trailing '/'
+ if [ "${URL:((${#URL}-1)):1}" != "/" ] ; then
+ URL="${URL}/"
+ fi
+
+ # this is what the download will be stored as initially:
+ TMP_FILE=$TMPDIR/$2
+
+ if [ "$FTP_ACTIVE" == "off" -o "$FTP_PASSIVE" == "on" ] ; then
+ WGET_OPTS+=" --passive-ftp"
+ fi
+
+ if [ "$CONTINUE" == "off" ] ; then
+ erase $TMP_FILE
+ else
+ WGET_OPTS+=" --continue"
+ fi
+
+ if [ "$USE_CACHE" == "off" ] ; then
+ WGET_OPTS+=" --cache=off"
+ else
+ WGET_OPTS+=" --cache=on"
+ fi
+
+ if [ -n "$DOWNLOAD_RATE" ] ; then
+ WGET_OPTS+=" --limit-rate=${DOWNLOAD_RATE}"
+ fi
+
+ if [ ${1:0:8} == "https://" ]; then
+ WGET_OPTS+=" --no-check-certificate"
+ fi
+
+ WGET_OPTS+=" --tries=${NUM_RETRY:-5}"
+
+ [ -n "$http_proxy" ] && export http_proxy=$http_proxy
+ [ -n "$ftp_proxy" ] && export ftp_proxy=$ftp_proxy
+ [ -n "$no_proxy" ] && export no_proxy=$no_proxy
+
+ verbose_msg "calling \"wget $WGET_OPTS \"$URL$2\" --output-document $TMP_FILE\""
+ if erase $TMP_FILE && wget $WGET_OPTS "$URL$2" --output-document "$TMP_FILE" ; then
+ # looks like it worked
+ if testpack $TMP_FILE ; then
+ if [ "$TMP_FILE" != "$3/$2" ]; then
+ install -m644 $TMP_FILE "$3/$2"
+ rm $TMP_FILE
+ fi
+ verbose_msg "download of \"$2\" successful"
+ else
+ rm -f $TMP_FILE
+ return 2
+ fi
+ else
+ # don't report errors against cache misses
+ if [ "$URL" != "$LRESORT_URL/" ]; then
+ activity_log "lget" "$MODULE" "$VERSION" "failed" "broken URL: \"$URL$2\""
+ fi
+ return 2
+ fi
+}
+
+
+plugin_register SOURCE_DOWNLOAD plugin_source_download_generic
diff --git a/plugins/initd.plugin b/plugins/initd.plugin
new file mode 100644
index 0000000..0364213
--- /dev/null
+++ b/plugins/initd.plugin
@@ -0,0 +1,88 @@
+#!/bin/bash
+#############################################################
+# #
+# initd.plugin - handling of initd.d files #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_initd_configure()
+{
+ local SCRIPTS INITDSCRIPTS INSTALLED_INITDSCRIPTS
+ debug_msg "plugin_initd_configure ($@)"
+ if ! grep -q INITDSCRIPTS $DEPENDS_CONFIG/$MODULE &&
+ [ -d $SCRIPT_DIRECTORY/init.d ]; then
+ cd $SCRIPT_DIRECTORY/init.d
+
+ SCRIPTS=$(ls -1)
+ INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
+
+ for INITDSCRIPT in $INITDSCRIPTS; do
+ if query "Invoke $INITDSCRIPT via init.d automatically at boot ?" y
+ then
+ INSTALLED_INIDSCRIPTS=$(echo $INSTALLED_INIDSCRIPTS $INITDSCRIPT)
+ else
+ if [ -f /etc/init.d/$INITDSCRIPT ]; then
+ chkconfig --del $INITDSCRIPT
+ ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
+ rm -f /etc/rc?.d/???$INITDSCRIPT
+ fi
+ fi
+ done
+ cd $SCRIPT_DIRECTORY
+
+ set_module_config "INITDSCRIPTS" "$INSTALLED_INIDSCRIPTS"
+ fi
+ return 2
+}
+
+
+plugin_initd_post_build()
+{
+ local SCRIPTS ALL_INITDSCRIPTS CHKCONFIG
+ debug_msg "plugin_initd_post_build ($@)"
+ [ -d /etc/init.d ] || mkdir -p /etc/init.d
+
+ if [ -d $SCRIPT_DIRECTORY/init.d ]; then
+ invoke_installwatch
+ verbose_msg "handling init.d scripts" | tee -a $C_LOG
+ cd $SCRIPT_DIRECTORY/init.d
+ SCRIPTS=$(ls -1)
+ ALL_INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
+
+ for INITDSCRIPT in $ALL_INITDSCRIPTS; do
+ if [ ! -f /etc/init.d/$INITDSCRIPT ] ; then
+ /usr/bin/install -g 0 -o 0 -m 700 $SCRIPT_DIRECTORY/init.d/$INITDSCRIPT /etc/init.d/
+ fi
+ done
+ cd $SCRIPT_DIRECTORY
+ devoke_installwatch
+ fi
+
+ for INITDSCRIPT in $INITDSCRIPTS; do
+ ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
+ rm -f /etc/rc?.d/???$INITDSCRIPT
+ invoke_installwatch
+ chkconfig --add $INITDSCRIPT
+ devoke_installwatch
+
+ CHKCONFIG=`grep '^# chkconfig:' /etc/init.d/$INITDSCRIPT | cut -d : -f 2-2`
+ if `echo $CHKCONFIG | grep -q $(/sbin/runlevel | cut -d ' ' -f 2-2) -`
+ then
+ if [ "${LUNAR_RESTART_SERVICES:=on}" == "on" ]; then
+ ( cd / && /etc/init.d/$INITDSCRIPT stop )
+ ( cd / && /etc/init.d/$INITDSCRIPT start )
+ fi
+ fi
+
+ done
+ return 2
+}
+
+
+plugin_register BUILD_CONFIGURE plugin_initd_configure
+plugin_register BUILD_POST_BUILD plugin_initd_post_build
diff --git a/plugins/optimize-wrappers.plugin b/plugins/optimize-wrappers.plugin
new file mode 100644
index 0000000..f8e16f3
--- /dev/null
+++ b/plugins/optimize-wrappers.plugin
@@ -0,0 +1,70 @@
+#
+# wrappers linker optimizations plugin
+#
+
+plugin_wrappers_optimize()
+{
+ if [[ -z "$USE_WRAPPERS" ]] ; then
+ if [ -f /etc/lunar/local/optimizations.WRAPPERS ]; then
+ . /etc/lunar/local/optimizations.WRAPPERS
+ fi
+ fi
+
+ if [ "${USE_WRAPPERS:-yes}" == "yes" ]; then
+ verbose_msg "Enabled wrapper script usage"
+ export PATH=/var/lib/lunar/compilers/:${PATH}
+ fi
+ return 2
+}
+
+
+plugin_wrappers_optimize_menu()
+{
+ # The main code calls this function WITHOUT $1 to find out which
+ # compiler optimization plugins exist. It then returns the version
+ # number which will be saved in $LUNAR_COMPILER as the user's
+ # choice for COMPILERS
+ if [ -z "$1" ]; then
+ echo "WRAPPERS"
+ echo "Compiler wrappers"
+ return 2
+ elif [ "$1" != "WRAPPERS" ]; then
+ # we don't display anything when the user selected a
+ # different menu
+ return 2
+ fi
+
+ # load previous optimizations
+ if [ -e /etc/lunar/local/optimizations.WRAPPERS ]; then
+ . /etc/lunar/local/optimizations.WRAPPERS
+ fi
+
+ save_optimizations()
+ {
+ debug_msg "save_optimizations($@)"
+ cat > /etc/lunar/local/optimizations.WRAPPERS <<EOF
+USE_WRAPPERS=$USE_WRAPPERS
+EOF
+ }
+
+ export IFS=$'\t\n'
+ TITLE="Lunar CCache Optimizations"
+
+ while true; do
+ RESULT=`$DIALOG --ok-label "Select" --cancel-label "Close" --menu "Use the Compiler wrapper scripts? This will enable all optimizations for most programs even if the Makefile doesn't support them, and allows for more debugging output." 0 0 0 "USE_WRAPPERS" "Use the compile wrappers [$USE_WRAPPERS]"`
+ if [ $? != 0 ]; then
+ break
+ else
+ if [ $USE_WRAPPERS == 'yes' ]; then
+ USE_WRAPPERS=no
+ else
+ USE_WRAPPERS=yes
+ fi
+ save_optimizations
+ fi
+ done
+}
+
+
+plugin_register BUILD_BUILD plugin_wrappers_optimize
+plugin_register OPTIMIZE_MENU plugin_wrappers_optimize_menu
diff --git a/plugins/postbuild-generic.plugin b/plugins/postbuild-generic.plugin
new file mode 100644
index 0000000..06c6eab
--- /dev/null
+++ b/plugins/postbuild-generic.plugin
@@ -0,0 +1,113 @@
+#!/bin/bash
+#############################################################
+# #
+# postbuild-generic.plugin - postbuild handling of non- #
+# module related files #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_services_post_build()
+{
+ local IFS LINE
+ debug_msg "plugin_services_post_build ($@)"
+ if [ -f $SCRIPT_DIRECTORY/services ]; then
+ export IFS="$ENTER_IFS"
+ while read LINE; do
+ grep -q "$LINE" /etc/services || echo "$LINE" >> /etc/services
+ done < $SCRIPT_DIRECTORY/services
+ fi
+ return 2
+}
+
+
+gather_docs()
+{
+ # function : gather_docs
+ # usage : gather_docs LIST OF FILES
+ # purpose : Installs extra documentation that came with the
+ # module's source package into the module's
+ # document directory (defined as Lunar's base
+ # document directory plus the module name).
+ debug_msg "gather_docs ($@)"
+
+ DOC_DIR=${DOCUMENT_DIRECTORY}/${MODULE}
+ if [ -d "$SOURCE_DIRECTORY" ] ; then
+ cd $SOURCE_DIRECTORY
+ mkdir -p $DOC_DIR
+ # For each parameter that is an existing file
+ for FILE in ${@}; do
+ if [ -e ${FILE} -a -f ${FILE} ] ; then
+ # copy it over to the doc directory creating directories as needed
+ verbose_msg "Installing extra documentation to: ${DOC_DIR}/${FILE}"
+ install -D -m 644 ${FILE} ${DOC_DIR}/${FILE}
+ elif [ -d ${FILE} ] ; then
+ # copy the directory to the docdir
+ verbose_msg "Installing extra documentation to: ${DOC_DIR}/${FILE}"
+ cp -a ${FILE} ${DOC_DIR}/
+ fi
+ done
+ # do not return 2 here: this function is called directly and
+ # must return true (0) here
+ return 0
+ fi
+ return 2
+}
+
+
+plugin_postbuild_gather_docs()
+{
+ # pre-conditions : user must have $GARBAGE="on" to have any
+ # of this actually happen.
+ debug_msg "plugin_postbuild_gather_docs ($@)"
+
+ DOC_DIR=${DOCUMENT_DIRECTORY}/${MODULE}
+
+ # This is the list of default extra documentation that is to be
+ # installed automatically if the user has $GARBAGE=on. Any other
+ # docs are left up to the module writer to get installed.
+ DEFAULT_DOCS="README* INSTALL* FAQ* CHAN* doc* DOC* *doc \
+ *sample* conf SETUP NEWS Change* manual* Manual*"
+
+ if [ -d "$SOURCE_DIRECTORY" ] ; then
+ cd $SOURCE_DIRECTORY
+
+ # Bail if the user doesn't want to install any extra documentation
+ if [ "$GARBAGE" != "on" ] ; then
+ return 2
+ fi
+ invoke_installwatch
+ mkdir -p $DOC_DIR
+ # No parameters were passed in, install the default docs
+ for FILE in ${DEFAULT_DOCS}; do
+ # copy all of the default docs (prune Makefiles)
+ if [ -s $FILE -a ! -f ${FILE}/Makefile ] ; then
+ verbose_msg "Installing default documentation to: ${DOC_DIR}/${FILE}"
+ cp -a $FILE $DOC_DIR 2> /dev/null
+ fi
+ done
+ devoke_installwatch
+ fi
+ return 2
+}
+
+
+plugin_archive_module()
+{
+ debug_msg "plugin_archive_module($@)"
+ # keep a record of the module scripts used for every install
+ if [ ! -e /var/state/lunar/module_history ]; then
+ mkdir -p /var/state/lunar/module_history
+ fi
+ tar -cj --exclude=.svn -C $MOONBASE/$SECTION -f /var/state/lunar/module_history/$MODULE-$VERSION-$(date -u +%Y%m%d).tar.bz2 $MODULE
+ return 2
+}
+
+
+plugin_register BUILD_POST_BUILD plugin_services_post_build
+plugin_register BUILD_POST_BUILD plugin_postbuild_gather_docs
+plugin_register BUILD_POST_BUILD plugin_archive_module
diff --git a/plugins/unpack-generic.plugin b/plugins/unpack-generic.plugin
new file mode 100644
index 0000000..b3d55ab
--- /dev/null
+++ b/plugins/unpack-generic.plugin
@@ -0,0 +1,48 @@
+#!/bin/bash
+#############################################################
+# #
+# unpack-generic.plugin - generic plugin that unpacks #
+# sources #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_unpack_generic() {
+ case $1 in
+ *tar.bz2|*tbz2)
+ debug_msg "Unpacking tar.bz2 file \"$1\""
+ tar jxf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *tar.gz|*tgz|*tar.Z)
+ debug_msg "Unpacking tar.gz file \"$1\""
+ tar zxf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *.bz2)
+ debug_msg "Unpacking bz2 file \"$1\""
+ cp $1 . || return 1
+ bunzip2 $1 || return 1
+ ;;
+ *.gz)
+ debug_msg "Unpacking gz file \"$1\""
+ cp $1 . || return 1
+ gunzip $1 || return 1
+ ;;
+ *.tar)
+ debug_msg "Unpacking tar file \"$1\""
+ tar xf $1 --no-same-owner --no-same-permissions || return 1
+ ;;
+ *)
+ # fallback: we don't know what to do!
+ return 2
+ ;;
+ esac
+ # return success!
+ return 0
+}
+
+
+plugin_register SOURCE_UNPACK plugin_unpack_generic
diff --git a/plugins/verify-md5.plugin b/plugins/verify-md5.plugin
new file mode 100644
index 0000000..5aefe93
--- /dev/null
+++ b/plugins/verify-md5.plugin
@@ -0,0 +1,32 @@
+#!/bin/bash
+#############################################################
+# #
+# verify-md5.plugin - plugin that performs md5check #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_verify_md5() {
+ # check if we can handle this type of VFY:
+ if [ "${2:0:4}" != "md5:" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_source_verify_md5 ($@)"
+ TMP_MD5=$(md5sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
+ if [ "${2:4}" != "$TMP_MD5" ] ; then
+ message "${PROBLEM_COLOR}! md5sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
+ verbose_msg "offending md5sum: $TMP_MD5"
+ verbose_msg "should be md5sum: ${2:4}"
+ return 1
+ else
+ # always return 'continue' plugin value
+ return 2
+ fi
+}
+
+
+plugin_register SOURCE_VERIFY plugin_source_verify_md5
diff --git a/plugins/verify-sha1.plugin b/plugins/verify-sha1.plugin
new file mode 100644
index 0000000..a66b14a
--- /dev/null
+++ b/plugins/verify-sha1.plugin
@@ -0,0 +1,32 @@
+#!/bin/bash
+#############################################################
+# #
+# verify-sha1.plugin - plugin that performs sha1check #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_verify_sha1() {
+ # check if we can handle this type of VFY:
+ if [ "${2:0:5}" != "sha1:" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_source_verify_sha1 ($@)"
+ TMP_MD5=$(sha1sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
+ if [ "${2:5}" != "$TMP_MD5" ] ; then
+ message "${PROBLEM_COLOR}! sha1sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
+ verbose_msg "offending sha1sum: $TMP_MD5"
+ verbose_msg "should be sha1sum: ${2:5}"
+ return 1
+ else
+ # always return 'continue' plugin value
+ return 2
+ fi
+}
+
+
+plugin_register SOURCE_VERIFY plugin_source_verify_sha1
diff --git a/plugins/verify-sha256.plugin b/plugins/verify-sha256.plugin
new file mode 100644
index 0000000..fcf2316
--- /dev/null
+++ b/plugins/verify-sha256.plugin
@@ -0,0 +1,32 @@
+#!/bin/bash
+#############################################################
+# #
+# verify-sha256.plugin - plugin that performs sha256check #
+# #
+#############################################################
+# #
+# Copyright 2005 by Auke Kok under GPLv2 #
+# Copyright 2009 by Stefan Wold under GPLv2 #
+# #
+#############################################################
+
+
+plugin_source_verify_sha256() {
+ # check if we can handle this type of VFY:
+ if [ "${2:0:7}" != "sha256:" ] ; then
+ return 2
+ fi
+ debug_msg "plugin_source_verify_sha256 ($@)"
+ TMP_SHA=$(sha256sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
+ if [ "${2:7}" != "$TMP_SHA" ] ; then
+ message "${PROBLEM_COLOR}! sha256sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
+ verbose_msg "offending sha256sum: $TMP_SHA"
+ verbose_msg "should be sha256sum: ${2:7}"
+ return 1
+ else
+ # always return 'continue' plugin value
+ return 2
+ fi
+}
+
+plugin_register SOURCE_VERIFY plugin_source_verify_sha256
diff --git a/prog/lget b/prog/lget
new file mode 100755
index 0000000..0098501
--- /dev/null
+++ b/prog/lget
@@ -0,0 +1,119 @@
+#!/bin/bash
+############################################################
+# #
+# lget - get sources from the net #
+# #
+############################################################
+# leach is part of the sorcery spell management utility #
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# #
+# this WAS the leach script of a source based Linux distro,#
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+
+help() {
+
+ cat << EOF
+
+Lget downloads single or multiple module source files.
+
+Example : lget nano hdparm sudo
+Usage : lget [parameters] [modules]
+
+Optional Parameters:
+
+ -a | --all Download all sources available in moonbase
+ -d | --debug Enables debug messages
+ -f | --from directory Specify an alternate for $SOURCE_CACHE
+ -h | --help Displays this help text
+ -u | --url URL Specify an alternate download URL
+ -v | --verbose Increases the level of message output
+ -w | --want version Try to download a different version that is
+ not in moonbase
+EOF
+
+ exit 1
+
+}
+
+
+main() {
+ cd $TMPDIR
+
+ MODULES="$@"
+ if [ -z "$MODULES" ] ; then
+ verbose_msg "downloading entire moonbase"
+ MODULES=$(list_moonbase | sort)
+ fi
+
+ if echo $MODULES | grep -qw moonbase ; then
+ # just update moonbase, no other modules
+ get_moonbase
+ # remove moonbase from MODULES and continue
+ MODULES=$(echo $MODULES | sed 's/moonbase//g')
+ fi
+
+ for MODULE in $MODULES; do
+ if ! lget_locked $MODULE ; then
+ lget_lock $MODULE
+ verbose_msg "downloading module \"$MODULE\""
+ download_module $MODULE
+ lget_unlock $MODULE
+ else
+ false
+ fi
+ done
+
+}
+
+
+. /etc/lunar/config
+
+GETOPT_ARGS=$(getopt -q -n lget -o "adf:hu:vw:" -l "all,debug,from:,help,url:,verbose,want:" -- "$@")
+
+if [ -z "$?" ] ; then
+ help | view_file
+ exit
+else
+ eval set -- $GETOPT_ARGS
+
+ root_check
+ enviro_check
+ set_priority
+ while true ; do
+ case "$1" in
+ -a|--all ) export LGET_ALL=yes ; shift ;;
+ -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
+ -f|--from ) export SOURCE_CACHE=$2 ; shift 2 ;;
+ -h|--help ) help ; exit 1 ;;
+ -u|--url ) export BASE_URL="$2" ; shift 2 ;;
+ -v|--verbose ) export VERBOSE="on" ; shift ;;
+ -w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
+ --) shift ; break ;;
+ *) help ; exit ;;
+ esac
+ done
+
+ if [ -n "$LGET_ALL" -o -n "$1" ] ; then
+ main $@
+ else
+ help
+ exit 1
+ fi
+fi
diff --git a/prog/lin b/prog/lin
new file mode 100755
index 0000000..5fcba80
--- /dev/null
+++ b/prog/lin
@@ -0,0 +1,257 @@
+#!/bin/bash
+############################################################
+# #
+# lin - install Lunar modules #
+# #
+############################################################
+# cast is part of the sorcery spell management utility #
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# #
+# this WAS the cast script of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+# This enables alias expansion within lin and its children
+# although this doesn't expand aliases within functions
+# That is a limitation of bash and aliases
+shopt -s expand_aliases
+
+help() {
+ cat << EOF
+Lin installs single or multiple modules
+
+Example: lin nano hdparm sudo
+Usage: lin [parameters] [module]
+
+Optional Parameters:
+
+-c | --compile Ignore $INSTALL_CACHE and compiles
+-d | --debug Enables debug messages
+ --deps Configure modules and determine dependencies,
+-f | --from directory Specify an alternate for $SOURCE_CACHE
+-h | --help Displays this help text
+ --opts '--enable-xxx' Add custom configure options to the module
+-p | --probe Only lin if not already installed
+-r | --reconfigure Select new dependencies for modules
+-R | --resurrect Force to be unpacked from /var/cache/lunar
+-s | --silent Decreases the level of message output
+-v | --verbose Increases the level of message output
+-w | --want version Try to install a different version that is
+ not in moonbase
+EOF
+ exit 1
+}
+
+
+main() {
+ debug_msg "main ($@)"
+ MODULES="$@"
+
+ if echo $MODULES | grep -qw moonbase ; then
+ # just update moonbase, no other modules
+ if ! lget moonbase ; then
+ exit 1
+ fi
+ # remove moonbase from MODULES and continue
+ MODULES=$(echo $MODULES | sed 's/moonbase//g')
+ if [ -z "$MODULES" ] ; then
+ return
+ fi
+ fi
+
+ if [ -z "$MODULES" ] ; then
+ message "${MESSAGE_COLOR}Nothing to do!${DEFAULT_COLOR}"
+ return
+ fi
+
+ # different approaches for multiple modules (start up downloads first)
+ # and single modules (plain install)
+ if [ -z "$SINGLE_MODULE" ] ; then
+
+ if [ -z "$TEMP_DOWNLOAD_PIDS" ] ; then
+ export TEMP_DOWNLOAD_PIDS=$(temp_create "download-pids")
+ export TEMP_PREPAREDDEPS=$(temp_create "prepared-depends")
+ fi
+ export TEMP_CONFIGOPTS=$(temp_create "configopts")
+
+ # pass 1 : run full dependency checking
+ # This pass does configuration and dependency identification.
+ if ! DEPS_ONLY=--deps build_depends $MODULES ; then
+ temp_destroy $TEMP_DOWNLOAD_PIDS
+ temp_destroy $TEMP_PREPAREDDEPS
+ temp_destroy $TEMP_CONFIGOPTS
+ verbose_msg "Unexpected errors, bailing out!"
+ exit 1
+ fi
+
+ # pass 2 : hit the download manager button and grab a beer
+ # this runs as a background process, so we are off to step #3 right away
+ if [ -z "$DEPS_ONLY" ] ; then
+ verbose_msg "Spawning download manager"
+
+ # this code hurts more than it helps - it can stall forever (minutes)
+ # even when just linning 2-3 modules
+ # for M in $MODULES ; do
+ # LIST="$(for D in `find_depends $M`; do if ! module_installed $D ; then echo $D ; fi ; done | uniq) $LIST"
+ # done
+
+ verbose_msg "download queue: $LIST $MODULES"
+ for M in $LIST $MODULES; do
+ THIS_TEMP=$(temp_create "$M.download.log")
+ rm $THIS_TEMP
+ SAFE_M=$(echo $M | md5sum | awk '{print $1}')
+ eval TEMP_DOWNLOAD_LOG_$SAFE_M=$THIS_TEMP
+ done
+ (
+ for M in $LIST $MODULES; do
+ SAFE_M=$(echo $M | md5sum | awk '{print $1}')
+ eval THIS_TEMP=\$TEMP_DOWNLOAD_LOG_$SAFE_M
+ lget $M > $THIS_TEMP 2>&1 &
+ echo "$M:`jobs -p`:$THIS_TEMP" >> $TEMP_DOWNLOAD_PIDS
+ wait
+ done
+ ) &
+
+ # pass 3 : compile/install
+ # no strange stuff should happen here anymore
+ for MODULE in $MODULES ; do
+ if ! module_installed $MODULE || [ ! -n "$PROBE" ] || ( [ -n "$PROBE" ] && [ "$PROBE_EXPIRED" == "on" ] && module_is_expired $MODULE ) ; then
+ # 3 more conditions to stop processing this module:
+ if module_held $MODULE ; then
+ error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} Skipping compile and install for held module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
+ continue
+ elif module_exiled $MODULE ; then
+ error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} Skipping compile and install for exiled module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
+ continue
+ elif ! module_license_accepted $MODULE ; then
+ error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} The license of module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is incompatible with the list of"
+ error_message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
+ error_message "REJECTED_LICENSES variables to include or not include the specific"
+ error_message "license of this module.${DEFAULT_COLOR}"
+ continue
+ else
+ # we're good now, start installing
+ linING="/var/lock/installing.$MODULE"
+ verbose_msg "starting lin \"$MODULE\""
+ if ! ( SINGLE_MODULE=1 main $MODULE ) ; then
+ if [ -e "$TMP_LIN_FAIL" ] ; then
+ echo "$MODULE" >> $TMP_LIN_FAIL
+ fi
+ lin_EXIT_STATUS=1;
+ else
+ if [ -e "$TMP_LIN_SUCCESS" ] ; then
+ echo "$MODULE" >> $TMP_LIN_SUCCESS
+ fi
+ fi
+ fi
+ fi
+ done
+ fi
+
+ # cleanups that we need to do
+ temp_destroy $TEMP_DOWNLOAD_PIDS
+ temp_destroy $TEMP_PREPAREDDEPS
+ temp_destroy $TEMP_CONFIGOPTS
+
+ else
+ # we are only doing one module, drop down to:
+ MODULE=$MODULES
+ unset RECONFIGURE
+
+ run_details $MODULE &&
+ run_depends $MODULE &&
+ WANT_VERSION= satisfy_depends $MODULE
+
+ if [ -z "$DEPS_ONLY" ] ; then
+ if ! module_held $MODULE ; then
+ if [ -n "$PROBE" ] ; then
+ # --probe install
+ if ! module_installed $MODULE ; then
+ if ! lin_module $MODULE ; then
+ temp_destroy $TEMP_PREPAREDDEPS
+ exit 1
+ fi
+ elif [ "$PROBE_EXPIRED" == "on" ] && module_is_expired $MODULE ; then
+ # probe install where module is expired
+ verbose_msg "module \"$MODULE\" needs to be updated"
+ if ! SINGLE_MODULE= lin_module $MODULE ; then
+ temp_destroy $TEMP_PREPAREDDEPS
+ exit 1
+ fi
+ fi
+ else
+ # normal install - not probed
+ if ! lin_module $MODULE ; then
+ temp_destroy $TEMP_PREPAREDDEPS
+ exit 1
+ fi
+ fi
+ else
+ verbose_msg "Skipping held module \"$MODULE\""
+ fi
+ fi
+ fi
+}
+
+
+. /etc/lunar/config
+
+GETOPT_ARGS=$(getopt -q -n lin -o "cdf:hprRsvV:w:" -l "compile,debug,deps,from:,help,opts:,probe,reconfigure,resurrect,silent,verbose,Version:,want:" -- "$@")
+
+# the following trap makes sure all threads exit in case something weird
+# happens:
+trap "rm -f $(eval echo \$TEMP_PREPAREDDEPS \$TEMP_DOWNLOAD_PIDS \$INSTALLWATCHFILE) ; exit 1" CHLD INT TERM KILL
+
+if [ -z "$?" ] ; then
+ help | view_file
+ exit
+else
+ eval set -- $GETOPT_ARGS
+ export IFS="$STANDARD_IFS"
+
+ root_check
+ enviro_check
+ set_priority
+
+ while true ; do
+ case "$1" in
+ -c|--compile ) export COMPILE="$1" ; shift ;;
+ -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
+ --deps ) export DEPS_ONLY="$1" ; shift ;;
+ -f|--from ) export SOURCE_CACHE=$2 ; shift 2 ;;
+ -h|--help ) help ; exit ;;
+ --opts ) export PASS_OPTS="$2" ; shift 2 ;;
+ -p|--probe ) export PROBE="$1" ; shift ;;
+ -r|--reconfigure ) export RECONFIGURE="$1" ; shift ;;
+ -R|--resurrect ) export RESURRECT="$1" ; shift ;;
+ -s|--silent ) export SILENT="$1" ; shift ;;
+ -v|--verbose ) export VERBOSE="on" ; shift ;;
+ -w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
+ --) shift ; break ;;
+ *) help ; break ;;
+ esac
+ done
+
+ if [ -n "$RESURRECT" ] ; then
+ resurrect_modules $@
+ else
+ main $@
+ fi
+fi
+
+
diff --git a/prog/lrm b/prog/lrm
new file mode 100755
index 0000000..95847f0
--- /dev/null
+++ b/prog/lrm
@@ -0,0 +1,370 @@
+#!/bin/bash
+############################################################
+# #
+# This code is written for Lunar Linux, see #
+# http://lunar-linux.org #
+# #
+############################################################
+# #
+# lrm is for removing installed packages #
+# #
+# 20020610 #
+# #
+############################################################
+# #
+# Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+# Copyrighted Auke Kok 2004 under GPLv2 #
+# #
+############################################################
+
+help() {
+cat << END
+usage: lrm [options] [module ...]
+ -d | --debug Enables debug messages
+ -D | --downgrade [module] [version] downgrades a module
+ -h | --help Displays this help text
+ -k | --keepconfig remove module(s) but keep dependencies and config
+ -n | --nosustain removes module(s) even if they are sustained
+ -u | --upgrade remove the module but do not run scripts etc.
+ -v | --verbose Increases the level of message output
+ -p | --purge Delete all modules that depend on the module(s)
+ being removed as well
+
+lrm is a script for removing installed modules.
+ If invoked without options, lrm will remove all installed files
+belonging to the module(s) and remove the module(s) from the list
+of installed modules.
+ Downgrading a module means removing the current installed version
+of the module and installing a specific version; given that the
+specific version is already in $INSTALL_CACHE/.
+ Some modules (such as bash and gcc) are marked "non-removable" by the
+system. In order to remove "sustained" modules, use the nosustain option.
+END
+exit 1
+}
+
+
+handle_config_files() {
+ debug_msg "handle_config_files ($@)"
+ if dirname "$1" | grep -q "^/etc" ; then
+ # we can safely delete symlinks without md5sum checks
+ if [ -L "$1" ] ; then
+ return 0
+ fi
+
+ debug_msg "considering config file \"$1\""
+
+ TARGET_MD5=$(md5sum "$1" | cut -d " " -f 1-1)
+ OLD_MD5=$(grep -w "$1\$" $MD5_LOG | cut -d " " -f 1-1)
+
+ if [ -z "$TARGET_MD5" ] ; then
+ verbose_msg "Skipping removal of \"$1\" due to problem with md5sum"
+ return 1
+ fi
+
+ if [ -z "$OLD_MD5" ] ; then
+ verbose_msg "Skipping removal of \"$1\" due to missing original md5sum"
+ return 1
+ fi
+
+ if [ "$TARGET_MD5" == "$OLD_MD5" ] ; then
+ debug_msg "removing \"$1\""
+ return 0
+ fi
+
+ if [ "$TARGET_MD5" != "$OLD_MD5" ] ; then
+ verbose_msg "Skipping removal of \"$1\" due to md5sum mismatch"
+ if [ "$PRESERVE" == "on" ] ; then
+ debug_msg "PRESERVE=on, keeping \"$1\""
+ return 1
+ else
+ verbose_msg "PRESERVE=off, archiving \"$1\""
+ mv $1 $1.$(date +%Y%m%d%H%M)
+ return 1
+ fi
+ fi
+ fi
+ return 0
+}
+
+
+remove_something() {
+ debug_msg "remove_something ($@)"
+ if [ -z "$1" ]; then
+ verbose_msg "remove_something: Nothing to remove!"
+ return 1
+ fi
+
+ if ! [ -e "$1" ] && ! [ -L "$1" ] ; then
+ verbose_msg "remove_something: no such file \"$1\"!"
+ return 1
+ fi
+
+ if [ -d "$1" ] ; then
+ if rmdir "$1" 2> /dev/null ; then
+ debug_msg "ok : rmdir \"$1\""
+ else
+ debug_msg "failed: rmdir \"$1\""
+ fi
+ else
+ if rm -f "$1" 2> /dev/null ; then
+ debug_msg "ok : rm -f \"$1\""
+ else
+ # this might be problematic so verbose_msg:
+ verbose_msg "failed: rm -f \"$1\""
+ fi
+ fi
+}
+
+
+process_directories() {
+ debug_msg "process_directories ($@)"
+
+ if [ -z "$1" ]; then
+ debug_msg "process_directories: No args, exiting"
+ return 1
+ fi
+
+ cat $1 | sort -r | while read LINE ; do
+ remove_something "$LINE"
+ done
+}
+
+
+lrm_module() {
+ debug_msg "lrm_module ($@)"
+
+ export TMP_DIRS=$(temp_create "$1.directories")
+
+ run_details $1 &> /dev/null
+
+ VERSION=$(installed_version $MODULE)
+ INST_LOG=$INSTALL_LOGS/$MODULE-$VERSION
+ MD5_LOG=$MD5SUM_LOGS/$MODULE-$VERSION
+
+ # time-out 1: PRE_REMOVE
+ if [ "$UPGRADE" != "on" ]; then
+ plugin_call BUILD_PRE_REMOVE $MODULE
+ run_module_file $MODULE PRE_REMOVE
+ fi
+
+ if [ "$MODULE" != "moonbase" ]; then
+ update_plugin $MODULE remove
+ fi
+
+ # init.d scripts stop before rm phase, but only if ! upgrading
+ if [ "$KEEPCONFIG" != "on" -a "$UPGRADE" != "on" ] ; then
+ # pre-read these variables!
+ SERVICES=$(get_module_config "SERVICES")
+ XINETD=$(get_other_module_config "xinetd" "INITDSCRIPTS")
+ for INITDSCRIPT in $(get_module_config "INITDSCRIPTS") ; do
+ verbose_msg "Stopping service $INITDSCRIPT"
+ ( cd / && /etc/init.d/$INITDSCRIPT stop )
+ done
+ fi
+
+ # grep -v the install logs over the protected stuff, this
+ # yields the files that may be removed
+ if [ "$REAP" == "on" ] ; then
+ cat $INST_LOG | grep -v -f $PROTECTED | while read TARGET ; do
+ if [ -e "$TARGET" ] ; then
+ if [ -d "$TARGET" ] ; then
+ echo "$TARGET" >> $TMP_DIRS
+ else
+ handle_config_files "$TARGET" &&
+ remove_something "$TARGET"
+ fi
+ fi
+ done
+ process_directories $TMP_DIRS
+ else
+ verbose_msg "Skipping removal of files completely (REAP=$REAP)"
+ fi
+
+ # administration duty time:
+ remove_module $MODULE
+
+ # time-out 2: POST_REMOVE
+ if [ "$UPGRADE" != "on" ] ; then
+ plugin_call BUILD_POST_REMOVE $MODULE
+ run_module_file $MODULE POST_REMOVE
+ fi
+ if [ "$KEEPCONFIG" == "on" -o "$UPGRADE" == "on" ] ; then
+ debug_msg "skipping removal of dependency listing and configs"
+ else
+ verbose_msg "removing module from dependency listing and configs"
+ remove_depends $MODULE
+ # remove alias if required
+ if [ $MODULE != moonbase ] ; then
+ for ALIAS in `cut -d: -f1 $MOONBASE/aliases`; do
+ if [ "$(get_local_config `echo LUNAR_ALIAS_${ALIAS:1}`)" == "$MODULE" ]; then
+ verbose_msg "removing alias mapping from \"$ALIAS\" to \"$MODULE\""
+ unset_local_config `echo LUNAR_ALIAS_${ALIAS:1}`
+ fi
+ done
+ fi
+ # restart xinetd after xinetd.confs have been removed by lrm...
+ if [ -n "$SERVICES" -a -n "$XINETD" ] ; then
+ verbose_msg "restarting xinetd"
+ /etc/init.d/xinetd restart
+ fi
+ fi
+
+ message "${LRM_COLOR}Removed${EXTEMP} module:" \
+ "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
+ activity_log "lrm" "$MODULE" "$VERSION" "success"
+
+temp_destroy $TMP_DIRS
+}
+
+
+check_status() {
+ if ! module_installed $MODULE ; then
+ message "${MODULE_COLOR}${MODULE}" \
+ "${PROBLEM_COLOR}is not installed." \
+ "${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ if [ "$NOSUSTAIN" != "on" -a "$UPGRADE" != "on" ] ; then
+ debug_msg "checking if \"$1\" is sustained"
+ if grep -q "^$MODULE$" "$SUSTAINED" ; then
+ message "${MODULE_COLOR}${MODULE}" \
+ "${PROBLEM_COLOR}is sustained." \
+ "${DEFAULT_COLOR}"
+ return 1
+ fi
+ fi
+}
+
+
+downgrade() {
+ # a local function for listing the contents of install cache
+ list_available_cache() {
+ ls -1 $INSTALL_CACHE/$MODULE-* | while read LINE ; do
+ echo "$LINE"
+ done
+ exit 1
+ }
+
+ root_check
+
+ verbose_msg "running \"$MODULE\" DETAILS file"
+ optimize
+ run_details $MODULE &> /dev/null || return 1
+
+ if [ -z "$1" ] ; then
+ message "No version is entered. The below is the list of available files."
+ list_available_cache
+ fi
+
+ if [ ! -s $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 ] ; then
+ message "Desired version is not available. Here is the available files"
+ list_available_cache
+ fi
+
+ verbose_msg "checking if \"$MODULE\" is installed"
+
+ if [ -n "$(installed_version $MODULE)" ] ; then
+ verbose_msg "\"$(installed_version $MODULE)\" of \"$MODULE\" is installed at the moment"
+
+ if [ "$1" == "$I_VERSION" ] ; then
+ message "The downgrade version is the same as the installed version"
+ message "Here is the available files."
+ list_available_cache
+ fi
+
+ verbose_msg "removing \"$MODULE-$(installed_version $MODULE)\""
+ lrm -ts $MODULE || lrm -s $MODULE
+
+ else
+ verbose_msg "\"$MODULE\" is NOT installed at the moment"
+ fi
+
+ verbose_msg "installing \"$MODULE-$1\""
+ verbose_msg "extracting cached install file..."
+
+ bzcat $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 | tar -kt $TAR_P -C / >/dev/null
+ verbose_msg "adding module to installed list"
+
+ bzcat $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 |
+ tar -kx $TAR_P -C / 2>/dev/null >/dev/null
+ verbose_msg "adding module to installed list"
+ add_module $MODULE installed $1
+ activity_log "lrm downgrade" "$MODULE" "$1" "success"
+
+ message "${RESURRECT_COLOR}Downgraded module:" \
+ "${MODULE_COLOR}${MODULE}" \
+ "${DEFAULT_COLOR}" \
+ "version" \
+ "${VERSION_COLOR}${1}" \
+ "${DEFAULT_COLOR}"
+
+ exit
+}
+
+
+. /etc/lunar/config
+
+
+GETOPT_ARGS=$(getopt -q -n lrm -o "dD:hknuvp" -l "debug,downgrade:,help,keepconfig,nosustain,upgrade,verbose,purge" -- "$@")
+
+if [ -z "$?" ] ; then
+ help | view_file
+ exit
+else
+ eval set -- $GETOPT_ARGS
+
+ root_check
+ enviro_check
+ set_priority
+
+ while true ; do
+ case "$1" in
+ -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
+ -D|--downgrade ) export DOWNGRADE="on"
+ export MODULE="$2"
+ shift 3
+ downgrade "${@#-}"
+ exit
+ break;;
+ -h|--help ) help ;;
+ -k|--keepconfig ) export KEEPCONFIG="on" ; shift ;;
+ -n|--nosustain ) export NOSUSTAIN="on" ; shift ;;
+ -v|--verbose ) export VERBOSE="on" ; shift ;;
+ -u|--upgrade ) export UPGRADE="on" ; shift ;;
+ -p|--purge ) export PURGE="on" ; shift ;;
+ --) shift; break ;;
+ *) help; break ;;
+ esac
+ done
+
+ for MODULE in "${@#-}" ; do
+ if check_status "$MODULE" ; then
+ # assemble purge list if requested
+ if [ "$PURGE" == "on" ] ; then
+ DEPS=$(list_installed_depending "$MODULE" | sort | uniq)
+ for DEP in $DEPS ; do
+ # skip held modules
+ if ! module_held $DEP ; then
+ # no duplicates
+ if ! $(echo $LIST | grep -qw $DEP) ; then
+ message "${MESSAGE_COLOR}Inserting ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR} into the removal queue${DEFAULT_COLOR}"
+ LIST="$LIST $DEP"
+ fi
+ fi
+ done
+ # last append the module itself
+ LIST="$LIST $MODULE"
+ else
+ # no fancy checks, just add to the list
+ LIST="$LIST $MODULE"
+ fi
+ fi
+ done
+ for MODULE in $LIST ; do
+ lrm_module $MODULE
+ done
+fi
+
diff --git a/prog/lsh b/prog/lsh
new file mode 100755
index 0000000..cee5269
--- /dev/null
+++ b/prog/lsh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#
+# quick hack to jump in and out of a lunar environment
+#
+
+. /etc/lunar/config
+
+set_priority
+
+if (( $# > 0 )) ; then
+ $@
+else
+ export PS1="\[\033[0;31m\][lunar] \u@\h \w \\$ \[\033[0m\]"
+ message "\n ${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
+ "lsh is potentially hazardous to your system.${DEFAULT_COLOR}\n"
+ bash --rcfile /etc/lunar/config
+fi
+
diff --git a/prog/lunar b/prog/lunar
new file mode 100755
index 0000000..5d68770
--- /dev/null
+++ b/prog/lunar
@@ -0,0 +1,840 @@
+#!/bin/bash
+############################################################
+# #
+# lunar - Lunar module management utility #
+# #
+############################################################
+# sorcery is part of the sorcery spell management utility #
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# #
+# this WAS sorcery script of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
+# #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# #
+############################################################
+
+
+help() {
+ cat << EOF
+Lunar -- a menu-driven software package management utility
+
+Example: lunar
+ This invokes the full-screen interface
+
+Usage: lunar [general options] [command [command parameters]]
+
+General options:
+
+-d | --debug Enables debug messages
+-h | --help Displays this help text
+-v | --verbose Increases the level of message output
+
+Commands:
+
+prune Removes old sources and install/compile logs
+renew Checks ver. against moonbase & recompiles if necessary
+update Fetches latest moonbase and then does a "renew"
+rebuild Recompiles all installed modules
+optimize Shortcut to the optimization menu
+fix Check and fix all modules and internal state of lunar
+nofix Check but do not fix modules and internal state
+fixdepends Check and fix the dependency database of lunar
+set [var [value]] Check internal variable(s) and assign their values
+unset var Unsets an internal variable
+resurrect module(s) Force modulename(s) to be unpacked from /var/cache
+install module(s) Install a checklist of modules
+remove module(s) Remove a checklist of modules
+hold module(s) Place a hold on a checklist of modules
+unhold module(s) Remove a hold on a checklist of modules
+exile module(s) Remove a module a/o prevent it from being resurrected
+unexile module(s) Allows a module to be compiled|resurrected again
+EOF
+ exit 1
+}
+
+show_modules() {
+ for MODULE in `list_modules "$1"`; do
+ if ! module_installed $MODULE &&
+ ! module_held $MODULE &&
+ ! module_exiled $MODULE
+ then
+ (
+ run_details $MODULE
+ echo "$MODULE"
+ echo "$VERSION"
+ echo "${SHORT:-Short Description Unavailable}"
+ )
+ fi
+ done
+}
+
+
+show_sections() {
+ for SECTION in $(list_sections); do
+ [ -z "$(list_modules $SECTION)" ] || {
+ echo "$SECTION"
+ echo "section"
+ }
+ done
+}
+
+
+select_section() {
+ $DIALOG --title "Section Selection Menu" \
+ --default-item "$SECTION" \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --menu \
+ "" \
+ 0 40 15 \
+ `show_sections`
+}
+
+
+add_pkgs() { (
+ while
+ SECTION=`select_section`
+ do
+ while
+ SECTION_MODULES=$(show_modules $SECTION)
+ MODULE=`$DIALOG --title "Select module to install please" \
+ --item-help \
+ --menu \
+ "Section: $SECTION" \
+ 0 60 10 \
+ $SECTION_MODULES`
+ do
+ SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
+ DESCRIPTION=$(run_module_file $MODULE DETAILS)
+
+ if $DIALOG --title "Install $MODULE" \
+ --yesno "$DESCRIPTION" \
+ 14 76
+ then
+ push_install_queue $MODULE
+ $DIALOG --msgbox "$MODULE added to the install queue." 5 60
+ else
+ $DIALOG --msgbox "$MODULE will not be installed." 5 60
+ fi
+ done
+ done
+) }
+
+
+show_file() {
+ if [ -f $1 ]; then
+ if [ "`file -b $1 | cut -d ' ' -f1`" == "bzip2" ]; then
+ bzcat $1 | view_file
+ else
+ $DIALOG --textbox $1 10 0
+ fi
+ else
+ $DIALOG --msgbox "File not found." 0 0
+ return 1
+ fi
+}
+
+
+file_list() {
+ pushd $1 > /dev/null
+ file -N -F ' ' * | cut -d ' ' -f1,3 --output-delimiter='
+ '
+ popd > /dev/null
+}
+
+
+file_menu() {
+ FILE_LIST=`file_list $1`
+ echo $1/`$DIALOG --title "Please select a file." \
+ --menu "" 0 0 0 \
+ $FILE_LIST`
+}
+
+
+show_installed_modules() {
+ for LINE in $(sort $MODULE_STATUS_BACKUP) ; do
+ (
+ MODULE=`echo "$LINE" | cut -d : -f1`
+ STATUS=`echo "$LINE" | cut -d : -f3`
+ VERSION=`echo "$LINE" | cut -d : -f4`
+ SIZE=`echo "$LINE" | cut -d : -f5`
+
+ # TODO THIS IS BROKEN
+ if module_installed $MODULE ; then
+ SHORT="Short Description Unavailable"
+ run_module_file $MODULE DETAILS &> /dev/null
+ echo -e "$MODULE\n"
+ echo -e "$VERSION,$SIZE\n"
+ echo -e "\"$SHORT\"\n"
+ fi
+ )
+ done
+}
+
+
+remove_pkgs() {
+ while
+ if [ -z "$INSTALLED_MODULES" ]; then
+ INSTALLED_MODULES=$(show_installed_modules)
+ fi
+
+ unset MODULE
+ MODULE=`$DIALOG --title "Select module to remove:" \
+ --item-help \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --menu "" 0 60 10 \
+ $INSTALLED_MODULES`
+ do
+ (
+ SECTION=$(find_section $MODULE)
+ SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
+ DESCRIPTION=$(run_module_file $MODULE DETAILS)
+
+ if $DIALOG --title "Remove $MODULE" \
+ --yesno "$DESCRIPTION" \
+ 12 76
+ then
+ push_remove_queue $MODULE &&
+ $DIALOG --msgbox "$MODULE added to the remove queue." 5 60 ||
+ $DIALOG --msgbox "$MODULE is not really installed?" 5 60
+ fi
+ )
+ done
+}
+
+
+
+make_checklist() {
+ for MODULE in `list_modules "$1"`; do
+ (
+ run_details $MODULE
+
+ if module_installed $MODULE || module_held $MODULE; then
+ STATUS="on"
+ else
+ STATUS="off"
+ fi
+
+ echo $MODULE
+ echo $VERSION
+ echo $STATUS
+ echo ${SHORT:-Short Description Unavailable}
+ )
+ done
+}
+
+
+process_section() {
+ KEEP_LIST=$2
+
+ for LINE in `list_modules "$1"`; do
+ if echo -e "$KEEP_LIST" |
+ grep -q "^$LINE\$"
+ then push_install_queue $LINE
+ else push_remove_queue $LINE
+ fi
+ done
+}
+
+
+select_pkgs() {
+ SELECT_TITLE="Module Toggle Selection Menu"
+ SELECT_HELP="[X]=install [ ]=remove"
+
+ while SECTION=`select_section`; do
+ [ -z "$(list_modules $SECTION)" ] ||
+ CHECKLIST=`make_checklist $SECTION`
+
+ if OUTLIST=`$DIALOG --title "$SELECT_TITLE" \
+ --ok-label "Commit" \
+ --item-help \
+ --separate-output \
+ --checklist \
+ "$SELECT_HELP $SECTION" \
+ 0 0 10 \
+ $CHECKLIST`
+ then process_section "$SECTION" "$OUTLIST"
+ fi
+ done
+}
+
+
+make_hold_checklist() {
+ for LINE in $(sort $MODULE_STATUS_BACKUP) ; do
+ (
+ MODULE=$(echo "$LINE" | cut -d: -f1)
+ STATUS=$(echo "$LINE" | cut -d: -f3)
+ VERSION=$(echo "$LINE" | cut -d: -f4)
+ if [ "$STATUS" == "installed" ] || [ "$STATUS" == "held" ] ; then
+ [ "$STATUS" == "held" ] && HELD="on" || HELD="off"
+ SHORT="Short description unavailable"
+ if run_details $MODULE &> /dev/null ; then
+ echo $MODULE
+ echo $VERSION
+ echo $HELD
+ echo $SHORT
+ fi
+ fi
+ )
+ done
+}
+
+
+hold_pkgs() {
+ HOLD_TITLE="Select modules to hold or unhold"
+ HOLD_HELP="[X]=held [ ]=installed"
+
+ if OUTLIST=`$DIALOG --title "$HOLD_TITLE" \
+ --item-help \
+ --ok-label "Commit" \
+ --separate-output \
+ --checklist \
+ "$HOLD_HELP" \
+ 0 0 10 \
+ $(make_hold_checklist)`
+ then
+ unhold_modules $(cut -d: -f1 < $MODULE_STATUS)
+ hold_modules $OUTLIST
+ fi
+
+}
+
+
+module_menu() {
+ while
+ U_HELP="Current software hinders crackers' attempts to infiltrate your box"
+ M_HELP="Install and remove multiple modules from a section using a single selection"
+ A_HELP="Simple safe, verbose way of selecting modules for installation"
+ R_HELP="Simple safe, verbose way of selecting modules for removal"
+ B_HELP="Rebuild all installed modules"
+ H_HELP="Held modules will not be upgraded until unheld or broken"
+ E_HELP="Done managing modules"
+ TITLE="Module Menu"
+ OK="Select"
+ CANCEL="Exit"
+
+ COMMAND=`$DIALOG --title "$TITLE" \
+ --item-help \
+ --ok-label "$OK" \
+ --cancel-label "$CANCEL" \
+ --menu "" 0 0 0 \
+ "A" "Add" "$A_HELP" \
+ "B" "Rebuild" "$B_HELP" \
+ "H" "Hold" "$H_HELP" \
+ "R" "Remove" "$R_HELP" \
+ "S" "Select" "$M_HELP" \
+ "U" "Update" "$U_HELP"`
+ do
+ case $COMMAND in
+ U) update ;;
+ S) select_pkgs ;;
+ A) add_pkgs ;;
+ R) remove_pkgs ;;
+ B) rebuild ;;
+ H) hold_pkgs ;;
+ E) break ;;
+ esac
+ done
+}
+
+
+grep_install_logs() {
+ if WHAT=`$DIALOG --inputbox \
+ "Please enter full path and name of file" \
+ 0 0`
+ then
+ cd $INSTALL_LOGS
+ grep "$WHAT\$" * | view_file
+ fi
+}
+
+
+set_email() {
+ if ADMIN=`$DIALOG --ok-label "Commit" \
+ --inputbox \
+ "Please enter the email address of the person or role account that should receive reports from this box." \
+ 0 0 "$ADMIN"`
+ then
+ set_local_config "ADMIN" "$ADMIN"
+ fi
+}
+
+
+set_delay() {
+ if PROMPT_DELAY=`$DIALOG --ok-label "Commit" \
+ --inputbox \
+ "Please enter the time in seconds to wait for a response when prompted with a question." \
+ 0 0 "$PROMPT_DELAY"`
+ then
+ set_local_config "PROMPT_DELAY" "$PROMPT_DELAY"
+ fi
+}
+
+
+queue_menu() {
+ [ ! -d /var/log/lunar/queue ] || mkdir -p /var/log/lunar/queue
+ while
+ I_HELP="View the list of modules selected for installation"
+ i_HELP="Edit the list of modules selected for installation"
+ R_HELP="View the list of modules selected for removal"
+ r_HELP="Edit the list of modules selected for removal"
+ M_HELP="View the datafile of installed modules"
+ m_HELP="Edit the datafile of installed modules"
+
+ COMMAND=`$DIALOG --title "Queue Menu" \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --default-item $COMMAND \
+ --item-help \
+ --menu \
+ "" \
+ 0 40 6 \
+ "I" "View install queue" "$I_HELP" \
+ "i" "Edit install queue" "$i_HELP" \
+ "R" "View removal queue" "$R_HELP" \
+ "r" "Edit removal queue" "$r_HELP" \
+ "M" "View module status" "$M_HELP" \
+ "m" "Edit module status" "$m_HELP"`
+ do
+ case $COMMAND in
+ M) show_file $MODULE_STATUS ;;
+ m) edit_file $MODULE_STATUS
+ cp $MODULE_STATUS \
+ $MODULE_STATUS_BACKUP ;;
+ I) show_file $INSTALL_QUEUE ;;
+ i) edit_file $INSTALL_QUEUE ;;
+ R) show_file $REMOVE_QUEUE ;;
+ r) edit_file $REMOVE_QUEUE ;;
+ esac
+ done
+}
+
+
+maintenance_menu() {
+ while
+ F_HELP="Check and fix all modules and internal state of lunar"
+ N_HELP="Check all modules but do not fix the internal state"
+ D_HELP="Check and fix the dependency database of lunar"
+ P_HELP="Prune old sources and install/compile logs"
+ A_HELP="Change selected or select new alias mappings"
+
+ COMMAND=`$DIALOG --title "Maintenance Menu" \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --default-item $COMMAND \
+ --item-help \
+ --menu \
+ "" \
+ 0 40 6 \
+ "F" "Fix everything" "$F_HELP" \
+ "N" "Check everything but don't fix" "$N_HELP" \
+ "D" "Fix dependencies" "$D_HELP" \
+ "P" "Prune old sources and logs" "$P_HELP" \
+ "A" "Select or Change Aliases" "$A_HELP"`
+ do
+ case $COMMAND in
+ F) lunar fix ;;
+ N) lunar nofix ;;
+ D) lunar fixdepends ;;
+ P) lunar prune ;;
+ A) select_aliases ;;
+ esac
+ if [ $COMMAND != "A" ] ; then
+ message "${MESSAGE_COLOR}Press enter to return...${DEFAULT_COLOR}"
+ read
+ fi
+ done
+}
+
+
+log_menu() {
+ while
+ C_HELP="View compile logs of previously installed software"
+ G_HELP="Discover a file's origin"
+ I_HELP="View logs of files previously installed"
+ c_HELP="Remove a compile log"
+ i_HELP="Edit a log of files previously installed"
+
+ COMMAND=`$DIALOG --title "Log Menu" \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --default-item $COMMAND \
+ --item-help \
+ --menu \
+ "" \
+ 0 40 5 \
+ "G" "Grep install logs" "$G_HELP" \
+ "I" "View install log" "$I_HELP" \
+ "i" "Edit install log" "$i_HELP" \
+ "C" "View compile log" "$C_HELP" \
+ "c" "Remove compile log" "$c_HELP"`
+ do
+ case $COMMAND in
+ G) grep_install_logs ;;
+ I) show_file `file_menu $INSTALL_LOGS` ;;
+ i) edit_file `file_menu $INSTALL_LOGS` ;;
+ C) show_file `file_menu $COMPILE_LOGS` ;;
+ c) rm -f `file_menu $COMPILE_LOGS` ;;
+ esac
+ done
+}
+
+
+feature_menu() {
+ A_HELP="Create convenient auto-install scripts for common executables?"
+ C_HELP="Colorized messages on lin and lrm?"
+ E_HELP="Remove files when lrm?"
+ F_HELP="Check for and repair broken programs after updating lunar?"
+ G_HELP="Install the garbage documentation? (extras like README, LICENSE etc)"
+ H_HELP="Automatically resurrect modules instead of compiling them?"
+ I_HELP="Create archives of installed software?"
+ K_HELP="Keep source code in /usr/src on good compiles? (gcc profiling needs it)"
+ M_HELP="Email reports?"
+ P_HELP="Preserve modified files or backup them up and overwrite with defaults?"
+ R_HELP="Prompt to view reports?"
+ S_HELP="Play audio with prompts?"
+ T_HELP="Disallow lrm of modules that would cause terrible malfunctions?"
+ U_HELP="Automatically remove old sources and install caches upon lunar update?"
+ V_HELP="View compilation as it happens?"
+ W_HELP="Verbose display of compilation process?"
+ X_HELP="When using --probe, also recompile modules if a newer version is available?"
+ Z_HELP="Custom modules in zlocal override equally named ones (NOT RECOMMENDED) ?"
+
+ ARCHIVE=${ARCHIVE:-on}
+ AUTORESURRECT=${AUTORESURRECT:-on}
+ AUTOFIX=${AUTOFIX:-on}
+ AUTOPRUNE=${AUTOPRUNE:-off}
+ COLOR=${COLOR:-on}
+ KEEP_SOURCE=${KEEP_SOURCE:-off}
+ MAIL_REPORTS=${MAIL_REPORTS:-off}
+ VIEW_REPORTS=${VIEW_REPORTS:-off}
+ PRESERVE=${PRESERVE:-on}
+ SOUND=${SOUND:-off}
+ SUSTAIN=${SUSTAIN:on}
+ VOYEUR=${VOYEUR:-on}
+ REAP=${REAP:-on}
+ GARBAGE=${GARBAGE:-on}
+ VERBOSE=${VERBOSE:off}
+
+ if TOGGLES=`$DIALOG --title "Feature Menu" \
+ --no-cancel \
+ --item-help \
+ --separate-output \
+ --checklist \
+ "" \
+ 0 40 14 \
+ "ARCHIVE" "Toggle" "$ARCHIVE" "$I_HELP" \
+ "AUTORESURRECT" "Toggle" "$AUTORESURRECT" "$H_HELP" \
+ "AUTOFIX" "Toggle" "$AUTOFIX" "$F_HELP" \
+ "AUTOPRUNE" "Toggle" "$AUTOPRUNE" "$U_HELP" \
+ "COLOR" "Toggle" "$COLOR" "$C_HELP" \
+ "KEEP_SOURCE" "Toggle" "$KEEP_SOURCE" "$K_HELP" \
+ "GARBAGE" "Toggle" "$GARBAGE" "$G_HELP" \
+ "MAIL_REPORTS" "Toggle" "$MAIL_REPORTS" "$M_HELP" \
+ "PRESERVE" "Toggle" "$PRESERVE" "$P_HELP" \
+ "SOUND" "Toggle" "$SOUND" "$S_HELP" \
+ "SUSTAIN" "Toggle" "$SUSTAIN" "$T_HELP" \
+ "VIEW_REPORTS" "Toggle" "$VIEW_REPORTS" "$R_HELP" \
+ "VOYEUR" "Toggle" "$VOYEUR" "$V_HELP" \
+ "REAP" "Toggle" "$REAP" "$E_HELP" \
+ "VERBOSE" "Toggle" "$VERBOSE" "$W_HELP" \
+ "ZLOCAL_OVERRIDES" "Toggle" "$ZLOCAL_OVERRIDES" "$Z_HELP" \
+ "PROBE_EXPIRED" "Toggle" "$PROBE_EXPIRED" "$X_HELP"`
+
+ then
+
+ ARCHIVE=off
+ AUTORESURRECT=off
+ AUTOFIX=off
+ AUTOPRUNE=off
+ COLOR=off
+ KEEP_SOURCE=off
+ MAIL_REPORTS=off
+ PRESERVE=off
+ SOUND=off
+ SUSTAIN=off
+ VIEW_REPORTS=off
+ VOYEUR=off
+ REAP=off
+ GARBAGE=off
+ VERBOSE=off
+ZLOCAL_OVERRIDES=off
+ PROBE_EXPIRED=off
+
+ for TOGGLE in $TOGGLES; do
+ case $TOGGLE in
+ ARCHIVE) ARCHIVE=on ;;
+ AUTORESURRECT) AUTORESURRECT=on ;;
+ AUTOFIX) AUTOFIX=on ;;
+ AUTOPRUNE) AUTOPRUNE=on ;;
+ COLOR) COLOR=on ;;
+ KEEP_SOURCE) KEEP_SOURCE=on ;;
+ MAIL_REPORTS) MAIL_REPORTS=on ;;
+ PRESERVE) PRESERVE=on ;;
+ SOUND) SOUND=on ;;
+ SUSTAIN) SUSTAIN=on ;;
+ VIEW_REPORTS) VIEW_REPORTS=on ;;
+ VOYEUR) VOYEUR=on ;;
+ REAP) REAP=on ;;
+ GARBAGE) GARBAGE=on ;;
+ VERBOSE) VERBOSE=on ;;
+ ZLOCAL_OVERRIDES) ZLOCAL_OVERRIDES=on ;;
+ PROBE_EXPIRED) PROBE_EXPIRED=on ;;
+ esac
+ done
+
+ set_local_config "ARCHIVE" "$ARCHIVE"
+ set_local_config "AUTORESURRECT" "$AUTORESURRECT"
+ set_local_config "AUTOFIX" "$AUTOFIX"
+ set_local_config "AUTOPRUNE" "$AUTOPRUNE"
+ set_local_config "KEEP_SOURCE" "$KEEP_SOURCE"
+ set_local_config "MAIL_REPORTS" "$MAIL_REPORTS"
+ set_local_config "PRESERVE" "$PRESERVE"
+ set_local_config "SOUND" "$SOUND"
+ set_local_config "SUSTAIN" "$SUSTAIN"
+ set_local_config "VIEW_REPORTS" "$VIEW_REPORTS"
+ set_local_config "VOYEUR" "$VOYEUR"
+ set_local_config "REAP" "$REAP"
+ set_local_config "GARBAGE" "$GARBAGE"
+ set_local_config "VERBOSE" "$VERBOSE"
+ set_local_config "ZLOCAL_OVERRIDES" "$ZLOCAL_OVERRIDES"
+ set_local_config "PROBE_EXPIRED" "$PROBE_EXPIRED"
+ set_local_config "COLOR" "$COLOR"
+
+ fi
+}
+
+
+option_menu() {
+ while
+ P_HELP="Enter the default delay time for prompts"
+ E_HELP="Enter the email address for this box's administrator"
+ F_HELP="Select many options on or off at once"
+ M_HELP="Select ftp and http mirrors for faster downloads"
+ O_HELP="Select architecture optimizations"
+ I_HELP="Select the test that lunar fix, and AUTOFIX execute"
+ D_HELP="Options for downloads"
+ L_HELP="Select default lunar module"
+ T_HELP="Select default moonbase branch"
+ A_HELP="Select accepted licenses"
+ R_HELP="Select rejected licenses"
+
+ COMMAND=`$DIALOG --title "Option Menu" \
+ --item-help \
+ --ok-label "Select" \
+ --cancel-label "Exit" \
+ --menu \
+ "" \
+ 0 40 8 \
+ "L" "Default Lunar Module" "$L_HELP" \
+ "T" "Default Moonbase Branch" "$T_HELP" \
+ "P" "Prompt Delay" "$P_HELP" \
+ "D" "Download Options" "$D_HELP" \
+ "E" "Admin's Email" "$E_HELP" \
+ "F" "Feature Menu" "$F_HELP" \
+ "I" "Integrity Checking" "$I_HELP" \
+ "M" "Software Mirrors" "$M_HELP" \
+ "O" "Optimize Architecture" "$O_HELP" \
+ "A" "Accepted licenses" "$A_HELP" \
+ "R" "Rejected licenses" "$R_HELP"`
+
+ do
+ case $COMMAND in
+ P) set_delay ;;
+ D) download_options ;;
+ E) set_email ;;
+ F) feature_menu ;;
+ I) integrity_menu ;;
+ M) mirror_menu ;;
+ O) optimize_menu ;;
+ L) set_default_module ;;
+ T) set_default_moonbase ;;
+ A) set_accepted_licenses ;;
+ R) set_rejected_licenses ;;
+ esac
+ done
+}
+
+
+goodbye() {
+ echo "Have a good day."
+ exit
+}
+
+
+background_execute() {
+ $DIALOG --msgbox "Processing queues in the background." 0 0
+
+ [ -f $REMOVE_QUEUE ] &&
+ lrm `cat $REMOVE_QUEUE` 1>/dev/null 2>&1
+ rm -f $REMOVE_QUEUE
+
+ if [ -f $INSTALL_QUEUE ]; then
+ lin --deps `cat $INSTALL_QUEUE`
+ ( lin `cat $INSTALL_QUEUE` 1>/dev/null 2>&1 &&
+ rm -f $INSTALL_QUEUE
+ ) &
+ fi
+
+ goodbye
+}
+
+
+foreground_execute() {
+ [ -f $REMOVE_QUEUE ] && lrm `cat $REMOVE_QUEUE`
+ rm -f $REMOVE_QUEUE
+
+ [ -f $INSTALL_QUEUE ] && lin `cat $INSTALL_QUEUE`
+ rm -f $INSTALL_QUEUE
+
+ goodbye
+}
+
+
+setvar() {
+ if [ -z "$*" ] ; then
+ sort -n $LOCAL_CONFIG | grep -v -e UNIQID -e color | while read LINE ; do
+ printf "%32s %s\n" "$(echo $LINE|cut -d= -f1)" "$(echo $LINE|cut -d= -f2-)"
+ done
+ else
+ VAR=$1
+ shift
+ if [ -z "$*" ] ; then
+ VAL=$(get_local_config "$VAR")
+ printf "%s=%s\n" "$VAR" "$VAL"
+ else
+ set_local_config "$VAR" "$@"
+ fi
+ fi
+}
+
+
+unsetvar() {
+ if [ ! -z "$*" ] ; then
+ unset_local_config "$1"
+ fi
+}
+
+
+main_menu() {
+ while
+ M_HELP="Easy module management"
+ O_HELP="Change lunar options and features"
+ L_HELP="View and edit lunar generated log files."
+ Q_HELP="View and edit lunar queues."
+ F_HELP="Process queues while you watch and wait"
+ N_HELP="Discover and fix internal problems"
+ B_HELP="Process queues in the background"
+ E_HELP="Exit without processing queues"
+ OK="Select"
+ CANCEL="Exit"
+
+ COMMAND=`$DIALOG --title "Main Menu" \
+ --item-help \
+ --ok-label "$OK" \
+ --cancel-label "$CANCEL" \
+ --menu \
+ "$LUNAR_MODULE version: $LUNAR_VERSION" \
+ 0 0 0 \
+ "M" "Module Menu" "$M_HELP" \
+ "O" "Option Menu" "$O_HELP" \
+ "L" "Log Menu" "$L_HELP" \
+ "Q" "Queue Menu" "$Q_HELP" \
+ "N" "Maintenance Menu" "$N_HELP" \
+ "F" "Foreground Execute" "$F_HELP" \
+ "B" "Background Execute" "$B_HELP"`
+ do
+ case $COMMAND in
+ M) module_menu ;;
+ O) option_menu ;;
+ L) log_menu ;;
+ Q) queue_menu ;;
+ N) maintenance_menu ;;
+ F) foreground_execute ;;
+ B) background_execute ;;
+ esac
+ done
+}
+
+
+
+DIALOG="dialog
+--backtitle
+Lunar Module Management Utility
+--stdout"
+
+main() {
+ #lets load the menu code
+ if [ -n "$MENUS" ]; then
+ for FILE in $(echo $MENUS/*.menu) ; do
+ [ -s "$FILE" ] && . "$FILE"
+ done
+ fi
+
+ export IFS="$TAB_ENTER_IFS"
+
+ LUNAR_MODULE=${LUNAR_MODULE:-lunar}
+ LUNAR_VERSION=$(run_details $LUNAR_MODULE && echo $UPDATED)
+
+ main_menu
+}
+
+. /etc/lunar/config
+
+GETOPT_ARGS=$(getopt -q -n lunar -o "dhv" -l "debug,help,verbose" -- "$@")
+
+if [ -z "$?" ] ; then
+ help | view_file
+ exit
+else
+ eval set -- $GETOPT_ARGS
+ root_check
+ enviro_check
+ set_priority
+
+ while true ; do
+ case "$1" in
+ -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
+ -h|--help ) help ; exit 1 ;;
+ -v|--verbose ) export VERBOSE="on" ; shift ;;
+ --) shift ; break ;;
+ *) help ; break ;;
+ esac
+ done
+
+ case "$1" in
+ prune ) prune ;;
+ renew ) renew ;;
+ update ) update ;;
+ rebuild ) rebuild ;;
+ optimize ) optimize_menu ;;
+ set ) shift && setvar $@ ;;
+ unset ) shift && unsetvar $@ ;;
+ fix ) shift && run_fix $@ ;;
+ nofix ) shift && export NOFIX=on && run_fix $@ ;;
+ fixdepends ) shift && fix_depends $@ ;;
+ resurrect ) shift && resurrect_modules $@ ;;
+ install ) shift && lin $@ ;;
+ remove ) shift && lrm $@ ;;
+ hold ) shift && hold_modules $@ ;;
+ unhold ) shift && unhold_modules $@ ;;
+ exile ) shift && exile_modules $@ ;;
+ unexile ) shift && unexile_modules $@ ;;
+ *) main ;;
+ esac
+fi
+
diff --git a/prog/lvis b/prog/lvis
new file mode 100755
index 0000000..49a7ddf
--- /dev/null
+++ b/prog/lvis
@@ -0,0 +1,63 @@
+#!/bin/bash
+############################################################
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# lvis is front-end to lin to activate voyeurism in a #
+# separate xterm if possible. #
+############################################################
+process_parameters() {
+ while [ -n "$1" ]; do
+ if echo "" $1 | grep -q "^ -"; then
+ case $1 in
+ --from) export SOURCE_CACHE="$2"; shift 2 ;;
+ --url) export BASE_URL="$2"; shift 2 ;;
+ -n|--nofix) NO_lget="$1"; NO_LVU="$1"; shift 1 ;;
+ --silent) NO_lget="$1"; NO_LVU="$1"; shift 1 ;;
+ --deps) NO_lget="$1"; shift 1 ;;
+ -f|--fix) NO_lget="$1"; shift 1 ;;
+ --help) HELP="$1"; shift 1 ;;
+ -s) NO_lget="$1"; shift 1 ;;
+ *) shift 1 ;;
+ esac
+ else shift
+ fi
+ done
+}
+strip_parameters() {
+ while [ -n "$1" ]; do
+ if echo "" $1 | grep -q "^ -"; then
+ case $1 in
+ --from) shift 2 ;;
+ --url) shift 2 ;;
+ *) shift 1 ;;
+ esac
+ else echo $1; shift
+ fi
+ done
+}
+process_parameters $*
+MODULES=`strip_parameters $*`
+
+if [ -z "$*" ] ||
+ [ -n "$HELP" ]; then
+ lin; exit 1
+fi
+
+if [ -n "$DISPLAY" ]; then
+ if [ -z "$NO_LVU" ]; then
+ xterm -bg black \
+ -fg white \
+ $XTERM_OPTIONS \
+ -T "lvu voyeur 5 $MODULES" \
+ -e /bin/sh -c "lvu voyeur 5 $MODULES" &
+ fi
+
+ if [ -z "$NO_lget" ]; then
+ xterm -bg black \
+ -fg white \
+ $XTERM_OPTIONS \
+ -T "lget $MODULES" \
+ -e /bin/sh -c "lget $MODULES" &
+ fi
+fi
+lin $@
diff --git a/prog/lvu b/prog/lvu
new file mode 100755
index 0000000..4293624
--- /dev/null
+++ b/prog/lvu
@@ -0,0 +1,1562 @@
+#!/bin/bash
+############################################################
+# #
+# lvu - view Lunar module information #
+# #
+############################################################
+# Original gaze written by Brian Peterson #
+# Copyright 2001 by Brian Peterson #
+############################################################
+# gaze is part of the sorcery spell management utility #
+# This version contains none of Brian Peterson's source #
+# Copyright 2001 by Kyle Sallee #
+############################################################
+# #
+# this WAS the gaze script of a source based Linux distro, #
+# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
+# available with GPL license. Since this script was taken #
+# before licensing scheme change, no legal problems I #
+# guess. #
+# #
+# the code is re-written for Lunar. The previous Copyright #
+# notices are kept; just in case some code is left :=) #
+# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
+# #
+############################################################
+# #
+# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
+# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
+# Parts Copyrighted Auke Kok 2003 under GPLv2 #
+# Parts Copyrighted Stefan Wold 2007-2009 under GPLv2 #
+# #
+############################################################
+
+help() {
+cat << EOF
+LVU -- Lunar View utility (for viewing just about everything in Lunar-Linux)
+
+Usage: lvu [general options] [command [command parameters]]
+
+GENERAL OPTIONS:
+
+-d | --debug Enables debug messages
+-h | --help Displays this help text
+-v | --verbose Increases the level of message output
+
+Commands:
+
+Invoke lvu with desired command followed by arguments.
+Please note that anything in brackets [ ] is optional.
+
+Command Arguments Description
+
+what module display a module's description
+short module display a module's short description
+where module display a module's section
+cd module change directory to module and execs a new shell
+alien discover untracked files
+from path/file discover what installed a given file
+leafs display installed modules that have no explicit
+ dependencies on them
+orphans display installed modules that are missing
+ dependencies
+conflicts display conflicting files
+held display held modules
+exiled display exiled modules
+expired display a list of modules which need an update
+info module display terse summary information about module
+
+search "phrase" searches all modules long descriptions for phrase.
+service port|acronym displays modules that provide that service
+
+website module display a module's website
+install module display an install log
+size [module] find and show installed size of a module
+ or ALL (slow)
+installed [module] display installed modules/version of module
+missing display installed but deleted modules from moonbase
+compile module display a compile log
+compiler module display the compiler version used
+links module display a list of modules that this module links to
+sources [module] display source files for a module
+urls [module] display all URLs for a module
+maintainer module display maintainer for a module
+version module display version of module in moonbase
+
+new module attempt to create a new module from scratch
+edit module copy a module to zlocal for editing
+diff module view changes on edited module
+submit module attempt to submit a module to the lunar ML
+unedit module delete zlocal copy of a module
+
+sum [module] display checksums
+md5sum [module] display md5sums
+
+export make snapshot of box's configuration.
+import snapshot restores an exported snapshot.
+
+section [section] display moonbase sections
+moonbase display text listing of the moonbase
+html display html listing of the moonbase
+updatelog display summary log of previous lunar update
+activity [module] display main log file
+
+newer 20030801 display available modules newer than Aug 01, 2003
+older 20030101 display modules installed before Jan 01, 2003
+
+voyeur [delay|module] peak into module compilation
+
+pam display installed modules that are Linux-PAM aware
+
+depends module displays installed modules that explicitly or
+ recursively depend on this module.
+tree module displays a tree of the module's dependencies
+stree module same as 'tree' but highly abbreviated
+eert module same as 'tree' but reverse and installed deps only
+leert module full reverse dependency tree
+
+\$MODULE_SCRIPT module will print the module script for that module
+EOF
+}
+
+
+export_snapshot() {
+ SNAPSHOT=snapshot-$HOSTNAME-$(date -u +%Y%m%d)
+ tar cjfP "/root/$SNAPSHOT.tar.bz2" $CONFIG_CACHE $MODULE_STATUS
+ message "${MESSAGE_COLOR}Snapshot ${DEFAULT_COLOR}${FILE_COLOR}$SNAPSHOT${DEFAULT_COLOR}${MESSAGE_COLOR} created.${DEFAULT_COLOR}"
+}
+
+
+import_snapshot() {
+ SNAPSHOT=$1
+ SOURCE_DIRECTORY=$BUILD_DIRECTORY/snapshot
+
+ if [ -f "$1" ] ; then
+ ( mk_source_dir $SOURCE_DIRECTORY )
+ tar xj -C $SOURCE_DIRECTORY -f $SNAPSHOT 2> /dev/null
+ cd $SOURCE_DIRECTORY
+
+ message "${MESSAGE_COLOR}Restoring lunar configuration${DEFAULT_COLOR}"
+ cp -a etc/lunar /etc
+
+ for LINE in $(cat .$MODULE_STATUS) ; do
+ LIST="$LIST $(echo $LINE | cut -d: -f1)"
+ done
+ verbose_msg "Sorting update queue"
+ QUEUE=$(sort_by_dependency $LIST)
+
+ message "${MESSAGE_COLOR}The following modules will be installed:${DEFAULT_COLOR}"
+ TMP_QUEUE=$(temp_create "install-queue")
+ for MOD in $QUEUE ; do
+ echo $MOD >>$TMP_QUEUE
+ echo $MOD
+ done
+
+ if query "Do you wish to edit the install queue ? " n ; then
+ edit_file $TMP_QUEUE
+ fi
+
+ QUEUE=$(cat $TMP_QUEUE)
+ temp_destroy $TMP_QUEUE
+
+ if [ -n "$QUEUE" ] ; then
+ lin -p $QUEUE
+ fi
+
+ cd /
+ rm_source_dir $SOURCE_DIRECTORY
+
+ else
+ message "${PROBLEM_COLOR}Unable to find snapshot ${DEFAULT_COLOR}${FILE_COLOR}\"$SNAPSHOT\"${DEFAULT_COLOR}"
+ false
+ fi
+}
+
+
+checksum() {
+ for FILE in $(cat $1 | files) ; do
+ sum -s $FILE
+ done
+}
+
+
+md5sum_files() {
+ for FILE in $(cat $1 | files) ; do
+ md5sum $FILE
+ done
+}
+
+
+alien() {
+ message "In a few minutes I will print files found on this disk that were not" 1>&2
+ message "installed by lunar. This is not a security feature! Files could still" 1>&2
+ message "be lurking undetected on this box." 1>&2
+
+ TMP_FOUND=$(temp_create "lvu.found")
+ TMP_KNOWN=$(temp_create "lvu.known")
+
+ message "Discovering ambient files..." 1>&2
+ find $TRACKED | files | grep -v -f "$EXCLUDED" | grep -v -f "$PROTECTED" | sort | uniq > $TMP_FOUND
+ message "Discovering installed files..." 1>&2
+ ( cat $INSTALL_LOGS/* ; ls $INSTALL_CACHE/* ; ls $SOURCE_CACHE/*
+ )| files | sort | uniq > $TMP_KNOWN
+
+ diff -B -a -d $TMP_FOUND $TMP_KNOWN | grep -e "^< " | cut -c 3-
+
+ temp_destroy $TMP_FOUND
+ temp_destroy $TMP_KNOWN
+}
+
+
+lvu_catalog() {
+ echo "Lunar Moonbase for $(date -u)"
+
+ (( COUNT=0 ))
+
+ for SECTION in $(list_sections); do
+ echo
+ echo "-------------------------------------------------"
+ echo "SECTION: $SECTION"
+ echo "-------------------------------------------------"
+ for MODULE in $(list_modules $SECTION); do
+ echo $MODULE
+ (( COUNT++ ))
+ done
+ done
+
+ echo
+ echo "Total modules: $COUNT"
+}
+
+
+lvu_catalog_html() {
+
+ echo "<html><head><title>Lunar Moonbase for $(date -u)</title>"
+ echo "<meta http-equiv=\"Pragma\" content=\"no-cache\"></head>"
+ echo "<body>"
+
+ echo "<table align=\"center\" border=5>"
+
+ echo "<tr><th colspan=5><font color=maroon size=+1>"
+ echo "Lunar Moonbase<br>$(date -u)"
+ echo "</font></th></tr>"
+
+ echo "<tr>"
+ echo "<th>Module</th>"
+ echo "<th>Version</th>"
+ echo "<th>Updated</th>"
+ echo "<th>Website</th>"
+ echo "<th>Maintainer</th>"
+ echo "</tr>"
+
+ (( COUNT=0 ))
+
+ for SECTION in $(list_sections); do
+ (( SECTION_COUNT=0 ))
+ echo "<tr><th colspan=5><font color="maroon">$SECTION</font></th></tr>"
+ for MODULE in $(list_modules $SECTION); do
+ (
+ run_details $MODULE &> /dev/null
+ echo "<tr>"
+ if [ ${#MODULE} -gt 15 ]; then
+ MODULE="<font size=-1>$MODULE</font>"
+ fi
+ echo "<td>$MODULE</td>"
+ echo "<td><font size=-1>$VERSION</font></td>"
+ echo "<td><font size=-1>$UPDATED</font></td>"
+
+ WEBSITE=$WEB_SITE
+ if [ ${#WEB_SITE} -lt 20 ]; then
+ SHRINK="<font size=-1>"
+ UNSHRINK="</font>"
+ elif [ ${#WEB_SITE} -lt 30 ]; then
+ SHRINK="<font size=-2>"
+ UNSHRINK="</font>"
+ else
+ WEBSITE="$(echo $WEB_SITE | cut -c-30)..."
+ SHRINK="<font size=-3>"
+ UNSHRINK="</font>"
+ fi
+
+ if [ "$WEB_SITE" != "unknown" ]; then
+ echo "<td> $SHRINK"
+ echo "<a href=\"$WEB_SITE\" target=\"_blank\">$WEBSITE</a>"
+ echo "$UNSHRINK </td>"
+ else
+ echo "<td></td>"
+ fi
+
+ if [ -z "$MAINTAINER" ]; then
+ MAINTAINER="maintainer at lunar-linux.org"
+ fi
+
+ echo "<td><font size=-1>"
+ echo "<a href=\"mailto:$MAINTAINER\">$MAINTAINER</a>"
+ echo "</font></td>"
+ echo "</tr>"
+ )
+ (( COUNT++ ))
+ (( SECTION_COUNT++ ))
+ done
+ echo "<tr><th colspan=5>Modules in $SECTION section: $SECTION_COUNT</th></tr>"
+ done
+
+ echo "<tr><th colspan=5>Total modules: $COUNT</th></tr>"
+ echo "</table></body></html>"
+}
+
+
+newer() {
+ if [ ! -z "$1" ] ; then
+ if [ -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
+ if [ "$1" -gt "20010101" -a "$1" -lt "20310101" ] ; then
+ for MODULE in $(list_moonbase) ; do
+ run_details $MODULE
+ if [ "$ENTERED" -gt "$1" ] ; then
+ echo $MODULE
+ fi
+ done
+ fi
+ fi
+ fi
+}
+
+
+older() {
+ if [ ! -z "$1" ] ; then
+ if [ -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
+ if [ "$1" -gt "20010101" -a "$1" -lt "20310101" ] ; then
+ for LINE in $(cat $MODULE_STATUS) ; do
+ LIN_DATE=$(echo $LINE | cut -d: -f2)
+ if [ "$LIN_DATE" -gt "$1" ] 2>/dev/null ; then
+ true
+ else
+ echo $LINE | cut -d: -f1
+ fi
+ done
+ fi
+ fi
+ fi
+}
+
+
+show_module_component() {
+ SCRIPT_DIRECTORY=$MOONBASE/$(find_section $2)/$2
+ if [[ -e "$SCRIPT_DIRECTORY/$1.$PLATFORM" ]]; then
+ cat "$SCRIPT_DIRECTORY/$1.$PLATFORM"
+ elif [[ -e "$SCRIPT_DIRECTORY/$1" ]] ; then
+ cat "$SCRIPT_DIRECTORY/$1"
+ fi
+}
+
+
+find_active_lin() {
+ for FILE in $(ls /var/lock/installing.* 2>/dev/null) ; do
+ if [ -d /proc/$(cat $FILE) ] ; then
+ echo $FILE | sed "s:/var/lock/installing.::"
+ return 0
+ fi
+ done
+ false
+}
+
+
+follow_active_lin() {
+ if [ -f /var/lock/installing.$1 -a -d /proc/$(cat /var/lock/installing.$1) ] ; then
+ if [ -f $TMPDIR/lunar.lin.$(cat /var/lock/installing.$1).$1.compile-log.* ] ; then
+ tail -f $TMPDIR/lunar.lin.$(cat /var/lock/installing.$1).$1.compile-log.* --follow=name --pid=$(cat /var/lock/installing.$1) 2>/dev/null
+ fi
+ fi
+}
+
+
+voyeur() {
+ if [ -n "$1" ] && ! find_section $1 > /dev/null ; then
+ (( DEFAULT_DELAY = $1 * 60 ))
+ shift 1
+ fi
+
+ for MODULE in $@ ; do
+ follow_active_lin $MODULE
+ done
+
+ DEFAULT_DELAY=${DEFAULT_DELAY:-60}
+
+ while true ; do
+ if ! ACTIVE_MODULE=$(find_active_lin) ; then
+ message "${MESSAGE_COLOR}Waiting ${DEFAULT_DELAY} seconds for a lin to begin.${DEFAULT_COLOR}"
+ for (( DELAY=DEFAULT_DELAY ; DELAY > 0 ; DELAY-- )); do
+ if ACTIVE_MODULE=$(find_active_lin) ; then
+ break
+ else
+ sleep 1
+ fi
+ done
+ fi
+
+ if [ -z "$ACTIVE_MODULE" ] ; then
+ break
+ else
+ follow_active_lin $ACTIVE_MODULE
+ fi
+ done
+}
+
+
+show_leafs() {
+ for MODULE in $(list_installed) ; do
+ if ! cut -d : -f2- $DEPENDS_STATUS | grep "^$MODULE:" | grep -q ":on:"; then
+ echo $MODULE
+ fi
+ done
+}
+
+
+show_orphans() {
+ for MODULE in $(list_installed) ; do
+ debug_msg "checking \"$MODULE\""
+ for LINE in $(grep "^${MODULE}:" $DEPENDS_STATUS) ; do
+ DEPENDS=$(echo $LINE | cut -d: -f2)
+ OPTIONAL=$(echo $LINE | cut -d: -f4)
+ if ! module_installed $DEPENDS ; then
+ if [ "$OPTIONAL" == "required" ]; then
+ echo "$MODULE: $DEPENDS is missing"
+ fi
+ fi
+ done
+ done
+}
+
+show_conflicts() {
+ declare -A conflicts
+ declare -A conflicts2
+
+ TMP_CONFLICTS=$(temp_create "conflicts")
+ TMP_CONFLICTS2=$(temp_create "conflicts")
+ for MODULE in $(list_installed); do
+ VERSION=$(installed_version $MODULE)
+ cat $INSTALL_LOGS/$MODULE-$VERSION | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
+ grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/\|/lib/modules\|/site-packages/\|/lib/perl5" |
+ while read LINE; do
+ [ ! -d "$LINE" ] && echo "${MODULE} ${LINE}" >> $TMP_CONFLICTS
+ done
+ done
+
+ sort -k 2,2 < $TMP_CONFLICTS | uniq -D -f 1 > $TMP_CONFLICTS2
+ while read MOD FILE; do
+ if [ -z "${conflicts[$FILE]}" ]; then
+ conflicts[$FILE]=$MOD
+ else
+ conflicts[$FILE]+=",$MOD"
+ fi
+ done < $TMP_CONFLICTS2
+
+ for i in ${!conflicts[@]}; do
+ var=${conflicts[$i]}
+ if [ -z "${conflicts2[$var]}" ]; then
+ conflicts2[$var]="$i"
+ else
+ conflicts2[$var]+=" $i"
+ fi
+ done
+
+ for i in ${!conflicts2[@]}; do
+ echo -e "${MESSAGE_COLOR}Conflicting file(s) for modules ${MODULE_COLOR}${i//,/, }${DEFAULT_COLOR}:"
+ for i in ${conflicts2[$i]}; do
+ echo -e " ${FILE_COLOR}$i${DEFAULT_COLOR}"
+ done
+ echo
+ done
+
+ trap "rm -f $TMP_CONFLICTS $TMP_CONFLICTS2 ; exit" INT TERM KILL EXIT
+}
+
+show_depends() {
+ if ! echo "$DONE" | grep -q "$1"; then
+ DONE="$DONE $1"
+
+ grep ":$1:" $DEPENDS_STATUS | while read LINE ; do
+ MODULE=${LINE%%:*}
+ STATUS=$(echo $LINE | cut -d : -f3)
+
+ if [ "$STATUS" == "on" ]
+ then echo $MODULE
+ show_depends $MODULE
+ fi
+
+ done
+ fi
+}
+
+
+# function: show_tree
+# usage: show_tree <module>
+# purpose: show a tree of the module's dependencies (recursive)
+function show_tree() {
+ debug_msg "show_tree ($@)"
+
+ # Make sure the module exists, print a message and return 1 if it doesn't
+ SECTION=$(find_section $1)
+ if [ -z "$SECTION" ] ; then
+ error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${PROBLEM_COLOR} in ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ # create dependency tracking file if needed
+ if [ -z "$TMP_SEEN" ] ; then
+ export TMP_SEEN=$(temp_create "seen")
+ export FLAG=1
+ trap "rm -f $TMP_SEEN ; exit" INT TERM KILL
+ fi
+
+ run_depends() {
+ # local definitions
+ function depends() {
+ debug_msg "depends ($@)"
+ DEP=$(NEVER_ASK=1 unalias $1)
+ echo "+$DEP"
+ }
+
+ optional_depends() {
+ debug_msg "optional_depends ($@)"
+ DEP=$(NEVER_ASK=1 unalias $1)
+ echo "-$DEP"
+ }
+
+ debug_msg "run_depends ($@)"
+ SECTION=$(find_section $1)
+ SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
+ CPU_ARCH=$(uname -m | sed 's/i[456]86/i386/')
+ if has_module_file $1 DEPENDS ; then
+ run_module_file $1 DEPENDS
+ fi
+ }
+
+ if [ -z "$1" ] ; then
+ help
+ exit 1
+ fi
+
+ # gather dependencies, sorted by 1) required, 2) optional, and
+ # alphabetically too
+ unset ALL
+ DEPS=$(run_depends $1 | sort | uniq)
+ for DEP in $DEPS ; do
+ if [ ${DEP:0:1} == "+" ] ; then
+ ALL="$DEP $ALL"
+ else
+ ALL="$ALL $DEP"
+ fi
+ done
+ DEPS=$ALL
+
+ # show hit list:
+ if [ "$CUR" == "-" ] ; then
+ if module_installed $1 ; then
+ RES="${MODULE_COLOR}[$1]${DEFAULT_COLOR}: "
+ else
+ if [ -n "$SHORTTREE" ] ; then
+ return
+ fi
+ RES="${LRM_COLOR}[$1]${DEFAULT_COLOR}: "
+ fi
+ else
+ RES="${MODULE_COLOR}$1${DEFAULT_COLOR}: "
+ fi
+
+ if [ -n "$DEPS" -o -z "$SHORTTREE" ] ; then
+ # show all deps on the same line:
+ for DEP in $DEPS ; do
+ MOD=${DEP:1}
+ case "${DEP:0:1}" in
+ # required
+ +)
+ if module_installed $MOD ; then
+ COL="${FILE_COLOR}"
+ else
+ COL="${PROBLEM_COLOR}"
+ fi
+ RES="$RES${COL}$MOD${DEFAULT_COLOR} "
+ ;;
+ # optional
+ -)
+ if module_installed $MOD ; then
+ COL="${FILE_COLOR}"
+ else
+ COL="${LRM_COLOR}"
+ fi
+ RES="$RES${COL}[$MOD]${DEFAULT_COLOR} "
+ ;;
+ esac
+ done
+ RES="${INDENT}|--->${RES}"
+ echo -e "${RES:5}"
+ fi
+
+ # I (sofar) suck:
+ for DEP in $DEPS ; do
+ LASTDEP=${DEP:1}
+ done
+
+ INDENT="$INDENT| "
+ # and recurse:
+ for DEP in $DEPS ; do
+ grep -q "^$DEP$" $TMP_SEEN
+ TEST=$?
+ if [ "$TEST" == "1" -o -z "$SHORTTREE" ] ; then
+ echo "$DEP" >> $TMP_SEEN
+ CUR=${DEP:0:1}
+ # note the FLAG= thingy here
+ FLAG= show_tree ${DEP:1} 2> /dev/null
+ fi
+ done
+ # don't try this at home:
+ INDENT=${INDENT:0:((${#INDENT}-5))}
+
+ if [ -n "$FLAG" ] ; then
+ temp_destroy $TMP_SEEN
+ unset TMP_SEEN
+ fi
+}
+
+
+show_eert() {
+ debug_msg "show_eert ($@)"
+
+ # Make sure the module exists, print a message and return 1 if it doesn't
+ SECTION=$(find_section $1)
+ if [ -z "$SECTION" ] ; then
+ error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${PROBLEM_COLOR} in ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
+ return 1
+ fi
+
+ if [ -n "$SHORTTREE" ] ; then
+ DEPENDS=$DEPENDS_STATUS
+ else
+ DEPENDS=$DEPENDS_CACHE
+ fi
+
+ show_rtree() {
+ # we need to do an reverse tree for $1
+ RDEPS=$(grep ":$1:" $DEPENDS | cut -d: -f1 | sort | uniq)
+
+ if module_installed $1 ; then
+ STR="${INDENT}^----${MODULE_COLOR}$1${DEFAULT_COLOR}: "
+ else
+ STR="${INDENT}^----${PROBLEM_COLOR}$1${DEFAULT_COLOR}: "
+ fi
+
+ for DEP in $RDEPS ; do
+ REL=$(grep "^$DEP:$1:" $DEPENDS)
+ CUR=$(echo $REL | cut -d: -f1)
+ if echo $REL | grep -q :required: ; then
+ if module_installed $DEP ; then
+ STR="$STR${FILE_COLOR}$DEP ${DEFAULT_COLOR}"
+ else
+ STR="$STR${PROBLEM_COLOR}$DEP ${DEFAULT_COLOR}"
+ fi
+ else
+ if module_installed $DEP ; then
+ STR="$STR${FILE_COLOR}[$DEP] ${DEFAULT_COLOR}"
+ else
+ STR="$STR${LRM_COLOR}[$DEP] ${DEFAULT_COLOR}"
+ fi
+ fi
+ done
+
+ echo -e "${STR:5}"
+
+ INDENT="$INDENT| "
+ for RDEP in $RDEPS ; do
+ FLAG= show_rtree $RDEP
+ done
+ INDENT="${INDENT:0:((${#INDENT}-5))}"
+ }
+
+ show_rtree $1
+
+ if [ -n "$FLAG" ] ; then
+ temp_destroy $TMP_DEPLIST
+ fi
+}
+
+
+show_urls() { (
+ # function overrides:
+ plugin_call() { return 0 ; }
+ download_url() {
+ URL=$1
+ if [ "${URL#${URL%?}}" != "/" ]; then
+ URL="${URL}/"
+ fi
+ echo $URL$2
+ return 1
+ }
+ connect() { return 0 ; }
+
+ LRESORT_URL=
+ FRESORT_URL=
+ EXHAUSTIVE=on
+ SILENT=on
+ VERBOSE=off
+ CLEAR_CACHE=off
+
+ if [ -z "$1" ] ; then
+ MODULES=$(list_moonbase|sort)
+ else
+ MODULES=$1
+ fi
+
+ for MODULE in $MODULES ; do
+ download_module $MODULE | uniq
+ done
+) }
+
+
+show_info() {
+ if run_details $1 ; then
+ echo "General Module Info"
+ echo " Name: $MODULE"
+ echo " Description: $SHORT"
+ echo " Website: $WEB_SITE"
+ echo " Lunar Version: $VERSION"
+ echo " Last Updated: $UPDATED"
+ echo " Section: $SECTION"
+ echo -n " Restrictions: "
+ if module_held $1 ; then
+ echo -n "held "
+ fi
+ if module_exiled $1 ; then
+ echo -n "exiled "
+ fi
+ if grep -qw $1 $SUSTAINED ; then
+ echo -n "sustained "
+ fi
+ if grep -qw $1 $SOLO ; then
+ echo -n "solo "
+ fi
+ echo
+ if [ -e $MOONBASE/$SECTION/$MODULE/services ] ; then
+ LINES="`wc -l $MOONBASE/$SECTION/$MODULE/services | cut -d' ' -f1`"
+ echo -n " Provides Service"
+ if [ 1 -lt $LINES ]; then
+ echo "s:"
+ echo "`cat $MOONBASE/$SECTION/$MODULE/services | sed "s:\t: :g" | sed 's:^: :g'`"
+ else
+ echo -n ": "
+ echo "`cat $MOONBASE/$SECTION/$MODULE/services`"
+ fi
+ fi
+
+ echo ""
+ echo "Installation Info"
+ if module_installed $1 ; then
+ IVERSION=$(installed_version $1)
+ echo -n " Installed Version: $IVERSION"
+ if module_is_expired $1 ; then
+ echo " (updated module available: $VERSION!)"
+ else
+ echo ""
+ fi
+ echo -n " Last compile time: "
+ if module_installed "TimeDate" ; then
+ CTIME=$(main compile $1 | grep 'Mark Compile ' | cut -d \" -f6 | perl -e 'use Date::Parse; my $start = <> ; my $stop = <> ; print str2time($stop) - str2time($start) . "\n";')
+ echo "$((CTIME / 60))m$((CTIME % 60))s"
+ else
+ echo "(unable to calculate without \"TimeDate\" installed)"
+ fi
+ echo -n " Approx. Size: "
+ main size $1
+ echo -n " Files Installed: "
+ main install $1 | wc -l
+ else
+ echo " Module not installed."
+ fi
+
+ echo ""
+ ACTIVITY=$(view_file $ACTIVITY_LOG | awk "(\$3 == \"$1\")")
+
+ if [ `echo "$ACTIVITY" | wc -l` -gt 10 ]; then
+ ACTIVITY="`echo "$ACTIVITY" | tail -n10`"
+ echo "Module Activity History (last 10)"
+ else
+ echo "Module Activity History"
+ fi
+ if [ -n "$ACTIVITY" ]; then
+ echo "$ACTIVITY" | sed 's:^: :g'
+ else
+ echo " No past activity recorded for this module."
+ fi
+ fi
+}
+
+
+diff_module() {
+ if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
+ message "can't diff modules without ZLOCAL_OVERRIDES=on"
+ exit 1
+ fi
+ if [ -z "$1" ]; then
+ message "diff requires a single module name"
+ exit 1
+ fi
+ if ! run_details $1 ; then
+ message "diff requires an existing zlocal module"
+ exit 1
+ fi
+ if ! echo $SECTION | grep -q zlocal ; then
+ message "$1 is not a zlocal module, cannot diff"
+ exit 1
+ fi
+ NZSECTION=$(ZLOCAL_OVERRIDES=off find_section $1)
+ if [ "$SECTION" == "$NZSECTION" ] ; then
+ # new module
+ SECTION=zbeta
+ echo diff /dev/null b/zbeta/$MODULE
+ diff -Nur /var/empty $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
+ grep -v ^diff | sed "s:/var/empty/:a/zbeta/$MODULE/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/zbeta/:g"
+ else
+ # modified module
+ echo diff a/$NZSECTION/$MODULE b/$NZSECTION/$MODULE
+ diff -Nur $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
+ grep -v ^diff | sed "s:$MOONBASE/$NZSECTION/:a/$NZSECTION/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/$NZSECTION/:g"
+ fi
+}
+
+submit_module() {
+ # this code tries to send the module back to the mailinglist
+ # as good as it gets
+ if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
+ message "You can't submit non-zlocal modules. Turn on ZLOCAL_OVERRIDES"
+ message "and do \`lvu edit \$MODULE; lin moonbase\`"
+ message "so that module changes can be tracked properly!"
+ exit 1
+ fi
+ if [ -z "$1" ]; then
+ message "submit requires a single module name."
+ exit 1
+ fi
+ if [ ! -x /usr/bin/curl ]; then
+ message "submit requires curl, please \`lin curl\`"
+ exit 1
+ fi
+ if [ -z "$ADMIN" -o "$ADMIN" == "$USER" -o "$ADMIN" == "root" ]; then
+ message "Please set ADMIN to your e-mail address: lunar set ADMIN \"me at my.mail.domain\""
+ exit 1
+ fi
+ if [ -z "$REALNAME" ]; then
+ REALNAME="getent passwd $USER | cut -d: -f5 | cut -d, -f1"
+ if [ -z "$G_REALNAME" ]; then
+ message "Please set REALNAME to your real name: lunar set REALNAME \"John Notdoe\""
+ exit 1
+ fi
+ fi
+ if ! run_details "$1" ; then
+ message "submit requires an existing module"
+ exit 1
+ else
+ if echo $SECTION | grep -q '^zlocal' ; then
+ ZLOCAL_OVERRIDES=off SECTION=$(find_section $1)
+ if echo $SECTION | grep -q '^zlocal' ; then
+ unset SECTION
+ fi
+ else
+ message "Please don't edit modules outside of the 'zlocal' section!"
+ message "do this first: \`lvu edit \$MODULE ; lin moonbase\`"
+ message "so that module changes can be tracked properly!"
+ exit 1
+ fi
+
+ # sanity checks
+ lvu diff $1 | diffstat -p0 -l | grep -e '.patch$' -e '.diff$' && (
+ echo ""
+ echo "Sanity check failed: patch files are not allowed inside moonbase"
+ echo "Please submit your patch files to the lunar-dev mailinglist and"
+ echo "Wait for one of the developers to upload them to \$PATCH_URL."
+ echo "Once that is done you can resubmit using that URL for the patch(es)"
+ exit 1
+ )
+
+
+ TMP_MSG=$(temp_create "submission")
+ TMP_MSG2=$(temp_create "submission")
+ (
+ echo "$1: "
+ echo ""
+ echo ""
+ echo "# type a changelog message here. The first line should start with"
+ echo "# the module name and summarize your change. All lines starting with '#'"
+ echo "# will be removed automatically. Example: 'foo: version update'."
+ echo "# "
+ echo "# PLEASE FORMAT THE FIRST LINE ACCORDING TO ABOVE NOTES!!! THANK YOU!!!"
+ ) > $TMP_MSG
+ edit_file $TMP_MSG
+ sed -i '/^#/d' $TMP_MSG
+ (
+ head -n 1 $TMP_MSG | sed 's/^/Subject: /g'
+ echo ''
+ echo "From: $REALNAME <$ADMIN>"
+ tail +2 $TMP_MSG
+ echo '---'
+ echo 'module:' $1
+ echo "id: $UNIQID"
+ echo "lvu submit: $1"
+ echo "lvu: $(cat /bin/lvu | md5sum)"
+ echo "uname -r: $(uname -r)"
+ echo "kernel headers: $(installed_version kernel-headers-2.6)"
+ echo "gcc: $(installed_version gcc)"
+ echo "glibc: $(installed_version glibc)"
+ echo ''
+ echo '---'
+ lvu diff $1 | diffstat -p1
+ echo ''
+ echo '---'
+ lvu diff $1
+ ) >> $TMP_MSG2
+ cat $TMP_MSG2
+ if query "Submit this module now?" y; then
+ curl -F file=@$TMP_MSG2 -F module=$1 -F id=$UNIQID "http://www.lunar-linux.org/submit.php"
+ temp_destroy $TMP_MSG2
+ temp_destroy $TMP_MSG
+ else
+ message "Submission aborted. your submission was saved as $TMP_MSG2"
+ fi
+ fi
+}
+
+
+edit_module()
+{
+ if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
+ message "Cannot edit modules when ZLOCAL_OVERRIDES == off"
+ message "Do this: \`lunar set ZLOCAL_OVERRIDES on\`"
+ else
+ if SECTION=$(find_section $1) ; then
+ if echo $SECTION | grep -q ^zlocal; then
+ message "Module \"$1\" is already in section \"zlocal\""
+ message "unedit it first or edit the working copy"
+ else
+ cp -a $MOONBASE/$SECTION/$1 $MOONBASE/zlocal/
+ # clean out SCM directories
+ find $MOONBASE/zlocal/$1 -type d -name CVS -o -name .svn | xargs rm -rf
+ message "Copied \"$1\" from \"$SECTION\""
+ message "Edit your module in \"$MOONBASE/zlocal/$1\""
+ fi
+ else
+ message "Can't find module \"$1\""
+ fi
+ fi
+}
+
+
+unedit_module()
+{
+ if SECTION=$(find_section $1) ; then
+ if echo $SECTION | grep -q ^zlocal; then
+ rm -rf $MOONBASE/$SECTION/$1
+ message "Removed \"$1\" from \"$SECTION\""
+ else
+ message "Module \"$1\" is not in section \"zlocal\""
+ fi
+ else
+ message "Can't find module \"$1\""
+ fi
+}
+
+
+new_module()
+{
+ if [ -z "$1" ]; then
+ echo "You have to give it a name - use \`lvu new $name\`"
+ exit 1
+ elif run_details $1 > /dev/null 2>&1 ; then
+ echo "Module \"$1\" already exists, use \`lvu edit $1\` instead"
+ exit 1
+ fi
+
+ MODULE=$1
+
+ message "Paste the principal download URL for your application:"
+ read URL
+ echo
+
+ message "Write a 1-line summary of the module. do NOT write something"
+ message "like \"foo is a...\". Write something that describes it best:"
+ read SHORT
+ echo
+
+ message "Paste the main website URL:"
+ read WEB_SITE
+ echo
+
+ LONG=$(temp_create "lvu.new.$1")
+ message "Paste 1 or 2 paragraphs of text that give a good description for $1:"
+ message "Press CONTROL-D on an empty line when finished"
+ cat - > $LONG
+
+ ENTERED=$(date +%Y%m%d)
+ UPDATED=$(date +%Y%m%d)
+
+ SOURCE_URL="$(dirname $URL)/" # get url
+ SOURCE=$(basename $URL) # get base
+
+ if [ ! -f $SOURCE_CACHE/$SOURCE ] ; then
+ if ! download_url $SOURCE_URL $SOURCE $SOURCE_CACHE ; then
+ echo "Unable to download $URL"
+ exit 1
+ fi
+ fi
+
+ SHA1=$(sha1sum $SOURCE_CACHE/$SOURCE | cut -c1-40)
+
+ VERSION=$(echo $SOURCE | sed "s/$MODULE//")
+ VERSION=$(echo $VERSION | sed 's/^[-]//;s/^_//')
+ VERSION=${VERSION/^_}
+ VERSION=${VERSION/.tar}
+ VERSION=${VERSION/.tgz}
+ VERSION=${VERSION/.bz2}
+ VERSION=${VERSION/.gz}
+
+ SOURCE=$(echo $SOURCE | sed "s/$MODULE/\${MODULE}/")
+ SOURCE=$(echo $SOURCE | sed "s/$VERSION/\${VERSION}/")
+
+ if ! mkdir $MOONBASE/zlocal/$1 ; then
+ message "Unable to create module folder in zlocal section"
+ exit 1
+ fi
+ (
+ cat <<EOFDETA
+ MODULE=$MODULE
+ VERSION=$VERSION
+ SOURCE=$SOURCE
+ SOURCE_URL=$SOURCE_URL
+EOFDETA
+ if [ "$(tar tf $SOURCE_CACHE/$(basename $URL) | head -n 1)" != "$MODULE-$VERSION/" ]; then
+ echo "SOURCE_DIRECTORY=\$BUILD_DIRECTORY/\$MODULE-\$VERSION"
+ fi
+ cat <<EOFDETB
+ SOURCE_VFY=sha1:$SHA1
+ WEB_SITE="$WEB_SITE"
+ ENTERED=$ENTERED
+ UPDATED=$UPDATED
+ SHORT="$SHORT"
+cat <<EOF
+EOFDETB
+ cat $LONG | fmt -72
+ echo "EOF"
+ ) > $MOONBASE/zlocal/$1/DETAILS
+
+ message "Module \"$1\" created best-effort. You might have to \`lvu edit $1\" to make it work"
+ message "Don't forget to create a DEPENDS file! (hint: use \`lvu links $1\`)"
+ message "Don't forget to \`lvu submit $1\` if you think this module is useful to others!"
+}
+
+main() {
+ case $1 in
+ html)
+ lvu_catalog_html
+ ;;
+
+ export)
+ export_snapshot
+ ;;
+
+ import)
+ import_snapshot $2
+ ;;
+
+ section)
+ if [ -n "$2" ] ; then
+ list_modules $2
+ elif [ -z "$2" ] ; then
+ list_sections
+ fi
+ ;;
+
+ alien)
+ alien
+ ;;
+
+ from)
+ for MODULE in $(list_installed); do
+ VERSION=$(installed_version $MODULE)
+ if grep -q "$2" $INSTALL_LOGS/$MODULE-$VERSION ; then
+ for FILE in $(grep "$2" $INSTALL_LOGS/$MODULE-$VERSION | cut -d: -f2) ; do
+ echo "$MODULE:$FILE"
+ done
+ fi
+ done
+ ;;
+
+ newer)
+ newer $2
+ ;;
+
+ older)
+ older $2
+ ;;
+
+ moonbase)
+ lvu_catalog | view_file
+ ;;
+
+ leafs)
+ show_leafs | sort | uniq
+ ;;
+
+ orphans)
+ show_orphans
+ ;;
+
+ conflicts)
+ show_conflicts
+ ;;
+
+ updatelog)
+ if [ -e /var/log/lunar/update ]; then
+ view_file /var/log/lunar/update
+ else
+ echo "No update log available."
+ fi
+ ;;
+
+ activity)
+ if [ -e $ACTIVITY_LOG ]; then
+ if [ -z "$2" ]; then
+ view_file $ACTIVITY_LOG
+ else
+ view_file $ACTIVITY_LOG | awk "(\$3 == \"$2\")"
+ fi
+ else
+ echo "No update log available."
+ fi
+ ;;
+
+ installed)
+ if [ -z "$2" ] ; then
+ grep -E ':(installed|held):' $MODULE_STATUS | view_file
+ elif [ -n "$(installed_version $2)" ] ; then
+ echo "$(installed_version $2)"
+ else
+ message "$2 is not installed"
+ false
+ fi
+ ;;
+
+ held)
+ grep ":held:" $MODULE_STATUS | cut -d: -f1
+ ;;
+
+ exiled)
+ grep ":exiled:" $MODULE_STATUS | cut -d: -f1
+ ;;
+
+ expired)
+ for MODULE in $(list_expired_modules); do
+ L=$(installed_version $MODULE)
+ R=$(run_details $MODULE > /dev/null ; echo $VERSION)
+
+ CL=( `echo $L | sed 's/[.]/ /g'` )
+ CR=( `echo $R | sed 's/[.]/ /g'` )
+
+ S="(equal)"
+
+ for N in $(seq 0 $(( ${#CL[@]} - 1 ))); do
+
+ TL="${CL[$N]}"
+ TR="${CR[$N]}"
+
+ if [ "$TL" == "$TR" ]; then
+ continue
+ fi
+
+ if [ -z "$(echo $TL$TR | sed 's/[0-9]//g')" ] ; then
+ # numerical
+ if [ "$TL" -eq "$TR" ] ; then
+ continue
+ elif [ "$TL" -lt "$TR" ] ; then
+ # normal upgrade
+ S=""
+ break
+ else
+ S="(downgrade)"
+ break
+ fi
+ else
+ # string order
+ if [[ "$TL" < "$TR" ]] ; then
+ # normal upgrade
+ S=""
+ break
+ else
+ S="(downgrade)"
+ break
+ fi
+ fi
+ done
+
+ echo "$MODULE ($L -> $R) $S"
+ done
+ ;;
+ failed)
+ while read DATE COMMAND MODULE VERSION STATE JUNK ; do
+ if [ "$STATE" == "failed" ] && [ "$COMMAND" == "lin" ] ; then
+ # add to list of failed modules
+ if ! echo "$FAILED" | grep -qw $MODULE ; then
+ FAILED="$FAILED $MODULE "
+ fi
+ fi
+ # no need to remove if $MODULE is not in the list - speeds things up
+ if ! echo "$FAILED" | grep -qw "$MODULE" ; then
+ continue
+ fi
+ if ([ "$STATE" == "success" ] && [ "$COMMAND" == "lin" ]) ||
+ ([ "$STATE" == "success" ] && [ "$COMMAND" == "lrm" ]) ; then
+ # remove from failed modules
+ FAILED=`echo "$FAILED" | sed "s/ $MODULE //g"`
+ fi
+ done < $ACTIVITY_LOG
+ for MODULE in $FAILED ; do
+ echo $MODULE
+ done
+ ;;
+
+ sum)
+ if [ -n "$2" ] ; then
+ if ! checksum "$INSTALL_LOGS/$2-$(installed_version $2)" ; then
+ checksum "$INSTALL_LOGS/*"
+ fi
+ fi
+ ;;
+
+ md5sum)
+ if [ -n "$2" ] ; then
+ if ! md5sum_files "$INSTALL_LOGS/$2-$(installed_version $2)" ; then
+ md5sum_files "$INSTALL_LOGS/*"
+ fi
+ fi
+ ;;
+
+ voyeur)
+ shift 1
+ voyeur $@
+ ;;
+
+ pam)
+ find_pam_aware
+ ;;
+
+ sources)
+ sources $2
+ ;;
+
+ urls)
+ show_urls $2
+ ;;
+
+ maintainer)
+ if run_details $2 ; then
+ if [ -n "$MAINTAINER" ] ; then
+ echo $MAINTAINER
+ else
+ echo maintainer at lunar-linux.org
+ fi
+ fi
+ ;;
+
+ DETAILS)
+ show_module_component $1 $2
+ ;;
+
+ DEPENDS)
+ show_module_component $1 $2
+ ;;
+
+ CONFIGURE)
+ show_module_component $1 $2
+ ;;
+
+ CONFLICTS)
+ show_module_component $1 $2
+ ;;
+
+ INSTALL)
+ show_module_component $1 $22
+ ;;
+
+ PRE_BUILD)
+ show_module_component $1 $2
+ ;;
+
+ BUILD)
+ show_module_component $1 $2
+ ;;
+
+ POST_BUILD)
+ show_module_component $1 $2
+ ;;
+
+ POST_INSTALL)
+ show_module_component $1 $2
+ ;;
+
+ PRE_REMOVE)
+ show_module_component $1 $2
+ ;;
+
+ POST_REMOVE)
+ show_module_component $1 $2
+ ;;
+
+ search)
+ grep -irle $2 "$MOONBASE" | grep DETAILS | sed "s;${MOONBASE}/\(.*\)/DETAILS;\1;"
+ ;;
+
+ service)
+ cat $MODULE_INDEX | while read ENTRY ; do
+ MOD=$(echo $ENTRY | cut -d: -f1)
+ SEC=$(echo $ENTRY | cut -d: -f2)
+ if [ -f $MOONBASE/$SEC/$MOD/services ] ; then
+ echo $MOONBASE/$SEC/$MOD/services
+ fi
+ done | xargs egrep -l -i "$2" | sed "s;${MOONBASE}/\(.*\)/services;\1;"
+ ;;
+
+ depends)
+ show_depends "$2" | sort | uniq
+ ;;
+
+ website)
+ if [ -z "$2" ] ; then
+ return 1
+ else
+ if run_details $2 ; then
+ if [ -n "$WEB_SITE" ] ; then
+ echo $WEB_SITE
+ else
+ echo "http://lunar-linux.org"
+ fi
+ fi
+ fi
+ ;;
+
+ version)
+ if [ -n "$2" ] ; then
+ if run_details $2 ; then
+ echo $VERSION
+ fi
+ fi
+ ;;
+
+ versions)
+ if [ -n "$2" ] ; then
+ if run_details $2 ; then
+ echo "main-version $VERSION"
+ fi
+ if [ $(echo $MOONBASE/*/$2/*/DETAILS | wc -w) -lt 2 ] ; then
+ message "${MESSAGE_COLOR} This module has no alt-versions${DEFAULT_COLOR}"
+ exit 1
+ fi
+ for i in $MOONBASE/*/$2/*/DETAILS ; do
+ x=`echo $i | sed 's:/DETAILS::'`
+ run_details $2/`basename $x`
+ echo "alt-version $VERSION"
+ done
+ fi
+ ;;
+
+ size)
+ if [ -z "$2" ] ; then
+ MODULES=$(list_installed)
+ for MODULE in $MODULES ; do
+ echo $MODULE $(find_module_size $MODULE)
+ done
+ else
+ if module_installed $2 ; then
+ find_module_size $2
+ else
+ message "${PROBLEM_COLOR}$2 is not installed${DEFAULT_COLOR}"
+ fi
+ fi
+ ;;
+
+ tree)
+ show_tree "$2"
+ ;;
+
+ stree)
+ SHORTTREE=1
+ show_tree "$2"
+ ;;
+
+ eert)
+ SHORTTREE=1
+ show_eert "$2"
+ ;;
+
+ leert)
+ show_eert "$2"
+ ;;
+
+ compile)
+ if [ ! -z "$2" ]; then
+ if run_details $2 ; then
+ if [ -f $COMPILE_LOGS/$2-$(module_version $2).bz2 ] ; then
+ view_file $COMPILE_LOGS/$2-$(module_version $2).bz2
+ else
+ VERSION=$(installed_version $2)
+ view_file $COMPILE_LOGS/$2-$(installed_version $2).bz2 \
+ "Compile log for $2 does not exist"
+ fi
+ fi
+ fi
+ ;;
+
+ install)
+ if run_details $2 ; then
+ view_file $INSTALL_LOGS/$2-$(installed_version $2) \
+ "Install log for $2 does not exist"
+ fi
+ ;;
+
+ compiler)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ if [ ! -e $INSTALL_LOGS/$2-$(installed_version $2) ] ; then
+ echo "Install log for $2 does not exist"
+ return 1
+ else
+ cat $INSTALL_LOGS/$2-$(installed_version $2) | while read LINE ; do
+ if file $LINE | grep -q "ELF " ; then
+ echo -n "$LINE "
+ strings -a $LINE | grep GCC: | sort -r | head -n 1
+ fi
+ done
+ fi
+ fi
+ fi
+ ;;
+
+ links)
+ [[ -z "$2" ]] && return 1
+
+ REGEX=""
+ for LINK in `lvu install $2 | xargs file | awk -F: '/ELF/ { print $1 }' | xargs ldd | egrep -v ':$' | cut -d' ' -f3 | sort | uniq`
+ do
+ if [[ -z $REGEX ]]
+ then
+ REGEX="($LINK)"
+ else
+ REGEX="${REGEX}|($LINK)"
+ fi
+ done
+
+ pushd $INSTALL_LOGS >/dev/null
+ egrep -l "$REGEX" *
+ popd >/dev/null
+ ;;
+
+ what)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ run_module_file $2 DETAILS
+ fi
+ fi
+ ;;
+
+ short)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ echo "$SHORT"
+ fi
+ fi
+ ;;
+
+ where)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ echo $(find_section $2)
+ fi
+ fi
+ ;;
+
+ missing)
+ for MODULE in $(list_installed) ; do
+ if ! find_section $MODULE > /dev/null ; then
+ echo "$MODULE"
+ fi
+ done
+ ;;
+
+ cd)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ cd $MOONBASE/$(find_section $2)/$2
+ $SHELL
+ fi
+ fi
+ ;;
+
+ info)
+ if [ ! -z "$2" ] ; then
+ if run_details $2 ; then
+ show_info $2
+ fi
+ fi
+ ;;
+
+ diff)
+ diff_module $2
+ ;;
+
+ submit)
+ submit_module $2
+ ;;
+
+ edit)
+ edit_module $2
+ ;;
+
+ unedit)
+ unedit_module $2
+ ;;
+ new)
+ new_module $2
+ ;;
+
+ *)
+ help
+ ;;
+
+ esac
+
+}
+
+
+
+. /etc/lunar/config
+
+GETOPT_ARGS=$(getopt -q -n lvu -o "dhv" -l "debug,help,verbose" -- "$@")
+
+if [ -z "$?" ] ; then
+ help | view_file
+ exit
+else
+ eval set -- $GETOPT_ARGS
+ export IFS="$STANDARD_IFS"
+
+ set_priority
+
+ while true ; do
+ case "$1" in
+ -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
+ -h|--help ) help ; exit ;;
+ -v|--verbose ) export VERBOSE="on" ; shift ;;
+ --) shift ; break ;;
+ *) help ; break ;;
+ esac
+ done
+
+ main $@
+fi
+
diff --git a/sbin/lget b/sbin/lget
deleted file mode 100755
index 0098501..0000000
--- a/sbin/lget
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# lget - get sources from the net #
-# #
-############################################################
-# leach is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS the leach script of a source based Linux distro,#
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-
-help() {
-
- cat << EOF
-
-Lget downloads single or multiple module source files.
-
-Example : lget nano hdparm sudo
-Usage : lget [parameters] [modules]
-
-Optional Parameters:
-
- -a | --all Download all sources available in moonbase
- -d | --debug Enables debug messages
- -f | --from directory Specify an alternate for $SOURCE_CACHE
- -h | --help Displays this help text
- -u | --url URL Specify an alternate download URL
- -v | --verbose Increases the level of message output
- -w | --want version Try to download a different version that is
- not in moonbase
-EOF
-
- exit 1
-
-}
-
-
-main() {
- cd $TMPDIR
-
- MODULES="$@"
- if [ -z "$MODULES" ] ; then
- verbose_msg "downloading entire moonbase"
- MODULES=$(list_moonbase | sort)
- fi
-
- if echo $MODULES | grep -qw moonbase ; then
- # just update moonbase, no other modules
- get_moonbase
- # remove moonbase from MODULES and continue
- MODULES=$(echo $MODULES | sed 's/moonbase//g')
- fi
-
- for MODULE in $MODULES; do
- if ! lget_locked $MODULE ; then
- lget_lock $MODULE
- verbose_msg "downloading module \"$MODULE\""
- download_module $MODULE
- lget_unlock $MODULE
- else
- false
- fi
- done
-
-}
-
-
-. /etc/lunar/config
-
-GETOPT_ARGS=$(getopt -q -n lget -o "adf:hu:vw:" -l "all,debug,from:,help,url:,verbose,want:" -- "$@")
-
-if [ -z "$?" ] ; then
- help | view_file
- exit
-else
- eval set -- $GETOPT_ARGS
-
- root_check
- enviro_check
- set_priority
- while true ; do
- case "$1" in
- -a|--all ) export LGET_ALL=yes ; shift ;;
- -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
- -f|--from ) export SOURCE_CACHE=$2 ; shift 2 ;;
- -h|--help ) help ; exit 1 ;;
- -u|--url ) export BASE_URL="$2" ; shift 2 ;;
- -v|--verbose ) export VERBOSE="on" ; shift ;;
- -w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
- --) shift ; break ;;
- *) help ; exit ;;
- esac
- done
-
- if [ -n "$LGET_ALL" -o -n "$1" ] ; then
- main $@
- else
- help
- exit 1
- fi
-fi
diff --git a/sbin/lin b/sbin/lin
deleted file mode 100755
index 5fcba80..0000000
--- a/sbin/lin
+++ /dev/null
@@ -1,257 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# lin - install Lunar modules #
-# #
-############################################################
-# cast is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS the cast script of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# This enables alias expansion within lin and its children
-# although this doesn't expand aliases within functions
-# That is a limitation of bash and aliases
-shopt -s expand_aliases
-
-help() {
- cat << EOF
-Lin installs single or multiple modules
-
-Example: lin nano hdparm sudo
-Usage: lin [parameters] [module]
-
-Optional Parameters:
-
--c | --compile Ignore $INSTALL_CACHE and compiles
--d | --debug Enables debug messages
- --deps Configure modules and determine dependencies,
--f | --from directory Specify an alternate for $SOURCE_CACHE
--h | --help Displays this help text
- --opts '--enable-xxx' Add custom configure options to the module
--p | --probe Only lin if not already installed
--r | --reconfigure Select new dependencies for modules
--R | --resurrect Force to be unpacked from /var/cache/lunar
--s | --silent Decreases the level of message output
--v | --verbose Increases the level of message output
--w | --want version Try to install a different version that is
- not in moonbase
-EOF
- exit 1
-}
-
-
-main() {
- debug_msg "main ($@)"
- MODULES="$@"
-
- if echo $MODULES | grep -qw moonbase ; then
- # just update moonbase, no other modules
- if ! lget moonbase ; then
- exit 1
- fi
- # remove moonbase from MODULES and continue
- MODULES=$(echo $MODULES | sed 's/moonbase//g')
- if [ -z "$MODULES" ] ; then
- return
- fi
- fi
-
- if [ -z "$MODULES" ] ; then
- message "${MESSAGE_COLOR}Nothing to do!${DEFAULT_COLOR}"
- return
- fi
-
- # different approaches for multiple modules (start up downloads first)
- # and single modules (plain install)
- if [ -z "$SINGLE_MODULE" ] ; then
-
- if [ -z "$TEMP_DOWNLOAD_PIDS" ] ; then
- export TEMP_DOWNLOAD_PIDS=$(temp_create "download-pids")
- export TEMP_PREPAREDDEPS=$(temp_create "prepared-depends")
- fi
- export TEMP_CONFIGOPTS=$(temp_create "configopts")
-
- # pass 1 : run full dependency checking
- # This pass does configuration and dependency identification.
- if ! DEPS_ONLY=--deps build_depends $MODULES ; then
- temp_destroy $TEMP_DOWNLOAD_PIDS
- temp_destroy $TEMP_PREPAREDDEPS
- temp_destroy $TEMP_CONFIGOPTS
- verbose_msg "Unexpected errors, bailing out!"
- exit 1
- fi
-
- # pass 2 : hit the download manager button and grab a beer
- # this runs as a background process, so we are off to step #3 right away
- if [ -z "$DEPS_ONLY" ] ; then
- verbose_msg "Spawning download manager"
-
- # this code hurts more than it helps - it can stall forever (minutes)
- # even when just linning 2-3 modules
- # for M in $MODULES ; do
- # LIST="$(for D in `find_depends $M`; do if ! module_installed $D ; then echo $D ; fi ; done | uniq) $LIST"
- # done
-
- verbose_msg "download queue: $LIST $MODULES"
- for M in $LIST $MODULES; do
- THIS_TEMP=$(temp_create "$M.download.log")
- rm $THIS_TEMP
- SAFE_M=$(echo $M | md5sum | awk '{print $1}')
- eval TEMP_DOWNLOAD_LOG_$SAFE_M=$THIS_TEMP
- done
- (
- for M in $LIST $MODULES; do
- SAFE_M=$(echo $M | md5sum | awk '{print $1}')
- eval THIS_TEMP=\$TEMP_DOWNLOAD_LOG_$SAFE_M
- lget $M > $THIS_TEMP 2>&1 &
- echo "$M:`jobs -p`:$THIS_TEMP" >> $TEMP_DOWNLOAD_PIDS
- wait
- done
- ) &
-
- # pass 3 : compile/install
- # no strange stuff should happen here anymore
- for MODULE in $MODULES ; do
- if ! module_installed $MODULE || [ ! -n "$PROBE" ] || ( [ -n "$PROBE" ] && [ "$PROBE_EXPIRED" == "on" ] && module_is_expired $MODULE ) ; then
- # 3 more conditions to stop processing this module:
- if module_held $MODULE ; then
- error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} Skipping compile and install for held module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
- continue
- elif module_exiled $MODULE ; then
- error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} Skipping compile and install for exiled module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
- continue
- elif ! module_license_accepted $MODULE ; then
- error_message "${LRM_COLOR}Notice:${DEFAULT_COLOR}${MESSAGE_COLOR} The license of module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is incompatible with the list of"
- error_message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
- error_message "REJECTED_LICENSES variables to include or not include the specific"
- error_message "license of this module.${DEFAULT_COLOR}"
- continue
- else
- # we're good now, start installing
- linING="/var/lock/installing.$MODULE"
- verbose_msg "starting lin \"$MODULE\""
- if ! ( SINGLE_MODULE=1 main $MODULE ) ; then
- if [ -e "$TMP_LIN_FAIL" ] ; then
- echo "$MODULE" >> $TMP_LIN_FAIL
- fi
- lin_EXIT_STATUS=1;
- else
- if [ -e "$TMP_LIN_SUCCESS" ] ; then
- echo "$MODULE" >> $TMP_LIN_SUCCESS
- fi
- fi
- fi
- fi
- done
- fi
-
- # cleanups that we need to do
- temp_destroy $TEMP_DOWNLOAD_PIDS
- temp_destroy $TEMP_PREPAREDDEPS
- temp_destroy $TEMP_CONFIGOPTS
-
- else
- # we are only doing one module, drop down to:
- MODULE=$MODULES
- unset RECONFIGURE
-
- run_details $MODULE &&
- run_depends $MODULE &&
- WANT_VERSION= satisfy_depends $MODULE
-
- if [ -z "$DEPS_ONLY" ] ; then
- if ! module_held $MODULE ; then
- if [ -n "$PROBE" ] ; then
- # --probe install
- if ! module_installed $MODULE ; then
- if ! lin_module $MODULE ; then
- temp_destroy $TEMP_PREPAREDDEPS
- exit 1
- fi
- elif [ "$PROBE_EXPIRED" == "on" ] && module_is_expired $MODULE ; then
- # probe install where module is expired
- verbose_msg "module \"$MODULE\" needs to be updated"
- if ! SINGLE_MODULE= lin_module $MODULE ; then
- temp_destroy $TEMP_PREPAREDDEPS
- exit 1
- fi
- fi
- else
- # normal install - not probed
- if ! lin_module $MODULE ; then
- temp_destroy $TEMP_PREPAREDDEPS
- exit 1
- fi
- fi
- else
- verbose_msg "Skipping held module \"$MODULE\""
- fi
- fi
- fi
-}
-
-
-. /etc/lunar/config
-
-GETOPT_ARGS=$(getopt -q -n lin -o "cdf:hprRsvV:w:" -l "compile,debug,deps,from:,help,opts:,probe,reconfigure,resurrect,silent,verbose,Version:,want:" -- "$@")
-
-# the following trap makes sure all threads exit in case something weird
-# happens:
-trap "rm -f $(eval echo \$TEMP_PREPAREDDEPS \$TEMP_DOWNLOAD_PIDS \$INSTALLWATCHFILE) ; exit 1" CHLD INT TERM KILL
-
-if [ -z "$?" ] ; then
- help | view_file
- exit
-else
- eval set -- $GETOPT_ARGS
- export IFS="$STANDARD_IFS"
-
- root_check
- enviro_check
- set_priority
-
- while true ; do
- case "$1" in
- -c|--compile ) export COMPILE="$1" ; shift ;;
- -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
- --deps ) export DEPS_ONLY="$1" ; shift ;;
- -f|--from ) export SOURCE_CACHE=$2 ; shift 2 ;;
- -h|--help ) help ; exit ;;
- --opts ) export PASS_OPTS="$2" ; shift 2 ;;
- -p|--probe ) export PROBE="$1" ; shift ;;
- -r|--reconfigure ) export RECONFIGURE="$1" ; shift ;;
- -R|--resurrect ) export RESURRECT="$1" ; shift ;;
- -s|--silent ) export SILENT="$1" ; shift ;;
- -v|--verbose ) export VERBOSE="on" ; shift ;;
- -w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
- --) shift ; break ;;
- *) help ; break ;;
- esac
- done
-
- if [ -n "$RESURRECT" ] ; then
- resurrect_modules $@
- else
- main $@
- fi
-fi
-
-
diff --git a/sbin/lrm b/sbin/lrm
deleted file mode 100755
index 95847f0..0000000
--- a/sbin/lrm
+++ /dev/null
@@ -1,370 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# lrm is for removing installed packages #
-# #
-# 20020610 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-# Copyrighted Auke Kok 2004 under GPLv2 #
-# #
-############################################################
-
-help() {
-cat << END
-usage: lrm [options] [module ...]
- -d | --debug Enables debug messages
- -D | --downgrade [module] [version] downgrades a module
- -h | --help Displays this help text
- -k | --keepconfig remove module(s) but keep dependencies and config
- -n | --nosustain removes module(s) even if they are sustained
- -u | --upgrade remove the module but do not run scripts etc.
- -v | --verbose Increases the level of message output
- -p | --purge Delete all modules that depend on the module(s)
- being removed as well
-
-lrm is a script for removing installed modules.
- If invoked without options, lrm will remove all installed files
-belonging to the module(s) and remove the module(s) from the list
-of installed modules.
- Downgrading a module means removing the current installed version
-of the module and installing a specific version; given that the
-specific version is already in $INSTALL_CACHE/.
- Some modules (such as bash and gcc) are marked "non-removable" by the
-system. In order to remove "sustained" modules, use the nosustain option.
-END
-exit 1
-}
-
-
-handle_config_files() {
- debug_msg "handle_config_files ($@)"
- if dirname "$1" | grep -q "^/etc" ; then
- # we can safely delete symlinks without md5sum checks
- if [ -L "$1" ] ; then
- return 0
- fi
-
- debug_msg "considering config file \"$1\""
-
- TARGET_MD5=$(md5sum "$1" | cut -d " " -f 1-1)
- OLD_MD5=$(grep -w "$1\$" $MD5_LOG | cut -d " " -f 1-1)
-
- if [ -z "$TARGET_MD5" ] ; then
- verbose_msg "Skipping removal of \"$1\" due to problem with md5sum"
- return 1
- fi
-
- if [ -z "$OLD_MD5" ] ; then
- verbose_msg "Skipping removal of \"$1\" due to missing original md5sum"
- return 1
- fi
-
- if [ "$TARGET_MD5" == "$OLD_MD5" ] ; then
- debug_msg "removing \"$1\""
- return 0
- fi
-
- if [ "$TARGET_MD5" != "$OLD_MD5" ] ; then
- verbose_msg "Skipping removal of \"$1\" due to md5sum mismatch"
- if [ "$PRESERVE" == "on" ] ; then
- debug_msg "PRESERVE=on, keeping \"$1\""
- return 1
- else
- verbose_msg "PRESERVE=off, archiving \"$1\""
- mv $1 $1.$(date +%Y%m%d%H%M)
- return 1
- fi
- fi
- fi
- return 0
-}
-
-
-remove_something() {
- debug_msg "remove_something ($@)"
- if [ -z "$1" ]; then
- verbose_msg "remove_something: Nothing to remove!"
- return 1
- fi
-
- if ! [ -e "$1" ] && ! [ -L "$1" ] ; then
- verbose_msg "remove_something: no such file \"$1\"!"
- return 1
- fi
-
- if [ -d "$1" ] ; then
- if rmdir "$1" 2> /dev/null ; then
- debug_msg "ok : rmdir \"$1\""
- else
- debug_msg "failed: rmdir \"$1\""
- fi
- else
- if rm -f "$1" 2> /dev/null ; then
- debug_msg "ok : rm -f \"$1\""
- else
- # this might be problematic so verbose_msg:
- verbose_msg "failed: rm -f \"$1\""
- fi
- fi
-}
-
-
-process_directories() {
- debug_msg "process_directories ($@)"
-
- if [ -z "$1" ]; then
- debug_msg "process_directories: No args, exiting"
- return 1
- fi
-
- cat $1 | sort -r | while read LINE ; do
- remove_something "$LINE"
- done
-}
-
-
-lrm_module() {
- debug_msg "lrm_module ($@)"
-
- export TMP_DIRS=$(temp_create "$1.directories")
-
- run_details $1 &> /dev/null
-
- VERSION=$(installed_version $MODULE)
- INST_LOG=$INSTALL_LOGS/$MODULE-$VERSION
- MD5_LOG=$MD5SUM_LOGS/$MODULE-$VERSION
-
- # time-out 1: PRE_REMOVE
- if [ "$UPGRADE" != "on" ]; then
- plugin_call BUILD_PRE_REMOVE $MODULE
- run_module_file $MODULE PRE_REMOVE
- fi
-
- if [ "$MODULE" != "moonbase" ]; then
- update_plugin $MODULE remove
- fi
-
- # init.d scripts stop before rm phase, but only if ! upgrading
- if [ "$KEEPCONFIG" != "on" -a "$UPGRADE" != "on" ] ; then
- # pre-read these variables!
- SERVICES=$(get_module_config "SERVICES")
- XINETD=$(get_other_module_config "xinetd" "INITDSCRIPTS")
- for INITDSCRIPT in $(get_module_config "INITDSCRIPTS") ; do
- verbose_msg "Stopping service $INITDSCRIPT"
- ( cd / && /etc/init.d/$INITDSCRIPT stop )
- done
- fi
-
- # grep -v the install logs over the protected stuff, this
- # yields the files that may be removed
- if [ "$REAP" == "on" ] ; then
- cat $INST_LOG | grep -v -f $PROTECTED | while read TARGET ; do
- if [ -e "$TARGET" ] ; then
- if [ -d "$TARGET" ] ; then
- echo "$TARGET" >> $TMP_DIRS
- else
- handle_config_files "$TARGET" &&
- remove_something "$TARGET"
- fi
- fi
- done
- process_directories $TMP_DIRS
- else
- verbose_msg "Skipping removal of files completely (REAP=$REAP)"
- fi
-
- # administration duty time:
- remove_module $MODULE
-
- # time-out 2: POST_REMOVE
- if [ "$UPGRADE" != "on" ] ; then
- plugin_call BUILD_POST_REMOVE $MODULE
- run_module_file $MODULE POST_REMOVE
- fi
- if [ "$KEEPCONFIG" == "on" -o "$UPGRADE" == "on" ] ; then
- debug_msg "skipping removal of dependency listing and configs"
- else
- verbose_msg "removing module from dependency listing and configs"
- remove_depends $MODULE
- # remove alias if required
- if [ $MODULE != moonbase ] ; then
- for ALIAS in `cut -d: -f1 $MOONBASE/aliases`; do
- if [ "$(get_local_config `echo LUNAR_ALIAS_${ALIAS:1}`)" == "$MODULE" ]; then
- verbose_msg "removing alias mapping from \"$ALIAS\" to \"$MODULE\""
- unset_local_config `echo LUNAR_ALIAS_${ALIAS:1}`
- fi
- done
- fi
- # restart xinetd after xinetd.confs have been removed by lrm...
- if [ -n "$SERVICES" -a -n "$XINETD" ] ; then
- verbose_msg "restarting xinetd"
- /etc/init.d/xinetd restart
- fi
- fi
-
- message "${LRM_COLOR}Removed${EXTEMP} module:" \
- "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- activity_log "lrm" "$MODULE" "$VERSION" "success"
-
-temp_destroy $TMP_DIRS
-}
-
-
-check_status() {
- if ! module_installed $MODULE ; then
- message "${MODULE_COLOR}${MODULE}" \
- "${PROBLEM_COLOR}is not installed." \
- "${DEFAULT_COLOR}"
- return 1
- fi
-
- if [ "$NOSUSTAIN" != "on" -a "$UPGRADE" != "on" ] ; then
- debug_msg "checking if \"$1\" is sustained"
- if grep -q "^$MODULE$" "$SUSTAINED" ; then
- message "${MODULE_COLOR}${MODULE}" \
- "${PROBLEM_COLOR}is sustained." \
- "${DEFAULT_COLOR}"
- return 1
- fi
- fi
-}
-
-
-downgrade() {
- # a local function for listing the contents of install cache
- list_available_cache() {
- ls -1 $INSTALL_CACHE/$MODULE-* | while read LINE ; do
- echo "$LINE"
- done
- exit 1
- }
-
- root_check
-
- verbose_msg "running \"$MODULE\" DETAILS file"
- optimize
- run_details $MODULE &> /dev/null || return 1
-
- if [ -z "$1" ] ; then
- message "No version is entered. The below is the list of available files."
- list_available_cache
- fi
-
- if [ ! -s $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 ] ; then
- message "Desired version is not available. Here is the available files"
- list_available_cache
- fi
-
- verbose_msg "checking if \"$MODULE\" is installed"
-
- if [ -n "$(installed_version $MODULE)" ] ; then
- verbose_msg "\"$(installed_version $MODULE)\" of \"$MODULE\" is installed at the moment"
-
- if [ "$1" == "$I_VERSION" ] ; then
- message "The downgrade version is the same as the installed version"
- message "Here is the available files."
- list_available_cache
- fi
-
- verbose_msg "removing \"$MODULE-$(installed_version $MODULE)\""
- lrm -ts $MODULE || lrm -s $MODULE
-
- else
- verbose_msg "\"$MODULE\" is NOT installed at the moment"
- fi
-
- verbose_msg "installing \"$MODULE-$1\""
- verbose_msg "extracting cached install file..."
-
- bzcat $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 | tar -kt $TAR_P -C / >/dev/null
- verbose_msg "adding module to installed list"
-
- bzcat $INSTALL_CACHE/$MODULE-$1-$BUILD.tar.bz2 |
- tar -kx $TAR_P -C / 2>/dev/null >/dev/null
- verbose_msg "adding module to installed list"
- add_module $MODULE installed $1
- activity_log "lrm downgrade" "$MODULE" "$1" "success"
-
- message "${RESURRECT_COLOR}Downgraded module:" \
- "${MODULE_COLOR}${MODULE}" \
- "${DEFAULT_COLOR}" \
- "version" \
- "${VERSION_COLOR}${1}" \
- "${DEFAULT_COLOR}"
-
- exit
-}
-
-
-. /etc/lunar/config
-
-
-GETOPT_ARGS=$(getopt -q -n lrm -o "dD:hknuvp" -l "debug,downgrade:,help,keepconfig,nosustain,upgrade,verbose,purge" -- "$@")
-
-if [ -z "$?" ] ; then
- help | view_file
- exit
-else
- eval set -- $GETOPT_ARGS
-
- root_check
- enviro_check
- set_priority
-
- while true ; do
- case "$1" in
- -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
- -D|--downgrade ) export DOWNGRADE="on"
- export MODULE="$2"
- shift 3
- downgrade "${@#-}"
- exit
- break;;
- -h|--help ) help ;;
- -k|--keepconfig ) export KEEPCONFIG="on" ; shift ;;
- -n|--nosustain ) export NOSUSTAIN="on" ; shift ;;
- -v|--verbose ) export VERBOSE="on" ; shift ;;
- -u|--upgrade ) export UPGRADE="on" ; shift ;;
- -p|--purge ) export PURGE="on" ; shift ;;
- --) shift; break ;;
- *) help; break ;;
- esac
- done
-
- for MODULE in "${@#-}" ; do
- if check_status "$MODULE" ; then
- # assemble purge list if requested
- if [ "$PURGE" == "on" ] ; then
- DEPS=$(list_installed_depending "$MODULE" | sort | uniq)
- for DEP in $DEPS ; do
- # skip held modules
- if ! module_held $DEP ; then
- # no duplicates
- if ! $(echo $LIST | grep -qw $DEP) ; then
- message "${MESSAGE_COLOR}Inserting ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR} into the removal queue${DEFAULT_COLOR}"
- LIST="$LIST $DEP"
- fi
- fi
- done
- # last append the module itself
- LIST="$LIST $MODULE"
- else
- # no fancy checks, just add to the list
- LIST="$LIST $MODULE"
- fi
- fi
- done
- for MODULE in $LIST ; do
- lrm_module $MODULE
- done
-fi
-
diff --git a/sbin/lsh b/sbin/lsh
deleted file mode 100755
index cee5269..0000000
--- a/sbin/lsh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-#
-# quick hack to jump in and out of a lunar environment
-#
-
-. /etc/lunar/config
-
-set_priority
-
-if (( $# > 0 )) ; then
- $@
-else
- export PS1="\[\033[0;31m\][lunar] \u@\h \w \\$ \[\033[0m\]"
- message "\n ${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
- "lsh is potentially hazardous to your system.${DEFAULT_COLOR}\n"
- bash --rcfile /etc/lunar/config
-fi
-
diff --git a/sbin/lunar b/sbin/lunar
deleted file mode 100755
index 5d68770..0000000
--- a/sbin/lunar
+++ /dev/null
@@ -1,840 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# lunar - Lunar module management utility #
-# #
-############################################################
-# sorcery is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS sorcery script of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-
-help() {
- cat << EOF
-Lunar -- a menu-driven software package management utility
-
-Example: lunar
- This invokes the full-screen interface
-
-Usage: lunar [general options] [command [command parameters]]
-
-General options:
-
--d | --debug Enables debug messages
--h | --help Displays this help text
--v | --verbose Increases the level of message output
-
-Commands:
-
-prune Removes old sources and install/compile logs
-renew Checks ver. against moonbase & recompiles if necessary
-update Fetches latest moonbase and then does a "renew"
-rebuild Recompiles all installed modules
-optimize Shortcut to the optimization menu
-fix Check and fix all modules and internal state of lunar
-nofix Check but do not fix modules and internal state
-fixdepends Check and fix the dependency database of lunar
-set [var [value]] Check internal variable(s) and assign their values
-unset var Unsets an internal variable
-resurrect module(s) Force modulename(s) to be unpacked from /var/cache
-install module(s) Install a checklist of modules
-remove module(s) Remove a checklist of modules
-hold module(s) Place a hold on a checklist of modules
-unhold module(s) Remove a hold on a checklist of modules
-exile module(s) Remove a module a/o prevent it from being resurrected
-unexile module(s) Allows a module to be compiled|resurrected again
-EOF
- exit 1
-}
-
-show_modules() {
- for MODULE in `list_modules "$1"`; do
- if ! module_installed $MODULE &&
- ! module_held $MODULE &&
- ! module_exiled $MODULE
- then
- (
- run_details $MODULE
- echo "$MODULE"
- echo "$VERSION"
- echo "${SHORT:-Short Description Unavailable}"
- )
- fi
- done
-}
-
-
-show_sections() {
- for SECTION in $(list_sections); do
- [ -z "$(list_modules $SECTION)" ] || {
- echo "$SECTION"
- echo "section"
- }
- done
-}
-
-
-select_section() {
- $DIALOG --title "Section Selection Menu" \
- --default-item "$SECTION" \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --menu \
- "" \
- 0 40 15 \
- `show_sections`
-}
-
-
-add_pkgs() { (
- while
- SECTION=`select_section`
- do
- while
- SECTION_MODULES=$(show_modules $SECTION)
- MODULE=`$DIALOG --title "Select module to install please" \
- --item-help \
- --menu \
- "Section: $SECTION" \
- 0 60 10 \
- $SECTION_MODULES`
- do
- SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
- DESCRIPTION=$(run_module_file $MODULE DETAILS)
-
- if $DIALOG --title "Install $MODULE" \
- --yesno "$DESCRIPTION" \
- 14 76
- then
- push_install_queue $MODULE
- $DIALOG --msgbox "$MODULE added to the install queue." 5 60
- else
- $DIALOG --msgbox "$MODULE will not be installed." 5 60
- fi
- done
- done
-) }
-
-
-show_file() {
- if [ -f $1 ]; then
- if [ "`file -b $1 | cut -d ' ' -f1`" == "bzip2" ]; then
- bzcat $1 | view_file
- else
- $DIALOG --textbox $1 10 0
- fi
- else
- $DIALOG --msgbox "File not found." 0 0
- return 1
- fi
-}
-
-
-file_list() {
- pushd $1 > /dev/null
- file -N -F ' ' * | cut -d ' ' -f1,3 --output-delimiter='
- '
- popd > /dev/null
-}
-
-
-file_menu() {
- FILE_LIST=`file_list $1`
- echo $1/`$DIALOG --title "Please select a file." \
- --menu "" 0 0 0 \
- $FILE_LIST`
-}
-
-
-show_installed_modules() {
- for LINE in $(sort $MODULE_STATUS_BACKUP) ; do
- (
- MODULE=`echo "$LINE" | cut -d : -f1`
- STATUS=`echo "$LINE" | cut -d : -f3`
- VERSION=`echo "$LINE" | cut -d : -f4`
- SIZE=`echo "$LINE" | cut -d : -f5`
-
- # TODO THIS IS BROKEN
- if module_installed $MODULE ; then
- SHORT="Short Description Unavailable"
- run_module_file $MODULE DETAILS &> /dev/null
- echo -e "$MODULE\n"
- echo -e "$VERSION,$SIZE\n"
- echo -e "\"$SHORT\"\n"
- fi
- )
- done
-}
-
-
-remove_pkgs() {
- while
- if [ -z "$INSTALLED_MODULES" ]; then
- INSTALLED_MODULES=$(show_installed_modules)
- fi
-
- unset MODULE
- MODULE=`$DIALOG --title "Select module to remove:" \
- --item-help \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --menu "" 0 60 10 \
- $INSTALLED_MODULES`
- do
- (
- SECTION=$(find_section $MODULE)
- SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
- DESCRIPTION=$(run_module_file $MODULE DETAILS)
-
- if $DIALOG --title "Remove $MODULE" \
- --yesno "$DESCRIPTION" \
- 12 76
- then
- push_remove_queue $MODULE &&
- $DIALOG --msgbox "$MODULE added to the remove queue." 5 60 ||
- $DIALOG --msgbox "$MODULE is not really installed?" 5 60
- fi
- )
- done
-}
-
-
-
-make_checklist() {
- for MODULE in `list_modules "$1"`; do
- (
- run_details $MODULE
-
- if module_installed $MODULE || module_held $MODULE; then
- STATUS="on"
- else
- STATUS="off"
- fi
-
- echo $MODULE
- echo $VERSION
- echo $STATUS
- echo ${SHORT:-Short Description Unavailable}
- )
- done
-}
-
-
-process_section() {
- KEEP_LIST=$2
-
- for LINE in `list_modules "$1"`; do
- if echo -e "$KEEP_LIST" |
- grep -q "^$LINE\$"
- then push_install_queue $LINE
- else push_remove_queue $LINE
- fi
- done
-}
-
-
-select_pkgs() {
- SELECT_TITLE="Module Toggle Selection Menu"
- SELECT_HELP="[X]=install [ ]=remove"
-
- while SECTION=`select_section`; do
- [ -z "$(list_modules $SECTION)" ] ||
- CHECKLIST=`make_checklist $SECTION`
-
- if OUTLIST=`$DIALOG --title "$SELECT_TITLE" \
- --ok-label "Commit" \
- --item-help \
- --separate-output \
- --checklist \
- "$SELECT_HELP $SECTION" \
- 0 0 10 \
- $CHECKLIST`
- then process_section "$SECTION" "$OUTLIST"
- fi
- done
-}
-
-
-make_hold_checklist() {
- for LINE in $(sort $MODULE_STATUS_BACKUP) ; do
- (
- MODULE=$(echo "$LINE" | cut -d: -f1)
- STATUS=$(echo "$LINE" | cut -d: -f3)
- VERSION=$(echo "$LINE" | cut -d: -f4)
- if [ "$STATUS" == "installed" ] || [ "$STATUS" == "held" ] ; then
- [ "$STATUS" == "held" ] && HELD="on" || HELD="off"
- SHORT="Short description unavailable"
- if run_details $MODULE &> /dev/null ; then
- echo $MODULE
- echo $VERSION
- echo $HELD
- echo $SHORT
- fi
- fi
- )
- done
-}
-
-
-hold_pkgs() {
- HOLD_TITLE="Select modules to hold or unhold"
- HOLD_HELP="[X]=held [ ]=installed"
-
- if OUTLIST=`$DIALOG --title "$HOLD_TITLE" \
- --item-help \
- --ok-label "Commit" \
- --separate-output \
- --checklist \
- "$HOLD_HELP" \
- 0 0 10 \
- $(make_hold_checklist)`
- then
- unhold_modules $(cut -d: -f1 < $MODULE_STATUS)
- hold_modules $OUTLIST
- fi
-
-}
-
-
-module_menu() {
- while
- U_HELP="Current software hinders crackers' attempts to infiltrate your box"
- M_HELP="Install and remove multiple modules from a section using a single selection"
- A_HELP="Simple safe, verbose way of selecting modules for installation"
- R_HELP="Simple safe, verbose way of selecting modules for removal"
- B_HELP="Rebuild all installed modules"
- H_HELP="Held modules will not be upgraded until unheld or broken"
- E_HELP="Done managing modules"
- TITLE="Module Menu"
- OK="Select"
- CANCEL="Exit"
-
- COMMAND=`$DIALOG --title "$TITLE" \
- --item-help \
- --ok-label "$OK" \
- --cancel-label "$CANCEL" \
- --menu "" 0 0 0 \
- "A" "Add" "$A_HELP" \
- "B" "Rebuild" "$B_HELP" \
- "H" "Hold" "$H_HELP" \
- "R" "Remove" "$R_HELP" \
- "S" "Select" "$M_HELP" \
- "U" "Update" "$U_HELP"`
- do
- case $COMMAND in
- U) update ;;
- S) select_pkgs ;;
- A) add_pkgs ;;
- R) remove_pkgs ;;
- B) rebuild ;;
- H) hold_pkgs ;;
- E) break ;;
- esac
- done
-}
-
-
-grep_install_logs() {
- if WHAT=`$DIALOG --inputbox \
- "Please enter full path and name of file" \
- 0 0`
- then
- cd $INSTALL_LOGS
- grep "$WHAT\$" * | view_file
- fi
-}
-
-
-set_email() {
- if ADMIN=`$DIALOG --ok-label "Commit" \
- --inputbox \
- "Please enter the email address of the person or role account that should receive reports from this box." \
- 0 0 "$ADMIN"`
- then
- set_local_config "ADMIN" "$ADMIN"
- fi
-}
-
-
-set_delay() {
- if PROMPT_DELAY=`$DIALOG --ok-label "Commit" \
- --inputbox \
- "Please enter the time in seconds to wait for a response when prompted with a question." \
- 0 0 "$PROMPT_DELAY"`
- then
- set_local_config "PROMPT_DELAY" "$PROMPT_DELAY"
- fi
-}
-
-
-queue_menu() {
- [ ! -d /var/log/lunar/queue ] || mkdir -p /var/log/lunar/queue
- while
- I_HELP="View the list of modules selected for installation"
- i_HELP="Edit the list of modules selected for installation"
- R_HELP="View the list of modules selected for removal"
- r_HELP="Edit the list of modules selected for removal"
- M_HELP="View the datafile of installed modules"
- m_HELP="Edit the datafile of installed modules"
-
- COMMAND=`$DIALOG --title "Queue Menu" \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --default-item $COMMAND \
- --item-help \
- --menu \
- "" \
- 0 40 6 \
- "I" "View install queue" "$I_HELP" \
- "i" "Edit install queue" "$i_HELP" \
- "R" "View removal queue" "$R_HELP" \
- "r" "Edit removal queue" "$r_HELP" \
- "M" "View module status" "$M_HELP" \
- "m" "Edit module status" "$m_HELP"`
- do
- case $COMMAND in
- M) show_file $MODULE_STATUS ;;
- m) edit_file $MODULE_STATUS
- cp $MODULE_STATUS \
- $MODULE_STATUS_BACKUP ;;
- I) show_file $INSTALL_QUEUE ;;
- i) edit_file $INSTALL_QUEUE ;;
- R) show_file $REMOVE_QUEUE ;;
- r) edit_file $REMOVE_QUEUE ;;
- esac
- done
-}
-
-
-maintenance_menu() {
- while
- F_HELP="Check and fix all modules and internal state of lunar"
- N_HELP="Check all modules but do not fix the internal state"
- D_HELP="Check and fix the dependency database of lunar"
- P_HELP="Prune old sources and install/compile logs"
- A_HELP="Change selected or select new alias mappings"
-
- COMMAND=`$DIALOG --title "Maintenance Menu" \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --default-item $COMMAND \
- --item-help \
- --menu \
- "" \
- 0 40 6 \
- "F" "Fix everything" "$F_HELP" \
- "N" "Check everything but don't fix" "$N_HELP" \
- "D" "Fix dependencies" "$D_HELP" \
- "P" "Prune old sources and logs" "$P_HELP" \
- "A" "Select or Change Aliases" "$A_HELP"`
- do
- case $COMMAND in
- F) lunar fix ;;
- N) lunar nofix ;;
- D) lunar fixdepends ;;
- P) lunar prune ;;
- A) select_aliases ;;
- esac
- if [ $COMMAND != "A" ] ; then
- message "${MESSAGE_COLOR}Press enter to return...${DEFAULT_COLOR}"
- read
- fi
- done
-}
-
-
-log_menu() {
- while
- C_HELP="View compile logs of previously installed software"
- G_HELP="Discover a file's origin"
- I_HELP="View logs of files previously installed"
- c_HELP="Remove a compile log"
- i_HELP="Edit a log of files previously installed"
-
- COMMAND=`$DIALOG --title "Log Menu" \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --default-item $COMMAND \
- --item-help \
- --menu \
- "" \
- 0 40 5 \
- "G" "Grep install logs" "$G_HELP" \
- "I" "View install log" "$I_HELP" \
- "i" "Edit install log" "$i_HELP" \
- "C" "View compile log" "$C_HELP" \
- "c" "Remove compile log" "$c_HELP"`
- do
- case $COMMAND in
- G) grep_install_logs ;;
- I) show_file `file_menu $INSTALL_LOGS` ;;
- i) edit_file `file_menu $INSTALL_LOGS` ;;
- C) show_file `file_menu $COMPILE_LOGS` ;;
- c) rm -f `file_menu $COMPILE_LOGS` ;;
- esac
- done
-}
-
-
-feature_menu() {
- A_HELP="Create convenient auto-install scripts for common executables?"
- C_HELP="Colorized messages on lin and lrm?"
- E_HELP="Remove files when lrm?"
- F_HELP="Check for and repair broken programs after updating lunar?"
- G_HELP="Install the garbage documentation? (extras like README, LICENSE etc)"
- H_HELP="Automatically resurrect modules instead of compiling them?"
- I_HELP="Create archives of installed software?"
- K_HELP="Keep source code in /usr/src on good compiles? (gcc profiling needs it)"
- M_HELP="Email reports?"
- P_HELP="Preserve modified files or backup them up and overwrite with defaults?"
- R_HELP="Prompt to view reports?"
- S_HELP="Play audio with prompts?"
- T_HELP="Disallow lrm of modules that would cause terrible malfunctions?"
- U_HELP="Automatically remove old sources and install caches upon lunar update?"
- V_HELP="View compilation as it happens?"
- W_HELP="Verbose display of compilation process?"
- X_HELP="When using --probe, also recompile modules if a newer version is available?"
- Z_HELP="Custom modules in zlocal override equally named ones (NOT RECOMMENDED) ?"
-
- ARCHIVE=${ARCHIVE:-on}
- AUTORESURRECT=${AUTORESURRECT:-on}
- AUTOFIX=${AUTOFIX:-on}
- AUTOPRUNE=${AUTOPRUNE:-off}
- COLOR=${COLOR:-on}
- KEEP_SOURCE=${KEEP_SOURCE:-off}
- MAIL_REPORTS=${MAIL_REPORTS:-off}
- VIEW_REPORTS=${VIEW_REPORTS:-off}
- PRESERVE=${PRESERVE:-on}
- SOUND=${SOUND:-off}
- SUSTAIN=${SUSTAIN:on}
- VOYEUR=${VOYEUR:-on}
- REAP=${REAP:-on}
- GARBAGE=${GARBAGE:-on}
- VERBOSE=${VERBOSE:off}
-
- if TOGGLES=`$DIALOG --title "Feature Menu" \
- --no-cancel \
- --item-help \
- --separate-output \
- --checklist \
- "" \
- 0 40 14 \
- "ARCHIVE" "Toggle" "$ARCHIVE" "$I_HELP" \
- "AUTORESURRECT" "Toggle" "$AUTORESURRECT" "$H_HELP" \
- "AUTOFIX" "Toggle" "$AUTOFIX" "$F_HELP" \
- "AUTOPRUNE" "Toggle" "$AUTOPRUNE" "$U_HELP" \
- "COLOR" "Toggle" "$COLOR" "$C_HELP" \
- "KEEP_SOURCE" "Toggle" "$KEEP_SOURCE" "$K_HELP" \
- "GARBAGE" "Toggle" "$GARBAGE" "$G_HELP" \
- "MAIL_REPORTS" "Toggle" "$MAIL_REPORTS" "$M_HELP" \
- "PRESERVE" "Toggle" "$PRESERVE" "$P_HELP" \
- "SOUND" "Toggle" "$SOUND" "$S_HELP" \
- "SUSTAIN" "Toggle" "$SUSTAIN" "$T_HELP" \
- "VIEW_REPORTS" "Toggle" "$VIEW_REPORTS" "$R_HELP" \
- "VOYEUR" "Toggle" "$VOYEUR" "$V_HELP" \
- "REAP" "Toggle" "$REAP" "$E_HELP" \
- "VERBOSE" "Toggle" "$VERBOSE" "$W_HELP" \
- "ZLOCAL_OVERRIDES" "Toggle" "$ZLOCAL_OVERRIDES" "$Z_HELP" \
- "PROBE_EXPIRED" "Toggle" "$PROBE_EXPIRED" "$X_HELP"`
-
- then
-
- ARCHIVE=off
- AUTORESURRECT=off
- AUTOFIX=off
- AUTOPRUNE=off
- COLOR=off
- KEEP_SOURCE=off
- MAIL_REPORTS=off
- PRESERVE=off
- SOUND=off
- SUSTAIN=off
- VIEW_REPORTS=off
- VOYEUR=off
- REAP=off
- GARBAGE=off
- VERBOSE=off
-ZLOCAL_OVERRIDES=off
- PROBE_EXPIRED=off
-
- for TOGGLE in $TOGGLES; do
- case $TOGGLE in
- ARCHIVE) ARCHIVE=on ;;
- AUTORESURRECT) AUTORESURRECT=on ;;
- AUTOFIX) AUTOFIX=on ;;
- AUTOPRUNE) AUTOPRUNE=on ;;
- COLOR) COLOR=on ;;
- KEEP_SOURCE) KEEP_SOURCE=on ;;
- MAIL_REPORTS) MAIL_REPORTS=on ;;
- PRESERVE) PRESERVE=on ;;
- SOUND) SOUND=on ;;
- SUSTAIN) SUSTAIN=on ;;
- VIEW_REPORTS) VIEW_REPORTS=on ;;
- VOYEUR) VOYEUR=on ;;
- REAP) REAP=on ;;
- GARBAGE) GARBAGE=on ;;
- VERBOSE) VERBOSE=on ;;
- ZLOCAL_OVERRIDES) ZLOCAL_OVERRIDES=on ;;
- PROBE_EXPIRED) PROBE_EXPIRED=on ;;
- esac
- done
-
- set_local_config "ARCHIVE" "$ARCHIVE"
- set_local_config "AUTORESURRECT" "$AUTORESURRECT"
- set_local_config "AUTOFIX" "$AUTOFIX"
- set_local_config "AUTOPRUNE" "$AUTOPRUNE"
- set_local_config "KEEP_SOURCE" "$KEEP_SOURCE"
- set_local_config "MAIL_REPORTS" "$MAIL_REPORTS"
- set_local_config "PRESERVE" "$PRESERVE"
- set_local_config "SOUND" "$SOUND"
- set_local_config "SUSTAIN" "$SUSTAIN"
- set_local_config "VIEW_REPORTS" "$VIEW_REPORTS"
- set_local_config "VOYEUR" "$VOYEUR"
- set_local_config "REAP" "$REAP"
- set_local_config "GARBAGE" "$GARBAGE"
- set_local_config "VERBOSE" "$VERBOSE"
- set_local_config "ZLOCAL_OVERRIDES" "$ZLOCAL_OVERRIDES"
- set_local_config "PROBE_EXPIRED" "$PROBE_EXPIRED"
- set_local_config "COLOR" "$COLOR"
-
- fi
-}
-
-
-option_menu() {
- while
- P_HELP="Enter the default delay time for prompts"
- E_HELP="Enter the email address for this box's administrator"
- F_HELP="Select many options on or off at once"
- M_HELP="Select ftp and http mirrors for faster downloads"
- O_HELP="Select architecture optimizations"
- I_HELP="Select the test that lunar fix, and AUTOFIX execute"
- D_HELP="Options for downloads"
- L_HELP="Select default lunar module"
- T_HELP="Select default moonbase branch"
- A_HELP="Select accepted licenses"
- R_HELP="Select rejected licenses"
-
- COMMAND=`$DIALOG --title "Option Menu" \
- --item-help \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --menu \
- "" \
- 0 40 8 \
- "L" "Default Lunar Module" "$L_HELP" \
- "T" "Default Moonbase Branch" "$T_HELP" \
- "P" "Prompt Delay" "$P_HELP" \
- "D" "Download Options" "$D_HELP" \
- "E" "Admin's Email" "$E_HELP" \
- "F" "Feature Menu" "$F_HELP" \
- "I" "Integrity Checking" "$I_HELP" \
- "M" "Software Mirrors" "$M_HELP" \
- "O" "Optimize Architecture" "$O_HELP" \
- "A" "Accepted licenses" "$A_HELP" \
- "R" "Rejected licenses" "$R_HELP"`
-
- do
- case $COMMAND in
- P) set_delay ;;
- D) download_options ;;
- E) set_email ;;
- F) feature_menu ;;
- I) integrity_menu ;;
- M) mirror_menu ;;
- O) optimize_menu ;;
- L) set_default_module ;;
- T) set_default_moonbase ;;
- A) set_accepted_licenses ;;
- R) set_rejected_licenses ;;
- esac
- done
-}
-
-
-goodbye() {
- echo "Have a good day."
- exit
-}
-
-
-background_execute() {
- $DIALOG --msgbox "Processing queues in the background." 0 0
-
- [ -f $REMOVE_QUEUE ] &&
- lrm `cat $REMOVE_QUEUE` 1>/dev/null 2>&1
- rm -f $REMOVE_QUEUE
-
- if [ -f $INSTALL_QUEUE ]; then
- lin --deps `cat $INSTALL_QUEUE`
- ( lin `cat $INSTALL_QUEUE` 1>/dev/null 2>&1 &&
- rm -f $INSTALL_QUEUE
- ) &
- fi
-
- goodbye
-}
-
-
-foreground_execute() {
- [ -f $REMOVE_QUEUE ] && lrm `cat $REMOVE_QUEUE`
- rm -f $REMOVE_QUEUE
-
- [ -f $INSTALL_QUEUE ] && lin `cat $INSTALL_QUEUE`
- rm -f $INSTALL_QUEUE
-
- goodbye
-}
-
-
-setvar() {
- if [ -z "$*" ] ; then
- sort -n $LOCAL_CONFIG | grep -v -e UNIQID -e color | while read LINE ; do
- printf "%32s %s\n" "$(echo $LINE|cut -d= -f1)" "$(echo $LINE|cut -d= -f2-)"
- done
- else
- VAR=$1
- shift
- if [ -z "$*" ] ; then
- VAL=$(get_local_config "$VAR")
- printf "%s=%s\n" "$VAR" "$VAL"
- else
- set_local_config "$VAR" "$@"
- fi
- fi
-}
-
-
-unsetvar() {
- if [ ! -z "$*" ] ; then
- unset_local_config "$1"
- fi
-}
-
-
-main_menu() {
- while
- M_HELP="Easy module management"
- O_HELP="Change lunar options and features"
- L_HELP="View and edit lunar generated log files."
- Q_HELP="View and edit lunar queues."
- F_HELP="Process queues while you watch and wait"
- N_HELP="Discover and fix internal problems"
- B_HELP="Process queues in the background"
- E_HELP="Exit without processing queues"
- OK="Select"
- CANCEL="Exit"
-
- COMMAND=`$DIALOG --title "Main Menu" \
- --item-help \
- --ok-label "$OK" \
- --cancel-label "$CANCEL" \
- --menu \
- "$LUNAR_MODULE version: $LUNAR_VERSION" \
- 0 0 0 \
- "M" "Module Menu" "$M_HELP" \
- "O" "Option Menu" "$O_HELP" \
- "L" "Log Menu" "$L_HELP" \
- "Q" "Queue Menu" "$Q_HELP" \
- "N" "Maintenance Menu" "$N_HELP" \
- "F" "Foreground Execute" "$F_HELP" \
- "B" "Background Execute" "$B_HELP"`
- do
- case $COMMAND in
- M) module_menu ;;
- O) option_menu ;;
- L) log_menu ;;
- Q) queue_menu ;;
- N) maintenance_menu ;;
- F) foreground_execute ;;
- B) background_execute ;;
- esac
- done
-}
-
-
-
-DIALOG="dialog
---backtitle
-Lunar Module Management Utility
---stdout"
-
-main() {
- #lets load the menu code
- if [ -n "$MENUS" ]; then
- for FILE in $(echo $MENUS/*.menu) ; do
- [ -s "$FILE" ] && . "$FILE"
- done
- fi
-
- export IFS="$TAB_ENTER_IFS"
-
- LUNAR_MODULE=${LUNAR_MODULE:-lunar}
- LUNAR_VERSION=$(run_details $LUNAR_MODULE && echo $UPDATED)
-
- main_menu
-}
-
-. /etc/lunar/config
-
-GETOPT_ARGS=$(getopt -q -n lunar -o "dhv" -l "debug,help,verbose" -- "$@")
-
-if [ -z "$?" ] ; then
- help | view_file
- exit
-else
- eval set -- $GETOPT_ARGS
- root_check
- enviro_check
- set_priority
-
- while true ; do
- case "$1" in
- -d|--debug ) (( LUNAR_DEBUG++ )) ; export LUNAR_DEBUG ; shift ;;
- -h|--help ) help ; exit 1 ;;
- -v|--verbose ) export VERBOSE="on" ; shift ;;
- --) shift ; break ;;
- *) help ; break ;;
- esac
- done
-
- case "$1" in
- prune ) prune ;;
- renew ) renew ;;
- update ) update ;;
- rebuild ) rebuild ;;
- optimize ) optimize_menu ;;
- set ) shift && setvar $@ ;;
- unset ) shift && unsetvar $@ ;;
- fix ) shift && run_fix $@ ;;
- nofix ) shift && export NOFIX=on && run_fix $@ ;;
- fixdepends ) shift && fix_depends $@ ;;
- resurrect ) shift && resurrect_modules $@ ;;
- install ) shift && lin $@ ;;
- remove ) shift && lrm $@ ;;
- hold ) shift && hold_modules $@ ;;
- unhold ) shift && unhold_modules $@ ;;
- exile ) shift && exile_modules $@ ;;
- unexile ) shift && unexile_modules $@ ;;
- *) main ;;
- esac
-fi
-
diff --git a/sbin/lvis b/sbin/lvis
deleted file mode 100755
index 49a7ddf..0000000
--- a/sbin/lvis
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-############################################################
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# lvis is front-end to lin to activate voyeurism in a #
-# separate xterm if possible. #
-############################################################
-process_parameters() {
- while [ -n "$1" ]; do
- if echo "" $1 | grep -q "^ -"; then
- case $1 in
- --from) export SOURCE_CACHE="$2"; shift 2 ;;
- --url) export BASE_URL="$2"; shift 2 ;;
- -n|--nofix) NO_lget="$1"; NO_LVU="$1"; shift 1 ;;
- --silent) NO_lget="$1"; NO_LVU="$1"; shift 1 ;;
- --deps) NO_lget="$1"; shift 1 ;;
- -f|--fix) NO_lget="$1"; shift 1 ;;
- --help) HELP="$1"; shift 1 ;;
- -s) NO_lget="$1"; shift 1 ;;
- *) shift 1 ;;
- esac
- else shift
- fi
- done
-}
-strip_parameters() {
- while [ -n "$1" ]; do
- if echo "" $1 | grep -q "^ -"; then
- case $1 in
- --from) shift 2 ;;
- --url) shift 2 ;;
- *) shift 1 ;;
- esac
- else echo $1; shift
- fi
- done
-}
-process_parameters $*
-MODULES=`strip_parameters $*`
-
-if [ -z "$*" ] ||
- [ -n "$HELP" ]; then
- lin; exit 1
-fi
-
-if [ -n "$DISPLAY" ]; then
- if [ -z "$NO_LVU" ]; then
- xterm -bg black \
- -fg white \
- $XTERM_OPTIONS \
- -T "lvu voyeur 5 $MODULES" \
- -e /bin/sh -c "lvu voyeur 5 $MODULES" &
- fi
-
- if [ -z "$NO_lget" ]; then
- xterm -bg black \
- -fg white \
- $XTERM_OPTIONS \
- -T "lget $MODULES" \
- -e /bin/sh -c "lget $MODULES" &
- fi
-fi
-lin $@
diff --git a/usr/share/doc/lunar/COPYING-2.0 b/usr/share/doc/lunar/COPYING-2.0
deleted file mode 100644
index d538572..0000000
--- a/usr/share/doc/lunar/COPYING-2.0
+++ /dev/null
@@ -1,353 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange;
-or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free
-Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it
-does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show
-w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the
-appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program
-into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with
-the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
diff --git a/usr/share/doc/lunar/CREDITS b/usr/share/doc/lunar/CREDITS
deleted file mode 100644
index d48c3d7..0000000
--- a/usr/share/doc/lunar/CREDITS
+++ /dev/null
@@ -1,157 +0,0 @@
-Lunar Credits:
-
-
- -- Introduction
-
-Hundreds of people have contributed to Lunar-Linux and have made it what it is
-today. It would be impossible to keep a list of every single contribution that
-has been made, but without those small contributions, Lunar-Linux would not be
-what it is now, and we are grateful for them.
-
-Our eternal gratitude goes to Kyle Sallee, the original author of Sorcerer
-GNU Linux, who made it possible for us to work on this great concept and
-especially in the way we want to work on it -- cooperating in a team effort,
-together as a group. Since that moment Lunar-Linux has grown faster than
-ever.
-
-
- -- Developers
-
-A few developers have spent enormous time on Lunar-Linux in the past, but
-are unfortunately not able to do so anymore. We miss their coding skills,
-and the pleasure of working together with these enthusiastic people. We
-hope to see them back in the future, there will always be a place in
-#lunar reserved for them:
-
-
-
-Name E-mail nickname
----------------- ------------------------ -------------------
-Kagan Kongar kongar at tsrsb.org.tr kongar
-Rick Altherr kc8apf at kc8apf.net kc8apf
-Jason Jackson jacksonje at health.missouri.edu houkan
-Timo Kosig timo.kosig at gmx.de tiomo
-
-
-Your current Lunar Development team is:
-
-Name E-mail nickname
----------------- ------------------------ -------------------
-Jan Eidtmann cmak at lunar-linux.org cmak
-Chuck Mead csm at lunar-linux.org csm
-Drew Swayze drew at lunar-linux.org evildrew
-Florin Braescu florin at lunar-linux.org florin
-Steven Michalske hardkrash at lunar-linux.org hardkrash
-Jasper Huijsmans jazman at lunar-linux.org jazman
-Jeff Hodges jmhodges at lunar-linux.org jmhodges
-Joel Vennin jol at lunar-linux.org jol
-Gerrit Germis lurch at lunar-linux.org lurch
-Moritz Heiber moe at lunar-linux.org Moe
-Jaime Buffery nestu at lunar-linux.org nestu
-Nick Hudson nhudson at lunar-linux.org nhudson
-Niki Guldbrand niki at lunar-linux.org niki
-Stefan Wold ratler at lunar-linux.org Ratler
-Rodney M. Brown r0dzilla at lunar-linux.org r0dzilla
-Auke Kok sofar at lunar-linux.org sofar
-Jon South striker at lunar-linux.org Striker
-Terry Chan tchan at lunar-linux.org tchan
-Aaron Watry watryac04 at lunar-linux.org Veerappan
-Jason Johnson xoritor at lunar-linux.org xoritor
-
- -- Others
-
-Of course, there are many module writers, patch submitters, people submitting
-documentation, comments, or otherwise contributing to Lunar-Linux which names
-we have not forgotten (alphabetical by irc nickname):
-
-Name E-mail nickname
----------------- ------------------------ -------------------
-Alan Mimms alanm at unforgettable.com alan
-Alex Chapman wrunt at hotmail.com alex
-Anders Bruun Olsen anders at bruun-olsen.net anders
-Andrew Davies kazami at ntlworld.com andrew
-artit artit at acj126.rh.psu.edu artit
-Arwed von Merkatz v.merkatz at gmx.net arwed
-Atani atani at atani-software.net atani
-Barak barak at wi.rr.com barak
-Bob Finch w9ya at amsat.org bfinch
-Bjorn Nitzler b.nitzler at umea.bonet.se bjorn
-Bachman Kharazmi bkw at lindesign.se bkw
-Brian Peterson brian.peterson at tcinternet.net brian
-Cal Evans cal at calevans.com cal
-Chris cwrobel at dccnet.com chris
-Christoph Steckelberg heffer at mailberlin.net christoph
-Christopher Church cchurch at cc.gatech.edu christopher
-Chuck Busby scarecrow.143 at attbi.com chuck
-Daniel dcmccal at clemson.edu daniel
-darookee darookee at darookee.net darookee
-David Chan davidchan at rcn.com david
-Milosz Tanski mtanksi at wideopenwest.com dem
-Daniel Nielsen djn at daimi.au.dk dnielsen
-doubletwist doubletwist at spack.nu doubletwist
-Eric Sandall sandalle at mail.wsu.edu eric
-Erik Søe Sørensen eriksoe at daimi.au.dk
-Vincent Vandeweijer v_vandeweijer at zonnet.nl evo_
-fasa tremon_r at epita.fr fasa
-ST LEE ftbee at hotmail.com ftbee
-Gareth Clay g.clay at warwick.ac.uk gareth
-Gerall Kahla gerall at chromebob.com gerall
-Charles Ballowe hangman at steelballs.org hangman
-Harley J Pig harleypig at harleypig.com harley
-Hendrik Visage hvisage at is.co.za hendrik
-Ladislav Hagara hgr at vabo.cz hgr
-Jan Sabbe jan.sabbe at student.kuleuven.ac.be jan
-Jason Overholt j.over at verizon.net jason
-j cr jcrowso at hotmail.com jcr
-Jean-Michel Smith jean at kcco.com jean-michel
-Jeff Schmidt jschmidt at fnal.gov jeff
-Jim Phillips jphillips at ergonet-ent.com jim
-Johan Warlander johan at warlander.com johan
-Joel Mayes joel_mayes at dingoblue.net.au joel
-Jon Svendsen jon-sven at frisurf.no jon
-Jonathan Evraire evraire at tuwg.com jonathan
-Joshua Books jbooks at real.com joshua
-Jyp j.y.p at wanadoo.fr jyp
-Kyle Risse krisse at kylerisse.com krisse
-Ladislav Hagara hgr at vaboo.cz ladislav
-Lasar Liepins lasar at liepins.de lasar
-Bob Johnson livewire_ at ameritech.net livewire
-Gáspár Ákos madar at www.hnp.hu madar
-Manolis Tzanidakis mtzanidakis at lycos.co.uk manolis
-Marc Greene eru at subdimension.com marc
-Mark Rushing mark at orbislumen.net mark
-Mike Dinitz mdinitz at Princeton.edu mike
-Nazadus nazadus at swbell.net nazadus
-Chris Newton baron at shutdown.com newton
-Nils Hjärpe nisse at aol.fi nils
-Paul Laws paul at moway.co.uk paul
-Paulo Almeida pamma at netcabo.pt paulo
-Philippe Namias pn at novadeck.net philippe
-P. Martin pmartin at pe.net pmartin
-Richard Snow richardsnow at mcc4u.com richard
-Rober Amble robert_amble at yahoo.com robert
-Robin Cook rcook at wyrms.net robin
-Russel Ingarm ringram at gargoylecc.com russel
-Sasha Andric sasha at goldnet.ca sasha
-Seppo Tamminen setammi at uusikaupunki.fi seppo
-Shawn shawn at digilliance.net shawn
-steve sja8rd at mizzou.edu sja8rd
-Steve Pinkham spinkham at bigfoot.com steve
-Sven Oliver Moll svolli at svolli.de svolli
-Target target at targ.dyndns.org target
-Thmoas Stewart thomas at stewarts.org.uk thomas
-Toby Oxborrow oxborrow at oxborrow.net toby
-Tom thomas at stewarts.org.uk tom
-Torgeir Ulvedal Nes torgeir at nes.ac torgeir
-trick gerry at c64.org trick
-Väinö Järvelä vaino.jarvela at pp.inet.fi vaino
-Wes Warner wes at lppcs.com wes
-
- -- Epilogue
-
-Lastly, there are those whose names we have forgotten, and we are ashamed of
-not knowing exactly who has helped us in the past.
-
-If you feel that this list is incomplete or needs adjustment in any way, feel
-free to inform us at <maintainer at lunar-linux.org>.
-
diff --git a/usr/share/doc/lunar/core-documentation/Reference_Directory.html b/usr/share/doc/lunar/core-documentation/Reference_Directory.html
deleted file mode 100644
index d045758..0000000
--- a/usr/share/doc/lunar/core-documentation/Reference_Directory.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-1">
- <title>Reference Directory</title>
- <meta name="author" content="Chuck Mead">
-</head>
-<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
- link="#0000ff" alink="#000088" vlink="#ff0000">
-<h1>Reference Directory</h1>
-<br>
-<h2>Variable Definitions</h2>
-<br>
-<a
- href="file:///home/csm/sandbox/theedge/usr/share/doc/lunar/core-documentation/etc_lunar_config.html">/etc/lunar/config</a>
-- the initial defines required for the entirety of the Lunar core
-toolset's operation.<br>
-<br>
-<a href="_etc_lunar_local_config.html">/etc/lunar/local/config</a> -
-local defines which may override settings in /etc/lunar/config.<br>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;">© 2003, <a
- href="http://lunar-linux.org">Lunar-Linux.org</a><br>
-Written by: Chuck Mead <csm at lunar-linux.org><br>
-Last edited: 16 Feb 2003
-</body>
-</html>
diff --git a/usr/share/doc/lunar/core-documentation/_etc_lunar_local_config.html b/usr/share/doc/lunar/core-documentation/_etc_lunar_local_config.html
deleted file mode 100644
index 7285fbb..0000000
--- a/usr/share/doc/lunar/core-documentation/_etc_lunar_local_config.html
+++ /dev/null
@@ -1,227 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-1">
- <title>/etc/lunar/local/config</title>
- <meta name="author" content="Chuck Mead">
-</head>
-<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
- link="#0000ff" alink="#000088" vlink="#ff0000">
-<h2>File Name: /etc/lunar/local/config</h2>
-<br>
-Contains initial defines which may override settings in
-/etc/lunar/config. These or the ones in /etc/lunar/config are
-required for the entirety of the Lunar core toolset's operation.<br>
-<br>
-<br>
-<h3>Global Variable Defines</h3>
-<td style="vertical-align: top;"> </td>
-<td style="vertical-align: top;">
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 100%;">
- <tbody>
- <tr>
- <td style="vertical-align: top;">
- <h3>Define</h3>
- </td>
- <td style="vertical-align: top;">
- <h3>Explanation</h3>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MOONBASE=/home/csm/sandbox/moonbase<br>
- </td>
- <td style="vertical-align: top;">Default location of the moonbase
-(overrides the entry in /etc/lunar/config).</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">GCCVER=3<br>
- </td>
- <td style="vertical-align: top;">Defining the gcc version used on
-the system. There are two gcc modules (gcc [which is gcc version 3, the
-default] and gcc2).<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">FUZZY=on<br>
- </td>
- <td style="vertical-align: top;">Implements fuzzy logic to allow
-download file extensions to vary between bz2 and gz.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">LUNAR_MODULE=theedge<br>
- </td>
- <td style="vertical-align: top;">Variable defining which version
-of the Lunar core tools the system is using. May be "theedge" or
-"lunar". Lunar is mostly stable and theedge is the developer version.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">ADMIN=csm<br>
- </td>
- <td style="vertical-align: top;">Identifies the local admin for
-system notices (normally sent via email).<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">FIND_CHECK=on<br>
- </td>
- <td style="vertical-align: top;">Turns on the find_check()
-function in /sbin/lin. This looks for missing files which the package
-manager has recorded are present and notifies the user if something is
-missing.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MD5SUM_CHECK=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the
-md5sum_check() function in /sbin/lin.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">LDD_CHECK=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the
-ldd_check() function in /sbin/lin.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SYM_CHECK=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the
-sym_check() function in /sbin/lin.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">PROMPT_DELAY=10<br>
- </td>
- <td style="vertical-align: top;">Used by the set_delay() function
-in /sbin/lunar.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">ARCHIVE=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) log archiving.
-Used by the archive() function in /var/lib/lunar/subroutines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">AUTOFIX=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the autofix
-mode for lunar update. Used by the upgrade_install_queue() function in
-/var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">AUTOPRUNE=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the autoprune
-mode for lunar update. Used by the upgrade_install_queue() function in
-/var/lib/lunar/subroutines.</td>
- </tr>
- </tr>
- <tr>
- <td style="vertical-align: top;">KEEP_SOURCE=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the keep
-source mode for lin. Used by the lin_module() function in /sbin/lin and
-the default_pre_build() function in /var/lib/lunar/subroutines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MAIL_REPORTS=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the mailing of
-reports to the admin. Used by the report() function in
-/var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">PRESERVE=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the
-preservation of running config files for modules. Used by the
-handle_config_files() function in /sbin/lrm and the
-reap_modified_file() function in /var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SOUND=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) audio feedback
-when using lunar core tools. Used by the sound() function in
-/var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SUSTAIN=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the ability to
-remove modules which are "sustained". Used by the check_status()
-function in /sbin/lrm. When set to on this disallows removing of
-modules that would cause terrible malfunctions. eg glibc, gcc,
-and bash, to name some obvious ones.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">VIEW_REPORTS=off<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the report()
-function in /var/lib/lunar/subroutines. If set to on then you will be
-prompted whether to view reports before and after installation.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">VOYEUR=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) real time
-compiler output. Used by the activate_voyeur() function in /sbin/lin.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">REAP=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) the deletion
-of files when removing modules. Used by the reaper() function in
-/var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">GARBAGE=on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) mass handling
-of documentation when installing modules. GARBAGE=on insures that the
-maximum amount of documentation will be gathered and store in
-/usr/share/docs/$module_name. It is used by the gather_docs() function
-in /var/lib/lunar/functions/postbuild.lunar.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">color on<br>
- </td>
- <td style="vertical-align: top;">Turns on (or off) color output
-from /sbin/lin. Used by the color() function in
-/var/lib/lunar/subroutines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">VERBOSE=on<br>
- </td>
- <td style="vertical-align: top;">Toggles verbose mode for
-/sbin/lget and /sbin/lrm. Used by the functions sedit(), unpack(),
-save_libraries(), release_saved_libraries(), rm_source_dir(),
-mk_source_dir(), validate_source_dir(), bad_flags(), patch_it(),
-default_pre_build(), default_config(), default_make(), default_build(),
-remove_module(), add_module(), and prune() in
-/var/lib/lunar/subroutines as well as run_module_file() in
-/var/lib/lunar/functions/modules.lunar and gather_docs(), and
-install_pam_confs() in /var/lib/lunar/functions/postbuild.lunar.<br>
- </td>
- </tr>
- </tbody>
-</table>
-<br>
-</td>
-<hr style="width: 100%; height: 2px;">© 2003, <a
- href="http://lunar-linux.org">Lunar-Linux.org</a><br>
-Written by: Chuck Mead <csm at lunar-linux.org><br>
-Last edited: 17 Feb 2003
-</body>
-</html>
diff --git a/usr/share/doc/lunar/core-documentation/etc_lunar_config.html b/usr/share/doc/lunar/core-documentation/etc_lunar_config.html
deleted file mode 100644
index 3bc6a87..0000000
--- a/usr/share/doc/lunar/core-documentation/etc_lunar_config.html
+++ /dev/null
@@ -1,426 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-1">
- <title>/etc/lunar/config</title>
- <meta name="author" content="Chuck Mead">
- <meta name="description"
- content="Contains the the initial defines required for the lunar core's operation.">
-</head>
-<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
- link="#0000ff" alink="#000088" vlink="#ff0000">
-<h2>File Name: /etc/lunar/config </h2>
-<br>
-Contains the initial defines required for the entirety of the Lunar
-core toolset's operation.<br>
-<br>
-The following tables contain a list of global variables defined for use
-throughout the Lunar tool set. These are used by <a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lget">/sbin/lget</a>,<a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lin">/sbin/lin</a>,<a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lrm">/sbin/lrm</a>,<a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lunar">/sbin/lunar</a>,
-and <a href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lvu">/bin/lvu</a>
-and many of the <a href="#SUBROUTINES">subroutines</a> and <a
- href="#FUNCTIONS">functions</a> which make up the toolset.<br>
-<br>
-<h3>Environmental Defines</h3>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 100%;">
- <tbody>
- <tr>
- <td style="vertical-align: top;">
- <h3>Define</h3>
- </td>
- <td style="vertical-align: top;">
- <h3>Explanation</h3>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;"><a name="DIALOGRC"></a>DIALOGRC=/etc/lunar/dialogrc</td>
- <td style="vertical-align: top;">Configuration file for the
-dialog binary used by the lunar core tools.<br>
- </td>
- </tr>
- </tbody>
-</table>
-<br>
-<h3>Global Variable Defines</h3>
-<br>
-<table cellpadding="2" cellspacing="2" border="1"
- style="text-align: left; width: 100%;">
- <tbody>
- <tr>
- <td style="vertical-align: top;">
- <h3>Define</h3>
- </td>
- <td style="vertical-align: top;">
- <h3>Explanation</h3>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">CONFIG_CACHE=/etc/lunar/local</td>
- <td style="vertical-align: top;">Directory containing configs
-which are system specific.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;"><a name="LOCAL_CONFIG"></a>LOCAL_CONFIG=/etc/lunar/local/config<br>
- </td>
- <td style="vertical-align: top;">File containing system specific
-local defines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">DEPENDS_CONFIG=/etc/lunar/local/depends<br>
- </td>
- <td style="vertical-align: top;">Each file in this directory
-contains information about how the module was configured at install time.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">LOCAL_EXCLUDED=/etc/lunar/local/excluded<br>
- </td>
- <td style="vertical-align: top;">Local list of files that are
-excluded during a lin or lrm.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MIRRORS=/etc/lunar/mirrors<br>
- </td>
- <td style="vertical-align: top;">List of mirrors known to contain
-alternate download locations for sources.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">LUNAR_MODULES="lunar theedge"<br>
- </td>
- <td style="vertical-align: top;">Two versions of Lunar core tools.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">BUILD_DIRECTORY=/usr/src<br>
- </td>
- <td style="vertical-align: top;">The directory Lunar uses to
-build modules.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">DOCUMENT_DIRECTORY=/usr/share/doc<br>
- </td>
- <td style="vertical-align: top;">Location for documentation.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">EXCLUDED=/var/lib/lunar/excluded</td>
- <td style="vertical-align: top;">Default list of files that are
-excluded during a lin or lrm.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;"><a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=moonbase">MOONBASE</a>=/var/lib/lunar/moonbase<br>
- </td>
- <td style="vertical-align: top;">Default location of the moonbase
-(may be over ridden in /etc/lunar/local/config).<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">PROTECTED=/var/lib/lunar/protected<br>
- </td>
- <td style="vertical-align: top;">Contains a list of files that
-will not be removed.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SOLO=/var/lib/lunar/solo<br>
- </td>
- <td style="vertical-align: top;">List of modules which cannot be
-compiled while other modules are being installed.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;"><a name="SUBROUTINES"></a>SUBROUTINES=/var/lib/lunar/subroutines<br>
- </td>
- <td style="vertical-align: top;">File containing core subroutines
-which are used by many of the core tools. It sources all of the files in <a
- href="#FUNCTIONS">$FUNCTIONS</a>.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;"><a name="FUNCTIONS"></a>FUNCTIONS=/var/lib/lunar/functions<br>
- </td>
- <td style="vertical-align: top;">Directory containing <a
- href="#SUBROUTINES">subroutines</a> in separate files<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MENUS=/var/lib/lunar/menu<br>
- </td>
- <td style="vertical-align: top;">Directory containing shell
-scripts which generate menus used by <a href="#DIALOGRC">dialog</a> for
-the lunar menuing system.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SUSTAINED=/var/lib/lunar/sustained<br>
- </td>
- <td style="vertical-align: top;">List of modules that are
-essential to system. Removal of these modules is not permitted.
-Installing and upgrading is fine.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SOUND_DIRECTORY=/var/lib/lunar/sound<br>
- </td>
- <td style="vertical-align: top;">Directory which stores sound
-themes for the lunar tools.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">SOUND_THEME=startrek<br>
- </td>
- <td style="vertical-align: top;">Current sound theme for use by
-the subroutines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">BOOST_LOCK=/var/lock/boost<br>
- </td>
- <td style="vertical-align: top;">Locks the archive and track
-functions so they are never run in parallel.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">ACTIVITY_LOG=/var/log/lunar/activity<br>
- </td>
- <td style="vertical-align: top;">Log file which is written to by
-various lunar <a href="#SUBROUTINES">subroutines</a> to record actions
-executed by the lunar tools.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">INSTALL_LOGS=/var/log/lunar/install<br>
- </td>
- <td style="vertical-align: top;">Directory containing log files
-which record the installation of modules.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">COMPILE_LOGS=/var/log/lunar/compile<br>
- </td>
- <td style="vertical-align: top;">Directory containing log files
-which record the compilation of modules.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MD5SUM_LOGS=/var/log/lunar/md5sum<br>
- </td>
- <td style="vertical-align: top;">Directory containing md5sums for
-modules which use them.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">INSTALL_QUEUE=/var/log/lunar/queue/install<br>
- </td>
- <td style="vertical-align: top;">This file holds the the queues
-for installation that are used by the lunar core tools.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">REMOVE_QUEUE=/var/log/lunar/queue/remove<br>
- </td>
- <td style="vertical-align: top;">This file holds the the queues
-for removal that are used by the lunar core tools.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">DEPENDS_STATUS=/var/state/lunar/depends<br>
- </td>
- <td style="vertical-align: top;">Flat file dependency database
-for lunar.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">DEPENDS_STATUS_BACKUP=/var/state/lunar/depends.backup<br>
- </td>
- <td style="vertical-align: top;">Backup flat file dependency
-database for lunar.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MODULE_STATUS=/var/state/lunar/packages<br>
- </td>
- <td style="vertical-align: top;">List of installed modules with
-their install date and version info.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MODULE_STATUS_BACKUP=/var/state/lunar/packages.backup<br>
- </td>
- <td style="vertical-align: top;">Backup list of installed modules
-with their install date and version info.</td>
- </tr>
- <tr>
- <td style="vertical-align: top; text-align: left;">MODULE_INDEX=/var/state/lunar/module.index<br>
- </td>
- <td style="vertical-align: top;">Module list which contains the
-moonbase group to which each module belongs.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top; text-align: left;">INSTALL_CACHE=/var/cache/lunar<br>
- </td>
- <td style="vertical-align: top;">Backup copy of compiled modules
-which are installed on the system.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top; text-align: left;">SOURCE_CACHE=${SOURCE_CACHE:=/var/spool/lunar}<br>
- </td>
- <td style="vertical-align: top;">If the value of $SOURCE_CACHE is
-empty make it equal to /var/spool/lunar else it continues to equal the
-value of its previous define.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top; text-align: left;">LIN=lin<br>
- </td>
- <td style="vertical-align: top;">The name of the script used to
-install lunar modules.</td>
- </tr>
- <tr>
- <td style="vertical-align: top; text-align: left;">ARCHIVE=${ARCHIVE:=on}<br>
-AUTOFIX=${AUTOFIX:=on}<br>
-AUTOPRUNE=${AUTOPRUNE:=off}<br>
-MAIL_REPORTS=${MAIL_REPORTS:=off}<br>
-PRESERVE=${PRESERVE:=on}<br>
-REAP=${REAP:=on}<br>
-ADMIN=${ADMIN:=root}<br>
-SOUND=${SOUND:=off}<br>
-SUSTAIN=${SUSTAIN:=on}<br>
-VIEW_REPORTS=${VIEW_REPORTS:=on}<br>
-VOYEUR=${VOYEUR:=on}<br>
-GARBAGE=${GARBAGE:=on}<br>
-PROMPT_DELAY=${PROMPT_DELAY:=150}<br>
-LUNAR_PRIORITY="+10"<br>
-MAX_SOURCES=100<br>
-LDD_CHECK=${LDD_CHECK:=on}<br>
-FIND_CHECK=${FIND_CHECK:=on}<br>
-MD5SUM_CHECK=${MD5SUM_CHECK:=on}<br>
-SYM_CHECK=${SYM_CHECK:=off}<br>
- </td>
- <td style="vertical-align: top;">A comprehensive list of
-variables which may be locally assigned in /etc/lunar/local/config or by
-using the lunar tool.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">GNU_URL=ftp://ftp.gnu.org/pub/gnu<br>
-KDE_URL=ftp://ftp.kde.org/pub/kde<br>
-GNOME_URL=ftp://ftp.gnome.org/pub/GNOME<br>
-KERNEL_URL=ftp://ftp.kernel.org<br>
-SFORGE_URL=http://telia.dl.sourceforge.net/sourceforge<br>
-XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86<br>
-LRESORT_URL=http://lunar-linux.org/lunar/cache<br>
- </td>
- <td style="vertical-align: top;">URL variables used in modules
-and subroutines.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">MOONBASE_URL=http://lunar-linux.org/lunar/moonbase.tar.bz2<br>
- </td>
- <td style="vertical-align: top;">Direct URL for the default Lunar <a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=moonbase">moonbase</a>.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">PATCH_URL=http://lunar-linux.org/lunar/patches<br>
- </td>
- <td style="vertical-align: top;">Direct URL for all the Lunar
-patches.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">TRACKED="/bin /boot /etc /lib
-/sbin /usr /var /opt/lunar"<br>
- </td>
- <td style="vertical-align: top;">Install locations which are
-tracked (recorded) by the lunar installation routines. Interactive use
-provided mostly by <a
- href="http://lunar-linux.org/cgi-bin/manServer.pl/?q=lvu">lvu</a>.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">DEFAULT="\e[0m"<br>
-BOLD="\e[1m"<br>
-BLACK="\e[30m"<br>
-RED="\e[31m"<br>
-GREEN="\e[32m"<br>
-YELLOW="\e[33m"<br>
-BLUE="\e[34m"<br>
-VIOLET="\e[35m"<br>
-CYAN="\e[36m"<br>
-WHITE="\e[37m"<br>
-MODULE_COLOR="${WHITE}${BOLD}\e[40m"<br>
-VERSION_COLOR="${WHITE}${BOLD}\e[40m"<br>
-QUERY_COLOR="${YELLOW}${BOLD}"<br>
-LRM_COLOR="${YELLOW}${BOLD}"<br>
-CHECK_COLOR="${CYAN}"<br>
-RESURRECT_COLOR="${GREEN}${BOLD}"<br>
-FILE_COLOR="${GREEN}${BOLD}"<br>
-SYMLINK_COLOR="${CYAN}${BOLD}"<br>
-PROBLEM_COLOR="${RED}${BOLD}"<br>
-MESSAGE_COLOR="${BLUE}${BOLD}"<br>
-MESSAGE_COLOR="${CYAN}"<br>
-DEFAULT_COLOR="${DEFAULT}"<br>
- </td>
- <td style="vertical-align: top;">Variables defining the default
-colors used by the Lunar tool set.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">TAB_ENTER_IFS="<br>
-"<br>
- </td>
- <td style="vertical-align: top;">Enabling modification of IFS
-(internal field separator) which is a bash shell default.<br>
- </td>
- </tr>
- <tr>
- <td style="vertical-align: top;">ENTER_IFS="<br>
-"<br>
- </td>
- <td style="vertical-align: top;">Enabling modification of IFS
-(internal field separator) which is a bash shell default.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">STANDARD_IFS="<br>
-"<br>
- </td>
- <td style="vertical-align: top;">Enabling modification of IFS
-(internal field separator) which is a bash shell default.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">. $SUBROUTINES<br>
- </td>
- <td style="vertical-align: top;">Sourcing the <a
- href="#SUBROUTINES">subroutines</a> file
-/var/lib/lunar/subroutines.</td>
- </tr>
- <tr>
- <td style="vertical-align: top;">[ -s "<a href="#LOCAL_CONFIG">$LOCAL_CONFIG</a>"
-] && . <a href="#LOCAL_CONFIG">$LOCAL_CONFIG</a><br>
- </td>
- <td style="vertical-align: top;">If /etc/lunar/local/config
-exists and is not empty it is sourced. Some variables assigned in this
-file may over-ride those assigned here.<br>
- </td>
- </tr>
- </tbody>
-</table>
-<br>
-<hr style="width: 100%; height: 2px;">© 2003, <a
- href="http://lunar-linux.org">Lunar-Linux.org</a><br>
-Written by: Chuck Mead <csm at lunar-linux.org><br>
-Last edited: 16 Feb 2003
-</body>
-</html>
diff --git a/usr/share/doc/lunar/core-documentation/purpose.html b/usr/share/doc/lunar/core-documentation/purpose.html
deleted file mode 100644
index cd99812..0000000
--- a/usr/share/doc/lunar/core-documentation/purpose.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-1">
- <title>Purpose</title>
- <meta name="description"
- content="this is a sub-document describing the purpose of the Lunar Core documentation tree">
-</head>
-<body>
-<h1>Purpose</h1>
-<h2>Introduction</h2>
-<br>
-The purpose of this documentation is to begin the process of unraveling
-the purpose and structure of all the files, defines and functions of
-the lunar core code.<br>
-<br>
-<h2>Method</h2>
-<br>
-We will start at the bottom file in the lunar core tree, invert it and
-grow downward from there.<br>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;">© 2003, <a
- href="http://lunar-linux.org">Lunar-Linux.org</a><br>
-Written by: Chuck Mead <csm at lunar-linux.org><br>
-Last edited: 16 Feb 2003<br>
-</body>
-</html>
diff --git a/usr/share/doc/lunar/gpl.html b/usr/share/doc/lunar/gpl.html
deleted file mode 100644
index 973727c..0000000
--- a/usr/share/doc/lunar/gpl.html
+++ /dev/null
@@ -1,553 +0,0 @@
-<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
-<HTML>
-<HEAD>
-<TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE>
-<LINK REV="made" HREF="mailto:webmasters at www.gnu.org">
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD">
-<H1>GNU General Public License</H1>
-<A HREF="/graphics/philosophicalgnu.html"><IMG SRC="/graphics/philosophical-gnu-sm.jpg"
- ALT=" [image of a Philosophical GNU] "
- WIDTH="160" HEIGHT="200"></A>
-
-<!-- Please keep this list alphabetical -->
-<!-- tower, gpl.ja.html is Japanese translation of THIS PAGE, -->
-<!-- NOT translation of GPL itself(gpl.ja.html contains the original -->
-<!-- English version). So please do not remove the following. -->
-<!-- Thanks -mhatta -->
-[
- <A HREF="/copyleft/gpl.html">English</A>
-| <A HREF="/copyleft/gpl.ja.html">Japanese</A>
-]
-
-<!-- It is best to not enumerate the translations here in a menu bar, -->
-<!-- It is best to have the users follow this link, so they have the FSF' -->
-<!-- explanation about translations being unofficial, etc. -->
-
-<P>
-<UL>
- <LI><A HREF="/copyleft/gpl-violation.html"><EM>What to do if you see a
- possible GPL violation</EM></A>
- <LI><A HREF="/copyleft/copyleft.html#translations"><EM>Translations
- of the GPL</EM></A>
- <LI><A HREF="/copyleft/gpl-faq.html"><EM>GPL Frequently Asked Questions</EM></A>
- <LI>The GNU General Public License (GPL)
- <A HREF="/copyleft/gpl.txt">in plain text format</A>
- <LI>The GNU General Public License (GPL)
- <A HREF="/copyleft/gpl.texi">in Texinfo format</A>
-</UL>
-<P>
-<HR>
-
-<P>
-
-<H2>Table of Contents</H2>
-<UL>
-
- <LI><A NAME="TOC1" HREF="gpl.html#SEC1">GNU GENERAL PUBLIC LICENSE</A>
-<UL>
-<LI><A NAME="TOC2" HREF="gpl.html#SEC2">Preamble</A>
-<LI><A NAME="TOC3" HREF="gpl.html#SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A>
-<LI><A NAME="TOC4" HREF="gpl.html#SEC4">How to Apply These Terms to Your New Programs</A>
-
-</UL>
-</UL>
-
-<P>
-
-<HR>
-
-<P>
-
-
-
-<H2><A NAME="SEC1" HREF="gpl.html#TOC1">GNU GENERAL PUBLIC LICENSE</A></H2>
-<P>
-Version 2, June 1991
-
-</P>
-
-<PRE>
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-</PRE>
-
-
-
-<H2><A NAME="SEC2" HREF="gpl.html#TOC2">Preamble</A></H2>
-
-<P>
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
-</P>
-<P>
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-</P>
-<P>
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-</P>
-<P>
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
-</P>
-<P>
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-</P>
-<P>
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-</P>
-<P>
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-</P>
-<P>
- The precise terms and conditions for copying, distribution and
-modification follow.
-
-</P>
-
-
-<H2><A NAME="SEC3" HREF="gpl.html#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A></H2>
-
-
-<P>
-
-<STRONG>0.</STRONG>
- This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-<P>
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-<P>
-
-<STRONG>1.</STRONG>
- You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-<P>
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-<P>
-
-<STRONG>2.</STRONG>
- You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-<P>
-
-<UL>
-
-<LI><STRONG>a)</STRONG>
- You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
-<P>
-<LI><STRONG>b)</STRONG>
- You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
-<P>
-<LI><STRONG>c)</STRONG>
- If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-</UL>
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-<P>
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-<P>
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-<P>
-
-<STRONG>3.</STRONG>
- You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-
-<!-- we use this doubled UL to get the sub-sections indented, -->
-<!-- while making the bullets as unobvious as possible. -->
-<UL>
-
-<LI><STRONG>a)</STRONG>
- Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
-<P>
-<LI><STRONG>b)</STRONG>
- Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
-<P>
-<LI><STRONG>c)</STRONG>
- Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-</UL>
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-<P>
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-<P>
-
-<STRONG>4.</STRONG>
- You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-<P>
-
-<STRONG>5.</STRONG>
- You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-<P>
-
-<STRONG>6.</STRONG>
- Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-<P>
-
-<STRONG>7.</STRONG>
- If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-<P>
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-<P>
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-<P>
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-<P>
-
-<STRONG>8.</STRONG>
- If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-<P>
-
-<STRONG>9.</STRONG>
- The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-<P>
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-<P>
-
-
-<STRONG>10.</STRONG>
- If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-
-
-<P><STRONG>NO WARRANTY</STRONG></P>
-
-<P>
-
-<STRONG>11.</STRONG>
- BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-<P>
-
-<STRONG>12.</STRONG>
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-<P>
-
-
-<H2>END OF TERMS AND CONDITIONS</H2>
-
-
-
-<H2><A NAME="SEC4" HREF="gpl.html#TOC4">How to Apply These Terms to Your New Programs</A></H2>
-
-<P>
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-</P>
-<P>
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-</P>
-
-<PRE>
-<VAR>one line to give the program's name and an idea of what it does.</VAR>
-Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR>
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-</PRE>
-
-<P>
-Also add information on how to contact you by electronic and paper mail.
-
-</P>
-<P>
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-</P>
-
-<PRE>
-Gnomovision version 69, Copyright (C) <VAR>year</VAR> <VAR>name of author</VAR>
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'. This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c'
-for details.
-</PRE>
-
-<P>
-The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show
-the appropriate parts of the General Public License. Of course, the
-commands you use may be called something other than <SAMP>`show w'</SAMP> and
-<SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever
-suits your program.
-
-</P>
-<P>
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
-</P>
-
-<PRE>
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written
-by James Hacker.
-
-<VAR>signature of Ty Coon</VAR>, 1 April 1989
-Ty Coon, President of Vice
-</PRE>
-
-<P>
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-<HR>
-
-Return to <A HREF="/home.html">GNU's home page</A>.
-<P>
-FSF & GNU inquiries & questions to
-<A HREF="mailto:gnu at gnu.org"><EM>gnu at gnu.org</EM></A>.
-Other <A HREF="/home.html#ContactInfo">ways to contact</A> the FSF.
-<P>
-Comments on these web pages to
-<A HREF="mailto:webmasters at www.gnu.org"><EM>webmasters at www.gnu.org</EM></A>,
-send other questions to
-<A HREF="mailto:gnu at gnu.org"><EM>gnu at gnu.org</EM></A>.
-<P>
-Copyright notice above.<BR>
-Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111, USA
-<P>
-Updated:
-<!-- hhmts start -->
-31 Jul 2000 jonas
-<!-- hhmts end -->
-<HR>
-</BODY>
-</HTML>
diff --git a/usr/share/doc/lunar/module-example/BUILD b/usr/share/doc/lunar/module-example/BUILD
deleted file mode 100644
index ae0eae2..0000000
--- a/usr/share/doc/lunar/module-example/BUILD
+++ /dev/null
@@ -1,42 +0,0 @@
-(
-
- if module_installed Linux-PAM; then
- WITH_PAM="--with-pam"
- fi
-
-set -x
-
- ./configure --sysconfdir=/etc \
- --prefix=/usr \
- --mandir=/usr/share/man \
- --localstatedir=/var \
- --with-everything \
- $WITH_PAM \
- $OPTS &&
-
-set +x
-
- make &&
- prepare_install &&
- make install
-
-) > $C_FIFO 2>&1 && (
-
-
- if [ ! -f /etc/ftplockout ]
- then cp pam/ftplockout /etc
- fi
-
- if ! [ -e /etc/init.d/pure-ftpd ]; then
- cp $SCRIPT_DIRECTORY/pure-ftpd /etc/init.d
- fi
-
- case $FTPD_BOOT in
- y|Y) chkconfig --add pure-ftpd
- ;;
-
- *) true
- ;;
- esac
-
-)
diff --git a/usr/share/doc/lunar/module-example/CONFIGURE b/usr/share/doc/lunar/module-example/CONFIGURE
deleted file mode 100644
index 78772b5..0000000
--- a/usr/share/doc/lunar/module-example/CONFIGURE
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CONFIGURE example
-#
-
-# showstopper example: this is for the gcc3 module, which can possibly
-# ruin your box. This example shows a neat way of bailing out elegantly:
-# WARNING_SIGN=${MESSAGE_COLOR}"Caution, installation of gcc3 can severly damage a working stable system. Installation on a mission critial box is not recomended at this point."
-# message $WARNING_SIGN
-#
-# query "Are you sure you want to install?" n
-
-
-# complex example showing the ability of lunar to store and re-use
-# previous configuration settings:
-# if ! grep -q CONFIGURED $MODULE_CONFIG; then
-#
-# if query "Do you want to disable banner? " y
-# then OPTS=$OPTS" --without-banner"
-# fi
-#
-# if query "Do you want to enable large file support? " y
-# then OPTS=$OPTS" --with-largefile"
-# fi
-#
-# echo 'CONFIGURED="y"' >> $MODULE_CONFIG
-# echo 'OPTS='\"$OPTS\" >> $MODULE_CONFIG
-# fi
-
-
diff --git a/usr/share/doc/lunar/module-example/CONFLICTS b/usr/share/doc/lunar/module-example/CONFLICTS
deleted file mode 100644
index 33e5c35..0000000
--- a/usr/share/doc/lunar/module-example/CONFLICTS
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# CONFLICTS example
-#
-
-# single conflicts:
-# conflicts moduleA
-
-# multiple:
-# conflicts moduleA &&
-# conflicts moduleB
-
diff --git a/usr/share/doc/lunar/module-example/DEPENDS b/usr/share/doc/lunar/module-example/DEPENDS
deleted file mode 100644
index 1152f48..0000000
--- a/usr/share/doc/lunar/module-example/DEPENDS
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# DEPENDS example
-#
-
-# always end the line with && except for the last one!
-
-# single depends:
-# depends moduleA
-
-# single optional depends:
-# optional_depends "moduleA" "" "" "For blabla support"
-
-# optional depends that use configure switches:
-# optional_depends "moduleC" \
-# "--with-configure-option" \
-# "--without-configure-option" \
-# "for blabla support"
-
-# multiple depends:
-# depends moduleA &&
-# depends moduleB
-
-# or everything:
-# depends moduleA &&
-# depends moduleB &&
-# optional_depends "moduleC" \
-# "--with-configure-option" \
-# "--without-configure-option" \
-# "for blabla support" &&
-# optional_depends "moduleD" "" "" "For blabla support"
-
diff --git a/usr/share/doc/lunar/module-example/DETAILS b/usr/share/doc/lunar/module-example/DETAILS
deleted file mode 100644
index d598641..0000000
--- a/usr/share/doc/lunar/module-example/DETAILS
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# DETAILS example
-#
-
-# This demonstrates how to put in every possible parameter in a DETAILS
-# file. Note that not everything is required, but a minimum is:
-
-# MODULE name of the module, identical to the name if the
-# directory it resides in
-# VERSION current version number of the package
-# SOURCE the name of the source file
-# SOURCE_DIRECTORY the name of where the source will unpack
-# SOURCE_URL[0] the name of source file
-# WEBSITE the main website of the package
-# ENTERED the date (format yyyymmdd) when it was added
-# UPDATED tha date (format yyyymmdd) when a recompile
-# was needed
-# SHORT a one line description
-
-# and of course the long description that looks like this:
-# cat << EOF
-# blablablabla
-# ....
-# EOF
-
-
-# here's an example with some comments and additions:
-# MODULE=pure-ftpd
-# VERSION=1.0.12
-# SOURCE=$MODULE-$VERSION.tar.gz
-# SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
-# SOURCE_URL[0]=http://telia.dl.sourceforge.net/pureftpd/$SOURCE
-# WEB_SITE=http://www.pureftpd.org
-# ENTERED=20010922
-# UPDATED=20020609
-# MAINTAINER=maintaner at moongroup.com
-# SHORT="An efficient, lightweight, and secure FTP server"
-# cat << EOF
-# Pure FTP Server is a fast, production quality, standards-
-# conformant FTP server based on Troll-FTPd. It has no known
-# buffer overflows, is trivial to set up, and is especially
-# designed for modern kernels. Features include PAM support,
-# IPv6, chroot()ed home directories, virtual domains, built-in
-# 'ls', FXP protocol, anti-warez system, bandwidth throttling,
-# bounded ports for passive downloads, an LDAP backend, XML
-# output, and more.
-# EOF
diff --git a/usr/share/doc/lunar/module-example/POST_BUILD b/usr/share/doc/lunar/module-example/POST_BUILD
deleted file mode 100644
index e69de29..0000000
diff --git a/usr/share/doc/lunar/module-example/POST_INSTALL b/usr/share/doc/lunar/module-example/POST_INSTALL
deleted file mode 100644
index a517af3..0000000
--- a/usr/share/doc/lunar/module-example/POST_INSTALL
+++ /dev/null
@@ -1,10 +0,0 @@
-
-if [ -x /etc/init.d/pure-ftpd.sh ]; then
- rm /etc/init.d/pure-ftpd.sh
-fi
-
-if [ -e "/etc/rc?.d/*pure-ftpd*" ]; then
- rm -f /etc/rc?.d/*pure-ftpd*
-fi
-
-
diff --git a/usr/share/doc/lunar/module-example/POST_REMOVE b/usr/share/doc/lunar/module-example/POST_REMOVE
deleted file mode 100644
index e69de29..0000000
diff --git a/usr/share/doc/lunar/module-example/PRE_BUILD b/usr/share/doc/lunar/module-example/PRE_BUILD
deleted file mode 100644
index e69de29..0000000
diff --git a/usr/share/doc/lunar/module-example/PRE_REMOVE b/usr/share/doc/lunar/module-example/PRE_REMOVE
deleted file mode 100644
index da624a7..0000000
--- a/usr/share/doc/lunar/module-example/PRE_REMOVE
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -x /etc/init.d/pure-ftpd ]; then
- chkconfig --del pure-ftpd
-fi
diff --git a/usr/share/doc/lunar/module-example/README b/usr/share/doc/lunar/module-example/README
deleted file mode 100644
index c8f3eba..0000000
--- a/usr/share/doc/lunar/module-example/README
+++ /dev/null
@@ -1,124 +0,0 @@
-
- README for the skeleton module
-
---
-NOTE: all files have been disabled by putting '#' comments in them,
-if you wish to use the examples in this directory, please remove the
-comments and modify it carefully so the module does exactly what you
-think it does.
-
---
-This skeleton module was compiled from various modules in the moonbase
-and gives a wide range of what is possible when you write modules. I
-tried to include virtually every possible scheme but apart from the
-BUILD files most stuff is pretty straightforward.
-
-If you have any additions or comments on this file please notice us
-by dropping a mail in the lunar mailinglist. Anything is greatly
-appreciated!
-
---
-Here's a brief explanation of the files in here:
-
-* DETAILS
-
-Required for any module. This file contains the data needed to obtain,
-describe and update a package. In here vital information like download
-URL's, version numbers and package description is put.
-
-* DEPENDS
-
-This file lists packages that need to be installed before you can install
-this package. It doesn not necessary have to be a library, but can also
-be include files or anything that you would need to compile, install
-and run the module.
-
-In here you can als list optional depends, being packages that do not
-necessary have to be installed, for instance packages that add extra
-features (e.g. fonts, plugins etc.).
-
-* CONFLICTS
-
-Modules listed in here must not be present when installing this module.
-Use this to separate your module from incompatible other ones. For instance
-the BitchX module is incompatible with the gtk version gtkBitchX, so
-these 2 modules have eachother listed in their CONFLICTS file. Another
-good example is conflicting daemons like sendmail vs. exim, cron vs.
-hc-cron etc.
-
-* BUILD
-
-This script will configure, make and install the package. You can virtually
-control everything in here, like adding patches (kernel), changing build
-options (xfree86) or asking the user for configuration options (sendmail).
-This script does not have to exist for programs that ./configure && make &&
-make install (lin will automatically --prefix=/usr for you), but a lot of
-modules need adjusting.
-
-* CONFIGURE
-
-This file serves as an alternative way to customize the configuring of the
-package.
-
-* PRE_BUILD
-
-This file is used if you need to apply patches or modifications before
-the package is built.
-
-* POST_BUILD
-
-Use this file if you need to tweak the compiles sources before it is
-installed.
-
-* POST_INSTALL
-
-When you need to additionally tweak things after installation, this is
-the place. Actions in this file are not logged in the install log, so
-you can e.g. create machine dependant configuration options that need
-to be kept in case of module removal.
-
-This is also the place to install and run daemons, reconfigure LILO etc..
-
-* PRE_REMOVE
-
-This script will be called before a module is lrm'ed. You can use it to
-back up configuration, stop daemons or similar stuff.
-
-* POST_REMOVE
-
-Use this file to clean stuff up after removing a module, or place
-configuration files in a backup location, etc..
-
-* other files and directories
-
-Nothing withholds you from putting much more stuff in your module directory,
-think of patches, small scripts, init.d scripts, xinetd or pam.d configuration
-files, or funky ascii art to make your module install look nice.
-
-As a general rule you must try to keep the module as small as possible
-however. For instance, if you were to put a 100K patch in the module
-directory, every lunar update requires that people download those
-100K, whether they use your patch or not. If you must, try to provide
-the patch or extra source code in a way that we can put it on our source
-mirror, or insert it as a secondary source URL in case someone has
-already provided it on the internet. This will save us from a lot of
-frustration.
-
-Some contents of subdirs are automatically handled, here's a list:
-
- - pam.d - for pam settings
- - xinetd.d - for xinetd service definitions
- - init.d - for init.d startup scripts
- - profile.d - for bash shell settings
- - plugin.d - for lunar code plugins
- - skel - for /etc/skel/ files
-
-
-The file 'services' can be used to add tcp/ip or udp service port
-definitions automatically in coherence with xinetd.d to the
-/etc/services global file
-
-
-
---
-sofar 20020725
diff --git a/usr/share/doc/lunar/module-example/init.d/README b/usr/share/doc/lunar/module-example/init.d/README
deleted file mode 100644
index 3502c5d..0000000
--- a/usr/share/doc/lunar/module-example/init.d/README
+++ /dev/null
@@ -1,5 +0,0 @@
-
-This directory contains some init.d scripts that need to be installed
-if you want to run a daemon at startup. Please make your init scripts
-work with chkconfig, so they can be easily installed and removed!
-
diff --git a/usr/share/doc/lunar/module-example/init.d/ntp b/usr/share/doc/lunar/module-example/init.d/ntp
deleted file mode 100644
index 9833fdb..0000000
--- a/usr/share/doc/lunar/module-example/init.d/ntp
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# ntp.sh
-# chkconfig: 2345 31 88
-# description: NTP is used to synchronize computer clocks
-# on a connected network or via GPS/phone/etc.
-
-if ! [ -d /etc/config.d ]; then
- mkdir -p /etc/config.d
- fi
-
-case "$1" in
-'start')
- if pgrep ntpd
- then
- echo "ntp daemon already running. ntp start aborted"
- exit 0
- fi
- if [ -f /etc/config.d/ntp.conf -a -x /usr/sbin/ntpd ]
- then
- /usr/sbin/ntpd -c /etc/config.d/ntp.conf -g
- fi
- ;;
-'stop')
- pkill ntpd
- ;;
-*)
- echo "Usage: $0 { start | stop }"
- ;;
-esac
diff --git a/usr/share/doc/lunar/module-example/init.d/pure-ftpd b/usr/share/doc/lunar/module-example/init.d/pure-ftpd
deleted file mode 100644
index 0cd436d..0000000
--- a/usr/share/doc/lunar/module-example/init.d/pure-ftpd
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-#
-# Startup script for the pure-ftpd FTP Server
-#
-# chkconfig: 2345 85 15
-# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
-# processname: pure-ftpd
-# pidfile: /var/run/pure-ftpd.pid
-
-PURE_PID=/var/run/pure-ftpd.pid
-
-case $1 in
- start|restart) echo "$1ing pure-ftpd, ftp daemon.."
- [ -e "$PURE_PID" ] && kill `cat $PURE_PID`
- pure-ftpd -b -B
- ;;
-
- stop) echo "$1ping pure-ftpd."
- [ -e "$PURE_PID" ] && kill `cat $PURE_PID`
- ;;
-
- *) echo "Usage: $0 {start|stop|restart}"
- ;;
-esac
diff --git a/usr/share/doc/lunar/module-example/init.d/sshd b/usr/share/doc/lunar/module-example/init.d/sshd
deleted file mode 100644
index 79201e1..0000000
--- a/usr/share/doc/lunar/module-example/init.d/sshd
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-#
-# ssh Secure Shell Daemon
-#
-# chkconfig: 2345 80 30
-# description: SSH daemon
-# processname: master
-# pidfile: /var/run/sendmail.pid
-# config: /etc/mail/sendmail.cf
-
-if [ -e "/var/run/sshd.pid" ]; then
- SPID=`cat /var/run/sshd.pid`
-fi
-
-case $1 in
- start) echo "$1ing sshd."
- sshd
- ;;
- stop) echo "$1ping sshd."
- if [ -e "/var/run/sshd.pid" ]; then
- kill -n 15 $SPID
- fi
- ;;
- restart) $0 stop && $0 start
- ;;
- *) echo "Usage: $0 {start|stop|restart}"
- ;;
-esac
-
diff --git a/usr/share/doc/lunar/module-example/pam.d/README b/usr/share/doc/lunar/module-example/pam.d/README
deleted file mode 100644
index 9857b5b..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/README
+++ /dev/null
@@ -1,4 +0,0 @@
-
-The pam.d directory can contain PAM config files. They will automatically
-be installed in /etc/pam.d if you provide them in a module.
-
diff --git a/usr/share/doc/lunar/module-example/pam.d/chfn b/usr/share/doc/lunar/module-example/pam.d/chfn
deleted file mode 100644
index aa93e1a..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/chfn
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# The PAM configuration file for the `chfn' service
-#
-auth required pam_unix.so nullok
-account required pam_unix.so
-session required pam_unix.so
-password required pam_cracklib.so retry=3 type=Lunar
diff --git a/usr/share/doc/lunar/module-example/pam.d/chsh b/usr/share/doc/lunar/module-example/pam.d/chsh
deleted file mode 100644
index d9624e2..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/chsh
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# The PAM configuration file for the `chsh' service
-#
-auth required pam_unix.so nullok
-account required pam_unix.so
-session required pam_unix.so
-password required pam_cracklib.so retry=3 type=Lunar
-password required pam_unix.so shadow md5 use_authtok
diff --git a/usr/share/doc/lunar/module-example/pam.d/ftp b/usr/share/doc/lunar/module-example/pam.d/ftp
deleted file mode 100644
index 2665e50..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/ftp
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# The PAM configuration file for the `ftp' service
-#
-auth requisite pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
-auth sufficient pam_ftp.so
-auth required pam_unix.so shadow nullok use_first_pass
-auth requisite pam_shells.so
-account required pam_unix.so
-session required pam_unix.so
-session required pam_limits.so
diff --git a/usr/share/doc/lunar/module-example/pam.d/gdm b/usr/share/doc/lunar/module-example/pam.d/gdm
deleted file mode 100644
index 0594795..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/gdm
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# The PAM configuration file for the `gdm' service
-#
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/usr/share/doc/lunar/module-example/pam.d/passwd b/usr/share/doc/lunar/module-example/pam.d/passwd
deleted file mode 100644
index a94e993..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/passwd
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# The PAM configuration file for the `passwd' service
-#
-password requisite pam_cracklib.so retry=3 type=Lunar
-password required pam_unix.so shadow md5 use_authtok
diff --git a/usr/share/doc/lunar/module-example/pam.d/samba b/usr/share/doc/lunar/module-example/pam.d/samba
deleted file mode 100644
index 0c68447..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/samba
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# The PAM configuration file for the `samba' service
-#
-auth required pam_unix.so
-account required pam_unix.so
diff --git a/usr/share/doc/lunar/module-example/pam.d/shadow b/usr/share/doc/lunar/module-example/pam.d/shadow
deleted file mode 100644
index 5f21b53..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/shadow
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# The PAM configuration file for the `shadow' service
-#
-auth sufficient pam_rootok.so
-auth required pam_unix_auth.so
-account required pam_unix.so
-password required pam_permit.so
diff --git a/usr/share/doc/lunar/module-example/pam.d/su b/usr/share/doc/lunar/module-example/pam.d/su
deleted file mode 100644
index 99baf6f..0000000
--- a/usr/share/doc/lunar/module-example/pam.d/su
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# The PAM configuration file for the `su' service
-#
-# auth required pam_wheel.so
-auth sufficient pam_rootok.so
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/usr/share/doc/lunar/module-example/profile.d/example.rc b/usr/share/doc/lunar/module-example/profile.d/example.rc
deleted file mode 100644
index 4d10ce2..0000000
--- a/usr/share/doc/lunar/module-example/profile.d/example.rc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# Example.rc
-
-# put any custom bash settings in here you wish to add to shell
-# variables:
-
-# PATH=${PATH}:/opt/lunar/mypackage/bin
-
-# export MYVAR=value
-
diff --git a/usr/share/doc/lunar/module-example/services b/usr/share/doc/lunar/module-example/services
deleted file mode 100644
index 97efdfb..0000000
--- a/usr/share/doc/lunar/module-example/services
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# services example
-#
-
-# lines in this file will be AUTOMATICALLY appended to /etc/services, e.g.:
-# ftp-data 20/tcp
-# ftp 21/tcp
-
diff --git a/usr/share/doc/lunar/module-example/xinetd.d/README b/usr/share/doc/lunar/module-example/xinetd.d/README
deleted file mode 100644
index ed8fa9b..0000000
--- a/usr/share/doc/lunar/module-example/xinetd.d/README
+++ /dev/null
@@ -1,6 +0,0 @@
-
-xinetd.d has a config file for every service it runs (and port it
-should listen on of course). these config scripts look like the one
-in this directory. They weill automatically be installed into the
-/etc/xinetd.d/ for you if you provide them in here.
-
diff --git a/usr/share/doc/lunar/module-example/xinetd.d/exim b/usr/share/doc/lunar/module-example/xinetd.d/exim
deleted file mode 100644
index f1ac480..0000000
--- a/usr/share/doc/lunar/module-example/xinetd.d/exim
+++ /dev/null
@@ -1,15 +0,0 @@
-service smtp
-{
- socket_type = stream
- protocol = tcp
- wait = no
- user = mail
- group = mail
- server = /usr/sbin/exim
- server_args = -bs
- per_source = 8
- log_type = FILE /var/log/xinetd/exim
- log_on_success = PID HOST USERID EXIT DURATION
- log_on_failure = USERID ATTEMPT
-
-}
diff --git a/usr/share/doc/lunar/module-example/xinetd.d/proftpd b/usr/share/doc/lunar/module-example/xinetd.d/proftpd
deleted file mode 100644
index 192cc17..0000000
--- a/usr/share/doc/lunar/module-example/xinetd.d/proftpd
+++ /dev/null
@@ -1,13 +0,0 @@
-service ftp
-{
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /usr/sbin/proftpd
- server_args =
- per_source = 8
- log_type = FILE /var/log/xinetd/proftpd
- log_on_success = PID HOST USERID EXIT DURATION
- log_on_failure = USERID ATTEMPT
-}
diff --git a/usr/share/doc/lunar/module-example/xinetd.d/pure-ftpd b/usr/share/doc/lunar/module-example/xinetd.d/pure-ftpd
deleted file mode 100644
index 4aed112..0000000
--- a/usr/share/doc/lunar/module-example/xinetd.d/pure-ftpd
+++ /dev/null
@@ -1,14 +0,0 @@
-service ftp
-{
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- disable = no
- server = /usr/sbin/pure-ftpd
- server_args = -b
- per_source = 8
- log_type = FILE /var/log/xinetd/pure-ftpd
- log_on_success = PID HOST USERID EXIT DURATION
- log_on_failure = USERID ATTEMPT
-}
diff --git a/usr/share/man/man1/lvu.1 b/usr/share/man/man1/lvu.1
deleted file mode 100644
index 6c6087d..0000000
--- a/usr/share/man/man1/lvu.1
+++ /dev/null
@@ -1,312 +0,0 @@
-.TH "LVU" "1" "June 2009" "Lunar Linux" "LUNAR"
-.SH "NAME"
-lvu \- query/view lunar package management information
-.SH "SYNOPSIS"
-.B lvu
-alien|leafs|orphans|pam
-.PP
-.B lvu
-cd|what|where|website|sources|urls|maintainer|version <module>
-.PP
-.B lvu
-compile|compiler|links|install|sum|md5sum <module>
-.PP
-.B lvu
-export|import [snapshot]
-.PP
-.B lvu
-moonbase|html|updatelog|activity
-.PP
-.B lvu
-search "phrase"
-.PP
-.B lvu
-service port|acronym
-.PP
-.B lvu
-newer|older <yyyymmdd>
-.PP
-.B lvu
-from <path/file>
-.PP
-.B lvu
-installed [module]
-.PP
-.B lvu
-conflicts
-.PP
-.B lvu
-held|exiled|expired
-.PP
-.B lvu
-section [section]
-.PP
-.B lvu
-voyeur [delay or module]
-.PP
-.B lvu
-depends <module>
-.PP
-.B lvu
-tree <module>
-.PP
-.B lvu
-eert <module>
-.PP
-.B lvu
-size [module]
-.PP
-.B lvu
-new|submit|edit|unedit [module]
-.PP
-.B lvu
-$MODULE_SCRIPT <module>
-.SH "COPYRIGHT"
-.if n lvu(1) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
-.if n lvu(1) also contains material which is Copyright (C) Lunar\-Linux team.
-
-.SH "DESCRIPTION"
-.I lvu
-is part of the lunar source\-based package management suite. It is a general purpose command\-line tool for displaying package logs, version information, checking for installed packages, checksums, message digests, maintainer information, package URL information, displaying new packages, untracked files, sections, searching for files that are installed, finding when modules were created and packages in the software catalogue. It can even take and retrieve snapshots of currently installed packages for easy duplication.
-.SH "OPTIONS"
-.B alien
-.IP
-find and display all files which are not currently tracked by the lunar package management system
-.PP
-.B leafs
-.IP
-displays installed modules that have no explicit dependencies on them
-.PP
-.B orphans
-.IP
-displays installed modules that are missing required dependencies
-.PP
-.B pam
-.IP
-display modules installed that are pam aware
-.PP
-.B cd
-<module>
-.IP
-changes current directory to the given module and execs a new shell
-.PP
-.B what
-<module>
-.IP
-view the long package description
-.PP
-.B where
-<module>
-.IP
-display the section a module belongs to
-.PP
-.B website
-<module>
-.IP
-display the URL for the specified module
-.PP
-.B sources
-<module>
-.IP
-list all source files contained in a module
-.PP
-.B urls
-<module>
-.IP
-list all URLs for a module
-.PP
-.B maintainer
-<module>
-.IP
-display the email address of the person currently responsible for maintaining a specified module
-.PP
-.B version
-<module>
-.IP
-display version of module in moonbase
-.PP
-.B compile
-<module>
-.IP
-show the compiler output generated when the module was built
-.PP
-.B compiler
-<module>
-.IP
-display the version of compiler used for creating the ELF files in modules
-.PP
-.B links
-<module>
-.IP
-display the modules that this module's ELF binary files actually links to
-.PP
-.B install
-<module>
-.IP
-used to determine what files were installed by a module and where those files are located
-.PP
-.B conflicts
-.IP
-display modules with conflicting files
-.PP
-.B held
-.IP
-display held modules
-.PP
-.B exiled
-.IP
-display exiled modules
-.PP
-.B expired
-.IP
-display a list of modules which will be updated by a `lunar renew`
-.PP
-.B sum
-<module>
-.IP
-print CRC checksums for modules(s). If no module is given it defaults to all.
-.PP
-.B md5sum
-<module>
-.IP
-print module MD5 message digests (fingerprints). If no module is given it default to all
-.PP
-.B export
-.IP
-take a snapshot of all modules and configuration currently installed
-.PP
-.B import
-snapshot
-.IP
-restore the snapshot from a previous
-.I lvu export command (see the export option)
-.PP
-.B moonbase
-.IP
-prints the entire moonbase
-.PP
-.B html
-.IP
-prints the entire moonbase in a nice html format
-.PP
-.B updatelog
-.IP
-view summary log of previous lunar update
-.PP
-.B activity
-.IP
-view the main lunar activity log
-.PP
-.B search
-"phrase"
-.IP
-Searches modules long descriptions for
-.I phrase
-.PP
-.B service
-port|acronym
-.IP
-displays modules that provide the given service
-.I port|acronym
-.PP
-.B newer
-date
-.IP
-print packages that are newer than a specified date. the date must be specified in the 'yyyymmdd' format, where y=year, m=month, and d=day
-.PP
-.B older
-date
-.IP
-print packages that are older than a specified date. the date must be specified in the 'yyyymmdd' format, where y=year, m=month, and d=day
-.PP
-.B from
-<path/><file>
-.IP
-find out what module has
-.I <path>/file
-installed
-.PP
-.B installed
-<module>
-.IP
-view all installed packages and corresponding version numbers or check
-to see whether a particular package is installed and if it is
-installed display its version number
-.PP
-.B section
-<module>
-.IP
-view a list of all sections in the software catalogue or display a list of packages from a specific section
-.PP
-.B size
-<module>
-.IP
-display the size of a given module or all your installed modules in KB
-.PP
-.B voyeur
-<module>
-.IP
-start looking at what lin is compiling at the moment and outputs it. A module can be optionally specified.
-.PP
-.B depends
-<module>
-.IP
-displays the modules that explicitly or recursively depend on this module.
-.PP
-.B tree
-<module>
-.IP
-displays a tree of the module's dependencies.
-.PP
-.B eert
-<module>
-.IP
-displays a tree of the module's reverse dependencies.
-.PP
-.B new
-<module>
-.IP
-Attempt to create a module DETAILS file from scratch using cut-n-paste data from the user. Very dirty method to get a module started by just having 4 pieces of information handy: download url, descriptions and name
-.PP
-.B edit
-<module>
-.IP
-Copy an existing module to zlocal so it can be edited. Turn on ZLOCAL_OVERRIDES to make sure your edited module gets used instead of the default module.
-.PP
-.B unedit
-<module>
-.IP
-Discards your 'edit'ed zlocal module. Works the same as removing it.
-.PP
-.B submit
-<module>
-.IP
-Submit a module to the lunar module submission list/mail alias. Please only submit tested changes.
-.PP
-.B $MODULE_SCRIPT
-<module>
-.IP
-replace $MODULE_SCRIPT with any of the following DETAILS | CONFIGURE | CONFLICTS | PRE_BUILD | BUILD | POST_BUILD | POST_INSTALL | POST_REMOVE to show module scripts for the
-.I module
-.SH "AUTHOR"
-Original version written by Brian Peterson
-.PP
-Modified by Kyle Sallee
-.PP
-Updated Thomas Stewart 01/15/2002
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Edited and new functions added by Chuck Mead 05/21/2002
-.PP
-Updated again by Terry Chan 08/08/2003
-.PP
-Updated by Stefan Wold 06/07/2009
-.SH "REPORTING BUGS"
-Report bugs to <maintainer at lunar\-linux.org>
-.SH "SEE ALSO"
-lunar(8), lin(8), lrm(8), lget(8), moonbase(5)
-.SH "WARRANTY"
-This is free software with ABSOLUTELY NO WARRANTY
-
-
diff --git a/usr/share/man/man5/moonbase.5 b/usr/share/man/man5/moonbase.5
deleted file mode 100644
index 4fd6096..0000000
--- a/usr/share/man/man5/moonbase.5
+++ /dev/null
@@ -1,133 +0,0 @@
-.TH MOONBASE "5" "June 2009" "Lunar Linux" LUNAR
-.SH NAME
-moonbase \- the software catalog for the Lunar-Linux distribution
-.SH COPYRIGHT
-.if n moonbase(5) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.if t moonbase(5) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.SH "DESCRIPTION"
-The software catalog is a list of software modules (simply referred to
-as "modules") divided into sections. Each module contains one
-or more description files. Description files contain such information as
-module name, version, URL, directory information, etc. Other description files provide unpacking, compilation, installation, and tracking instructions. One section in the
-software catalog of particular interest is PROFILES. Profiles are
-groups of modules. With profiles you can automatically install predefined or
-custom-built module sets using a single command.
-.SH "SUMMARY"
-The moonbase is found under /var/lib/lunar. The top level of directories
-are the section names. The directories under the section names are the
-modules. Each module directory will have a BASH description file called
-DETAILS and optionally contain one or more of the following description files:
-CONFIGURE, DEPENDS, CONFLICTS, PRE_BUILD, BUILD, POST_BUILD, POST_INSTALL, POST_REMOVE.
-If a description file does not exist in the module directory then a set of default
-description instructions are used. The default instructions for each description
-file can be found in /var/lib/lunar/functions/*.lunar.
-.SH "DETAILS"
-\fBPROFILES\fR
-.PP
-Each profile contains a simplified DETAILS file: profile name, version, and
-description. Profiles are effectively just a DEPEND file with a list of
-modules to be installed.
-.PP
-\fBDESCRIPTION FILES\fR
-.PP
-A typical source code installation might look like this (assume the
-application is called foo):
-.IP
-step 1) find the URL and download the tarball
-.IP
-step 2) tar xvfz foo-1.00.tar.gz
-.IP
-step 3) cd foo
-.IP
-step 4) less README (perhaps you skip this step?)
-.IP
-step 5) less INSTALL (... and this one?)
-.IP
-step 6) ./configure
-.IP
-step 7) make
-.IP
-step 8) make install
-.PP
-.PP
-Here is a breakdown of the description files and how they relate to the above
-installation procedure:
-.PP
-\fBDETAILS\fR
-.IP
-This file is required and describes the URL for step 1. It also contains version information,
-module name, source name, source directory, and a description of the module.
-.PP
-\fBCONFIGURE\fR
-.IP
-The configure script.
-.PP
-\fBDEPENDS\fR
-.IP
-This file contains a list of other modules upon which the module depends.
-If dependencies are turned on then the modules listed are installed in order
-prior to installing module.
-.PP
-.PP
-\fBCONFLICTS\fR
-.IP
-Contains a list of modules that conflict with this module. Use sparingly. A good example of a reasonable
-use is when you have two modules in the moonbase that are the same but one is patched. eg apache and apache-mod_ssl
-.PP
-\fBPRE_BUILD\fR
-.IP
-This describes the unpacking process as performed in step 2. The default PRE_BUILD will work for
-tarballs with gzip or bzip2 compression.
-.PP
-\fBBUILD\fR
-.IP
-This describes the compilation and installation processes as performed in steps 6-8. If the
-software module compiles and installs using these 3 steps then the default
-BUILD can be used.
-.PP
-\fBPOST_BUILD\fR
-.IP
-The default POST_BUILD simply calls the software tracking script.
-.PP
-\fBPOST_INSTALL\fR
-.IP
-There is no default POST_INSTALL. If no POST_INSTALL is present in the
-module directory then no operations are performed in this step. Normally
-used to start daemons or extra cleanup or install default configuration files,
-after the module is ready to execute.
-.PP
-\fBPOST_REMOVE\fR
-.IP
-This is called, if present, after removing the module. See lrm(8).
-.PP
-.SH "NOTES"
-The best way to learn the software catalog is to examine some of the
-description files yourself. Most software catalog entries are simple. For
-example try looking under /var/lib/lunar/moonbase/editors/emacs.
-If however you want to look at a very unusual, but much more complex example look at
-/var/lib/lunar/moonbase/xorg7. To understand how the software
-catalog works, it is also important to look at /var/lib/lunar/functions/*.lunar and
-examine the functions default_pre_build, default_build, and default_post_build.
-.SH "AUTHOR"
-Kyle Sallee
-.PP
-Updated Thomas Stewart 01/15/2002
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Updated by Terry Chan 5/22/2002
-.PP
-Updated by Terry Chan 8/08/2003
-.PP
-Updated by Stefan Wold 6/07/2009
-.PP
-.SH "REPORTING BUGS"
-.PP
-Report bugs to <maintainer at lunar-linux.org>
-.SH "SEE ALSO"
-lunar(8), lin(8), lrm(8), lvu(1), lget(8)
-.PP
-.SH "WARRANTY"
-.PP
-This is free software with ABSOLUTELY NO WARRANTY
-
diff --git a/usr/share/man/man8/lcrash.8 b/usr/share/man/man8/lcrash.8
deleted file mode 100644
index 61fe74a..0000000
--- a/usr/share/man/man8/lcrash.8
+++ /dev/null
@@ -1,61 +0,0 @@
-.TH "lcrash" "8" "Release $Revision$" "Terry Chan" "Lunar Crash Recovery"
-.SH "NAME"
-.LP
-\fBlcrash\fR \- Lunar Crash Recovery manual
-.SH "OVERVIEW"
-.LP
-This manual page was written to give some pointers on how to recover from a "lunar update" crash, or an otherwise broken set of lunar tools.
-.SH "DO NOT PANIC"
-.LP
-These are the suggested steps after your system has been able to successfully boot back into a \fBLunar Linux\fR bash command prompt but you are not able to do a "lunar update" because of a crash/abort/power failure/whatever occuring in the middle of a "lunar update" and it did not finish installing the lunar commands and Moonbase. All of these instructions should be run as "root".
-
-\fB1. Update Your Lunar or Theedge: \fRUsing a web browser or wget, download a copy of http://www.lunar-linux.com/lunar/lunar.tar.bz2 or http://www.lunar-linux.com/lunar/theedge.tar.bz2. If you use wget please do these steps:
-.IP
-cd /var/spool/lunar
-.IP
-wget http://www.lunar-linux.com/lunar/lunar.tar.bz2
-.LP
-If you use a web browser then go to the location mentioned above and download lunar.tar.bz2 and save it to the /var/spool/lunar directory.
-.LP
-\fB2. Manually unpack Lunar: \fRNow unpack the tar.bz2 file with these commands:
-.IP
-cd /
-.IP
-bzcat /var/spool/lunar/lunar.tar.bz2 | tar xv
-.IP
-cd lunar ; ./install
-.LP
-Now your system should be able to run a \fBlunar update\fR. This process will update the base scripts and the package collection (Moonbase).
-.LP
-
-.SH "LIFESAVERS"
-.LP
-Below are some useful addresses
-.P
-
-\fBWebsite: \fRhttp://www.lunar\-linux.org/
-.P
-
-\fBMaillist: \fRhttp://www.lunar\-linux.org/mailman/listinfo/lunar
-.P
-
-\fBIRC: \fRirc.freenode.net #lunar
-
-.SH "NOTES"
-.LP
-This is a work in progress. Expect frequent updates.
-.SH "SEE ALSO"
-.LP
-lunar(8), moonbase(5), lin(8), lvu(1), lget(8), lrm(8)
-.SH "DISCLAIMER"
-.LP
-The information and examples given here are for illustrative purposes. Use at
-your own risk. Every attempt has been made to insure that the content of this
-document was accurate when written. If you find inaccuracies, please send me
-clarifications.
-.SH "COPYRIGHT"
-.LP
-This document is Copyrighted Terry Chan 2002-2003. It may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies.
-.SH "AUTHOR"
-.LP
-Terry Chan <tchan at lunar-linux.org>
diff --git a/usr/share/man/man8/lfirsttime.8 b/usr/share/man/man8/lfirsttime.8
deleted file mode 100644
index bcf0eb3..0000000
--- a/usr/share/man/man8/lfirsttime.8
+++ /dev/null
@@ -1,308 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.if n .na
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "lfirsttime 8"
-.TH lfirsttime 8 "2005-03-09" "Moritz Heiber" "Lunar Linux for the first time"
-.SH "NAME"
-lfirsttime \- or 'What to do after a successful installation?'
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-This manual page has been written in order to ease the life of the system administrator after the installation part of \fBLunar Linux\fR.
-.SH "DO NOT PANIC!"
-.IX Header "DO NOT PANIC!"
-These are the suggested tasks you should accomplish immediately after the first boot of a newly installed Lunar box.
-.PP
-All of the lunar related commands mentioned below either feature a whole manpage or at least a very useful helpscreen. If you need immediate assistance regarding any of those commands, issue:
-.PP
-\&\fBman 'command'\fR or \fB'command' \-\-help\fR
-.PP
-at your console.
-.PP
-The operations described below follow a strict logic and they should be executed in sequence.
-.PP
-\&\fBPlease remember that the Lunar Install/Rescue \s-1ISO\s0 is not a full featured system.\fR
-.SH "NETWORK SETTINGS"
-.IX Header "NETWORK SETTINGS"
-This step is crucial to your future success with \fBLunar Linux\fR. If you haven't set up your network card yet try it with \fBlnet\fR. Remember, you need to know about your current network card's driver and have the kernel build the appropriate modules for it.
-.Sh "Check your network settings"
-.IX Subsection "Check your network settings"
-Once you've set up your network card correctly, try to ping out.
-.PP
-Example: \fBping google.com\fR
-.PP
-If it doesn't work you may be having a name resolution problem, try pinging to the \s-1IP\s0 address instead of the name.
-.PP
-Example: \fBping 216.239.57.99\fR
-.PP
-If pinging to \s-1IP\s0 is working but pinging to name fails, check the \fB/etc/resolv.conf\fR file and see if the nameserver entries are there. You may also want to check the man page, \fBman resolv.conf\fR if you are not familiar with the entries which should be in that file.
-.Sh "Check the network device"
-.IX Subsection "Check the network device"
-If pinging the \s-1IP\s0 address fails, check to see if your network interface is up and running. You may use the command \fBifconfig\fR to see the interface's status. You must be able to see the details of your network interface in the output of ifconfig.
-.PP
-If you cannot, then check if your \fB\s-1NIC\s0 (network interface card)\fR module is loaded (assuming you are using a modular kernel); use the command \fBlsmod\fR to see the already loaded modules and see wether the module for your network card is already loaded.
-.PP
-If you do not know for sure what type of network card you have try executing the command: \fBcat /proc/pci|grep Ethernet\fR or \fBlspci\fR. This should give the manufacturer and model name of your ethernet card.
-.PP
-If your \s-1NIC\s0 module is there but your interface is not up, reconfigure the interface with \fBlnet\fR and test again. If your \s-1NIC\s0 module is still not listed in the output of \fBlsmod\fR, the chances are you have misconfigured the kernel or misconfigured your network. To check the kernel modules, try \fBls \-l /lib/modules/`uname \-r`/kernel/drivers/net\fR to see the network modules available with the current kernel. If the your \s-1NIC\s0's kernel module doesn't show up you probably have to reconfigure and recompile your current kernel to include the appropriate module(s).
-.Sh "lnet or manual configuration"
-.IX Subsection "lnet or manual configuration"
-Your network setting can be configured completely using \fBlnet\fR; just make sure you set up your interface correctly as needed. If you encounter problems after having configured your network with \fBlnet\fR you probably want to adjust the configuration manually.
-.PP
-The network configuration file for your Lunar installation may be found in \fB/etc/config.d/network/'interface'\fR (f.e. 'eth0' \-> /etc/config.d/network/eth0). Any time you adjust your interface's configuration manually or through \fBlnet\fR you will have to restart the network to make use of any changes that have been done in the meantime. The init script used to start/stop/restart network is \fB/etc/init.d/network\fR.
-.PP
-Example: \fB/etc/init.d/network restart\fR
-.PP
-Good luck and please remember that you \fBhave to\fR to be able to ping f.e. 'google.com' to install any other packages or update your system!
-.SH "CORE UPDATES AND SETUP"
-.IX Header "CORE UPDATES AND SETUP"
-Since Lunar Linux is a source based distribution, some of the binaries and/or modules on the \s-1CD\s0 may have been upgraded to newer versions already. Here are the first steps you should take to get an up\-to\-date, smoothly running and fast system:
-.Sh "Update your coretools"
-.IX Subsection "Update your coretools"
-You need to get the most recent version of the available \fBcoretools\fR. The \fBcoretools\fR are the heart of every \fBLunar Linux\fR system. They provide you with all the necessary commands to maintain a working installation thus it's always recommended to have the latest version installed. There are two different choices:
-.PP
-\&\fBlunar\fR or \fBtheedge\fR
-.PP
-\&\fBlunar\fR is the stable branch of the lunar \fBcoretools\fR. It's meant to run with stable production environments. \fBtheedge\fR is the unstable branch. It might occasionally contain bugs, however it's generally used to test out new features and bugfixes before they're migrated to the stable branch. If you'd like to help out with the lunar development or you discovered a bug in \fBlunar\fR you might want to give \fBtheedge\fR a try.
-.PP
-Since the \s-1ISO\s0 ships with \fBtheedge\fR preinstalled you \fBhave to\fR update \fBtheedge\fR before you do anything else -- even if you're planning to use \fBlunar\fR later on!
-.PP
-Execute: \fBlin theedge\fR
-.PP
-If you want to keep \fBLunar Linux\fR as stable as possible you need to install the stable \fBcoretools\fR branch now by running
-.PP
-Execute: \fBlin lunar\fR
-.Sh "Core Components"
-.IX Subsection "Core Components"
-A very brief explanation of the most important coretool components. For further information regarding the referenced parts please refer to their manpages (i.e. man <part>):
-.IP "\fBlin\fR; usage: lin <module>" 4
-.IX Item "lin; usage: lin <module>"
-Install a package/module.
-.IP "\fBlvu\fR; usage: lvu <options> <module>" 4
-.IX Item "lvu; usage: lvu <options> <module>"
-Gather information about a package/module.
-.IP "\fBlrm\fR; usage: lrm <module>" 4
-.IX Item "lrm; usage: lrm <module>"
-Remove a package/module.
-.IP "\fBlunar\fR; usage: lunar <options>" 4
-.IX Item "lunar; usage: lunar <options>"
-Lunar configuration utility
-.Sh "Update your moonbase"
-.IX Subsection "Update your moonbase"
-The package repository from where the \fBcoretools\fR gather their \fBpackage information\fR is called \fBmoonbase\fR. Also, packages are usually referred to as \fBmodules\fR. Since the moonbase on your installation is probably outdated it's strongly recommended to update your moonbase right after your coretools.
-.PP
-Execute: \fBlin moonbase\fR
-.Sh "Set your preferences"
-.IX Subsection "Set your preferences"
-\&\fBLunar Linux\fR can easily be customized and is highly configurable. For changing the options that affect your system you may use the menu driven \fBlunar\fR configuration utility. It's based upon ncurses which means you can even run it in the console of your choice. You need to become root to use it.
-.IP "\fBOptimizations\fR" 4
-.IX Item "Optimizations"
-Set the right optimizations for your computer. Be aware that changing your optimizations to the wrong values might actually break your whole installation so be really careful about what you're choosing. The \s-1ISO\s0 has been built with a minimum of available optimizations to ensure the highest amount of flexibility. To see whether or not your processor supports a certain feature try a \fBcat /proc/cpu\fR. It usually shows the available settings that suit your machine.
-.IP "\fBIntegrity checking\fR" 4
-.IX Item "Integrity checking"
-Lunar is performing a range of security checks on tarballs and installed packages to prevent faulty tarballs and possible intruders from taking over your system. It also ensures that none of your currently installed packages is broken.
-.Sp
-You may select the amount of checks from the \fBIntegrity checking\fR submenu at the \fBOptions\fR menu. It's generally recommended to at least chose \fB\s-1FIND_CHECK\s0\fR and \fB\s-1LDD_CHECK\s0\fR.
-.IP "\fBFeature menu\fR" 4
-.IX Item "Feature menu"
-As mentioned before, Lunar is highly configurable. Thus you have a whole menu to select its features from. It's strongly advised to at least take a look at it and get used to them. Explanations are usually displayed as soon as you select an item.
-.IP "\fBApart from that\fR" 4
-.IX Item "Apart from that"
-Take a look at the \fBlunar\fR configuration tool. It can be a \fBpowerful companion\fR while achieving the goal of setting up your system.
-.SH "GENERAL UPDATES"
-.IX Header "GENERAL UPDATES"
-Right now you're set to update your whole system. Before you do that make sure you have the most recent \fBcoretools\fR and \fBmoonbase\fR installed.
-.PP
-The next step can be omitted -- however, it is highly recommended that you rebuild the following modules in the right order to ensure that your system is working right.
-.PP
-Here we go:
-.PP
-Execute: \fBlin \-cr gcc glibc gcc bash coreutils tar wget\fR
-.PP
-\&\fBExplanation:\fR
-.PP
-\&\fBlin\fR is obviously used to install a module. It also accepts multiple modules in a row. The '\-cr' switch means 'compile (c)' and 'reconfigure (r)'. They're explained at the manpage. One needs to update gcc thus the first gcc statement. Right after that one should recompile glibc to ensure that it's working well with the latest compiled gcc. And finally gcc again to make use of the newly compiled glibc. The modules right afterwards are used by \fBLunar Linux\fR itself thus they need to be up-to-date and compiled against the latest available gcc and glibc.
-.Sh "\fBA complete update\fP"
-.IX Subsection "A complete update"
-Now, to update your whole system you need to issue the following
-.PP
-Execute: \fBlunar update\fR
-.PP
-It's going to compare your system's installed modules against the moonbases' definitions and update the installed modules accordingly. It's going to give you a list of modules that are going to be updated. If you're not sure wether you want a certain module to be updated remove it from the list. Once you're done the coretools are going to start the update which usually is going to take a very long time on a freshly installed system since most of its components will probably be outdated. So grab a coffee and/or a book and wait for it to finish ;\-)
-.PP
-Once it is done it is going to present you with a summary about how many module where successfully updated and which of them failed. \fBlvu\fR ('lvu activity') is going to show you which of them failed and usually why. \fBlvu\fR ('lvu compile <module>') is also going to show you the compilation's logfile which should clearly point you to the error that led to the failure of the module's compilation.
-.PP
-The first thing to do would be to 're'lin' (i.e. execute \fBlin \-c\fR once more. It is always advised to use the \-c and the \-r switch in case a module fails to compile) all the failed modules by hand. If you think you will not be able to resolve the matter on your own you can still file a bugreport at the \fBLunar Linux bugtracker\fR http://bugs.lunar\-linux.org or report the error to the \fBLunar Linux mailinglist\fR. However, you will have to subscribe to the list at http://foo\-projects.org/mailman/listinfo/lunar before being able to post any mail to it.
-.PP
-Once the update has been completed successfully you may go ahead and customize your installation to suit your own needs. Well done!
-.SH "HINTS"
-.IX Header "HINTS"
-.IP "\fBTAB-completion\fR" 4
-.IX Item "TAB-completion"
-All of the coretools are able to do tab\-completion. Say, you want to install the module 'xfce4\-panel' just go ahead and type 'lin xfce4\-p<\s-1TAB\s0>' and lin is going to append the rest of the module's name to the command. Once there are too few characters to resolve the name into one single module you just need to hit \s-1TAB\s0 twice to get a list of all the modules starting with the characters you just typed i.e. 'lin xfce<\s-1TAB\s0><\s-1TAB\s0>' is going to give you a list of all modules starting with 'xfce'.
-.IP "\fBLeftovers\fR" 4
-.IX Item "Leftovers"
-In case of a compilation failure the sources of the failed module are left in \f(CW$BUILD_DIRECTORY\fR (usually /usr/src/). Moreover, a few tracking files lunar creates to monitor the running installation process might be left in /tmp. Make sure you tidy up these two locations from time to time.
-.Sp
-\&\fB\s-1CAUTION:\s0\fR Directories like 'linux\-2.x' are kernel source directories and _must_ be left intact. Otherwise your system is going to break! Only delete them if you're absolutely sure that they don't belong to your currently running kernel.
-.IP "\fBRunning coretools processes\fR" 4
-.IX Item "Running coretools processes"
-If you're interrupting a module installation process (f.e. by pressing '\s-1CTRL\-C\s0) you should check if there are any running coretools processes running in the background as another try to install the module might fail because of them. Have a closer look at \fBps aux\fR and \fBkill/killall\fR all the remaining coretools instances of a failed installation attempt.
-.Sp
-\&\fB\s-1CAUTION:\s0\fR Lunar allows you to run multiple installations independently. Be sure about the processes' purpose you're terminating!
-.IP "\fB\s-1IRC\s0 channel\fR" 4
-.IX Item "IRC channel"
-The fastest help you get is by chatting with the developers directly. Join the \fBLunar Linux \s-1IRC\s0 channel\fR at freenode
-.Sp
-irc://irc.freenode.net/#lunar
-.SH "NOTES"
-.IX Header "NOTES"
-This is merely an introduction to what should be done to get a ready-to-go Lunar system. Please consult the documentation at the Lunar website for more information.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-Documentation at the Lunar Linux website at http://lunar\-linux.org
-.PP
-\&\fIlunar\fR\|(8), \fImoonbase\fR\|(1), \fIlin\fR\|(8), \fIlvu\fR\|(1), \fIlget\fR\|(8), \fIlrm\fR\|(8), \fIlnet\fR\|(8)
-.SH "DISCLAIMER"
-.IX Header "DISCLAIMER"
-The information and examples given here are for illustrative purposes. If you encounter any inaccuracies please send an email to the authors.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-This document is originally Copyrighted Kagan Kongar 2002.
-.PP
-Portions of this document Copyrighted (C) 2003\-2004 Terry Chan
-.PP
-It has been almost completely rewritten by Moritz Heiber for the Lunar Linux development team under the Creative Commons License, (C) 2005
-.SH "AUTHORS"
-.IX Header "AUTHORS"
-Kagan Kongar <kongar at tsrsb.org.tr>
-.PP
-Terry Chan <tchan at lunar\-linux.org>
-.PP
-Moritz Heiber <moe at lunar\-linux.org>
diff --git a/usr/share/man/man8/lget.8 b/usr/share/man/man8/lget.8
deleted file mode 100644
index eaa49e6..0000000
--- a/usr/share/man/man8/lget.8
+++ /dev/null
@@ -1,105 +0,0 @@
-.TH LGET 8 "August 2003" "Lunar Linux" LUNAR
-.SH NAME
-lget \- downloads module source files
-.SH SYNOPSIS
-.B lget
-module_1 module_2 module_3
-.PP
-.B lget -h|--help
-.PP
-.B lget -a|--all
-.PP
-.B lget -d|--debug|-f|--from|-u|--url|-v|--verbose|-w|--want
-module_1 module_2
-.SH COPYRIGHT
-.if n lget(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.if t lget(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.SH "EXAMPLE"
-To download emacs type:
-.IP
-.B lget
-emacs
-.SH "DESCRIPTION"
-.I lget
-is part of the
-.SM Lunar
-source-code package management suite. It is a command-line tool
-for automatically downloading a modules associated source files.
-.SH "OPTIONS"
-.TP
-.B lget
-module_1 <module_2> <module_3>
-.PP
-This automatically downloads the specified module sources.
-.TP
-.B lget -a|--all
-.PP
-Download the source code for every single module in moonbase (about 2.5G as of 08/08/2003).
-This is useful if you have a fast link or want to start your own Lunar source code mirror.
-.TP
-.B lget -d|--debug
-.PP
-Enables debug messages, very useful when emailing a bug report.
-.TP
-.B lget -f|--from path/dir
-.PP
-This specifies a different
-.I /var/spool/lunar
-directory. This is the default location for downloaded sources.
-.TP
-.B lget -h|--help
-.PP
-Outputs short help.
-.TP
-.B lget -u|--url URL module_1
-.PP
-This tries to download the specified module from a different location. This is
-useful if the original link is down.
-.TP
-.B lget -w|--want version
-.PP
-Attempt to download version version of the module by substituting the current
-version of the module with the wanted version. May fail if the package requires
-more than one file download, or other reasons.
-.TP
-.B lget -v|--verbose
-.PP
-Increases the level of message output
-.SH "FILES"
-.TP
-.I /etc/lunar/config & /etc/lunar/local/config
-.IP
-These files store the settings for default locations. Its best to leave
-these alone as they are in quite good places by default. See lin(8) for more
-details about these files.
-.IP
-.TP
-.I /var/lib/lunar/functions/*.lunar
-.IP
-Contains functions used by
-.B lget
-.SH ADVANCED USAGE
-Specifing a different download location for linux
-.IP
-lget
-.B --url http://ftp.mirror.ac.uk/sites/ftp.kernel.org/linux/kernel/2.4/linux-2.4.20.tar.bz2 linux
-.SH "NOTES"
-Do not include
-.SM version
-or
-.SM section
-when specifying a package. To get complete listing of installed software
-packages and versions type
-.B lvu installed
-.SH "AUTHOR"
-Thomas Stewart
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Updated by Terry Chan 08/08/2003
-.SH "REPORTING BUGS"
-Report bugs to <maintainer at lunar-linux.org>
-.SH "SEE ALSO"
-lunar(8), lin(8), lvu(1), lrm(8)
-.SH "WARRANTY"
-This is free software with ABSOLUTELY NO WARRANTY
diff --git a/usr/share/man/man8/lin.8 b/usr/share/man/man8/lin.8
deleted file mode 100644
index a0f8115..0000000
--- a/usr/share/man/man8/lin.8
+++ /dev/null
@@ -1,168 +0,0 @@
-.TH "LIN" "8" "August 2003" "Lunar Linux" "LUNAR"
-.SH "NAME"
-lin \- Lunar install software modules
-.SH "SYNOPSIS"
-.B lin
-[options] [package1[/version]] ... [package2[/version]] ...
-.SH "COPYRIGHT"
-.if n lin(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
-.if t lin(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
-.SH "EXAMPLE"
-To install emacs type:
-.IP
-.B lin emacs
-.SH "DESCRIPTION"
-.I lin
-is part of the
-.B Lunar
-source\-code package management suite. It is a command\-line tool for automatically retrieving, unpacking, compiling, installing, and tracking software installations.
-.SH "OPTIONS"
-.TP
-.B "\-c, \-\-compile"
-Compiles module even if there is a compile cache in /var/cache/lunar.
-.TP
-.B "-d, --debug"
-Enables debug messages, very useful when emailing a bug report.
-.TP
-.B "\-\-deps"
-Configures the modules and determines their dependencies, but they are not
-compiled or installed.
-.TP
-.B "-f, \-\-from" directory
-Specify an alternate directory to search for source code tarballs. An alternative
-to /var/spool/lunar.
-.TP
-.B "\-h, \-\-help"
-Outputs short help.
-.TP
-.B "\-p, \-\-probe"
-Only lin if the module was not previously installed.
-.TP
-.B "\-r, \-\-reconfigure"
-Select new configuration and dependencies for modules.
-.TP
-.B "\-\-opts (configure flags)"
-Add arbitrary options to the configure stage of the module. The options are saved for future upgrades but will be erased by using "-r".
-.TP
-.B "\-R, \-\-resurrect"
-Reinstalls a module which has been removed but still has the compiled version available.
-.TP
-.B "\-w, \-\-want (version number)"
-Try to install a different version than the current one in moonbase. Integrity checking is turned off. Success not guaranteed.
-.TP
-.B "\-s, \-\-silent"
-Decreases the level of message output.
-.TP
-.B "\-v, \-\-verbose"
-Increases the level of message output.
-.SH "FILES"
-All files can be edited by hand, but its easier to edit them with
-.B lunar.
-.TP
-.I /etc/lunar/config
-.IP
-Configuration options.
-.TP
-.I /etc/lunar/mirrors
-.IP
-Mirror information.
-.TP
-.I /etc/lunar/local/*
-.IP
-Local settings.
-.TP
-.I /etc/lunar/local/config
-.IP
-Various local settings and compiler optimization parameters (select with lunar).
-.TP
-.I /etc/lunar/local/depends/*
-.IP
-Dependency and configuration information for modules.
-.TP
-.I /var/lib/lunar/functions/*.lunar
-.IP
-Contains functions used by
-.B lin.
-.I
-.SH "ENVIRONMENT"
-.PP
-The following settings can be altered in
-.I /etc/lunar/local/config
-It is easier, faster and less error prone to edit them with
-.B lunar.
-.IP GNU_URL
-The GNU Mirror (default: ftp.gnu.org).
-.IP KERNEL_URL
-The kernel mirror (default: ftp.kernel.org).
-.IP XFREE86_URL
-The xfree86 mirror (default: ftp.xfree86.org).
-.IP GNOME_URL
-The GNOME mirror (default: ftp.gnome.org).
-.IP KDE_URL
-The KDE mirror (default: ftp.kde.org).
-.IP SFORGE_URL
-The Sourceforge mirror. (default: none).
-.IP PATCH_URL
-The default patch mirror. (default: download.lunar\-linux.org/lunar/patches).
-.IP LRESORT_URL
-The default lunar mirror. If all else fails go here! (default: download.lunar\-linux.org/lunar/cache)
-.IP MOONBASE_URL
-The lunar moonbase mirrors. (default: download.lunar\-linux.org/lunar/).
-.IP color
-If set to yes lin outputs nice colour. Green for messages, gray for compiling, yellow for questions, and red for errors.
-.IP PROMPT_DELAY
-The delay in seconds that
-.B lin
-pauses when waiting for responses from you.
-.IP MAIL_REPORTS
-If set to yes, installation logs will be mailed to the admin upon a successful compile. Compile logs will be mailed instead upon a failed compilation.
-.IP ADMIN'S_EMAIL
-The mailbox where the reports will be mailed. The admin's email address.
-.IP PRESERVE
-When set to yes, configuration files that have been edited will not get deleted when the module is re\-installed
-.IP SOUND
-If set to yes then sounds will be enabled if the
-.I lunar\-sound
-module is installed
-.IP SUSTAIN
-When set to yes this disallows removing of modules that would cause terrible malfunctions. eg glibc, gcc, bash, to name some obvious ones.
-.IP VIEW_REPORTS
-If set to yes then you will be prompted whether to view reports before and after installation.
-.IP VOYEUR
-If set to yes then compiler output will be displayed in real time.
-.IP REAP
-Deletes files when removing.
-.IP AUTOFIX
-If set to yes whenever a library is updated all packages that depend on that library will be rebuilt. See FIND_CHECK, MD5SUM_CHECK, LDD_CHECK, SYM_CHECK for autofix settings.
-.IP FIND_CHECK MD5SUM_CHECK LDD_CHECK SYM_CHECK
-See the \-f options above for explanations of these.
-.SH "ADVANCED USAGE"
-.PP
-Using source code tarballs from an alternate location.
-.IP
-lin
-.B \-\-from
-/root/spool/lunar
-emacs
-Unless the
-.B \-from
-option is specified lin will always check the
-.I /var/spool/lunar
-directory first to see if the package exists. If the package does not
-exist it downloads the package via the Internet.
-.SH "AUTHOR"
-Kyle Sallee
-.PP
-Updated Thomas Stewart 01/15/2002
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Updated by Chuck Mead 07/17/2003
-.PP
-Updated by Terry Chan 08/08/2003
-.SH "REPORTING BUGS"
-Report bugs to <maintainer at lunar\-linux.org>
-.SH "SEE ALSO"
-lunar(8), lrm(8), lvu(1), lget(8), moonbase(5)
-.SH "WARRANTY"
-This is free software with ABSOLUTELY NO WARRANTY
diff --git a/usr/share/man/man8/lrm.8 b/usr/share/man/man8/lrm.8
deleted file mode 100644
index 30debe3..0000000
--- a/usr/share/man/man8/lrm.8
+++ /dev/null
@@ -1,113 +0,0 @@
-.TH LRM 8 "August 2003" "Lunar\-Linux" LUNAR
-.SH NAME
-lrm \- removes Lunar software modules
-.SH SYNOPSIS
-.B lrm
-[options] [module1] ... [module2] ...
-.PP
-.B lrm
--h|--help
-.PP
-.B lrm
--d|--debug|-k|--keepconfig|-n|--nosustain|-p|--purge|-u|--upgrade|
--v|--verbose <module(s)>
-.PP
-.B lrm
--D|--downgrade <module> <version>
-.PP
-.SH COPYRIGHT
-.if n lrm(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.if t lrm(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
-.SH "EXAMPLE"
-To uninstall emacs type:
-.IP
-.B lrm
-emacs
-.SH "DESCRIPTION"
-.I lrm
-is part of the
-.SM Lunar\-Linux
-source-code package management suite. It is a command-line tool
-for automatically uninstalling a module and its associated
-files.
-.SH "OPTIONS"
-.TP
-.B "-d, --debug"
-enables debug messages, very useful when emailing a bug report
-.TP
-.B "-D, --downgrade"
-downgrade is an option for removing the selected module and restoring
-a previously installed version
-.TP
-.B "-h, --help"
-outputs short help
-.TP
-.B "-k, --keepconfig"
-remove module(s) but keep dependencies and config info
-.TP
-.B "-n, --nosustain"
-emoves module(s) even if they are sustained
-.TP
-.B "-u, --upgrade"
-perform an upgrade-removal. This skips running of pre/post-removal scripts
-and implies -n and -k
-.TP
-.B "-v, --verbose"
-increases the level of message output
-.TP
-.B "-p, --purge"
-remove all modules that require "module" through dependencies
-.SH "FILES"
-.TP
-.I /var/lib/lunar/excluded
-.IP
-List of files that are excluded during a lin or lrm.
-.TP
-.I /var/lib/lunar/protected
-.IP
-Contains a list of files that will not be removed.
-.TP
-.I /var/lib/lunar/solo
-.IP
-List of solo modules.
-.TP
-.I /var/lib/lunar/sustained
-.IP
-List of modules that are essential to system, and lrm of these modules is not permitted.
-Installing and upgrading is fine.
-.TP
-.I /var/lib/lunar/functions/*.lunar
-.IP
-Contains functions used by
-.B lrm
-.SH ADVANCED USAGE
-Rolling back to a previous version of a package
-.IP
-lrm
-.B --downgrade
-glibc 2.2.3
-.SH "NOTES"
-Do not include
-.SM version
-or
-.SM section
-when specifying a package. To get complete listing of installed software
-packages and versions type
-.B lvu installed
-.SH "NOTES"
-Downgrade will only rollback to versions that were previously installed.
-It will not download older versions from the Internet.
-.SH "AUTHOR"
-Kyle Sallee
-.PP
-Updated Thomas Stewart 01/15/2002
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Updated by Auke Kok 09/21/2004
-.SH "REPORTING BUGS"
-Report bugs to <maintainer at lunar-linux.org>
-.SH "SEE ALSO"
-lunar(8), lin(8), lvu(1), lget(8)
-.SH "WARRANTY"
-This is free software with ABSOLUTELY NO WARRANTY
diff --git a/usr/share/man/man8/lunar.8 b/usr/share/man/man8/lunar.8
deleted file mode 100644
index d84697b..0000000
--- a/usr/share/man/man8/lunar.8
+++ /dev/null
@@ -1,168 +0,0 @@
-.TH "LUNAR" "8" "August 2003" "Lunar-Linux.org" "Lunar"
-.SH "NAME"
-lunar \- menu\-driven software package management utility
-.SH "SYNTAX"
-.B lunar
--d|--debug|-h|--help|-v|--verbose
-.PP
-.B lunar
-[prune|renew|update|rebuild|optimize|fix|nofix|fixdepends|resurrect|install|remove|hold|unhold|exile|unexile]
-.SH "COPYRIGHT"
-.if n lunar(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
-.if t lunar(8) is Copyright \(co 2002-2003 Terry Chan with portions copyrighted by previous authors 2001\-2002
-.SH "DESCRIPTION"
-.I lunar
-is an easy\-to\-use menu\-driven (dialog\-based) interface to the
-.I Lunar
-source\-based package management system.
-.SH "OPTIONS"
-.I lunar
-without options will start the menu\-driven package management utility.
-.PP
-.B "-d, --debug"
-enables debug messages, very useful when emailing a bug report
-.TP
-.B "-h, --help"
-outputs short help
-.TP
-.B "-v, --verbose"
-increases the level of message output
-.TP
-.I prune
-.IP
-Removes all old source code and old backups. Since the number of sources on the system grows steadily on a running system, you will need to clean some of the kept copies of sources and compile caches. The source code from previous versions are kept so that the packages can be rolled back to older versions. This does not delete sources that are up to date,
-but not installed.
-.PP
-.I renew
-.IP
-Update all packages without fetching a fresh moonbase first. Does not run prune or autofix.
-.PP
-.I update
-.IP
-Fetches a new moonbase, updates all packages and runs (optionally) a prune and autofix.
-.PP
-.I rebuild
-.IP
-automatically rebuilds all installed software packages. This option is non\-interactive and does not start up the menu\-driven interface. It is suitable for use in cron jobs and is useful for rebuilding distributed binaries from source.
-.PP
-.I optimize
-.IP
-jump straight into the compiler optimizations menu.
-.PP
-.I fix
-.IP
-Check and fix all modules and internal state of lunar. Four methods are available. The methods can be toggled using lunar\->Option\->Integrity Checking. A fix is automatically issued afer a
-.B lunar update.
-.IP
-.I "Find Check"
-.IP
-Discovers missing binary executables, libraries and header files.
-.IP
-.I MD5 Sum
-.IP
-Discovers modified executables and libraries.
-.IP
-.I Ldd Check
-.IP
-Discovers Broken executables and libraries.
-.IP
-.I Sym Check
-.IP
-Discovers mis\-owned symbolic links to files.
-.TP
-.I nofix
-.IP
-Check but do not fix modules and internal state.
-.PP
-.I fixdepends
-.IP
-Check and fix the dependency database of lunar.
-Reconstructs the depends database without recompiling modules. This might help if your depends database is missing or corrupted.
-.PP
-.I resurrect
-.IP
-Reinstalls a module which has been removed but still has the compiled version available.
-.PP
-.I install
-.IP
-Installs a module.
-.PP
-.I remove
-.IP
-Removes a module.
-.PP
-.I hold
-.IP
-Places a module on hold so it cannot be built/rebuilt.
-.PP
-.I unhold
-.IP
-Removes a module from hold status so it can be built/rebuilt.
-.PP
-.I exile
-.IP
-Prevents a module from being installed or resurrected. Perhaps because you've installed a customized module.
-.PP
-.I unexile
-.IP
-Removes a module from exiled status.
-.PP
-.SH "REQUIREMENTS"
-.I lunar
-requires a connection to the Internet
-.PP
-.I Bash
-version 2 or higher
-.PP
-.I Dialog
-version 0.9a or higher
-.PP
-.I Linux
-kernel version 2.4.x or higher.
-.SH "NOTES"
-Options on the
-.I Package Menu
-add or remove software packages to/from installation and removal queues. The actual installation and/or removal of the packages will not be performed until either
-.I Foreground Execution
-or
-.I Background Execution
-are selected from the main menu.
-.SH "OPERATION"
-.I Navigating the Menus
-.PP
-To return to a previous menu press
-.I <Esc>
-or use the
-.I Cancel button
-.PP
-To exit the program from the main menu press
-.I <Esc>
-or use the
-.I Cancel button
-.PP
-To toggle between buttons press
-.I <Tab>
-.PP
-To select whichever button is highlighted press
-.I <Enter>
-.PP
-To select/deselect items from a checklist press
-.I <Space>
-.SH "AUTHOR"
-Kyle Sallee
-.PP
-Updated Thomas Stewart 01/15/2002
-.PP
-Converted to Lunar by Terry Chan 03/23/2002
-.PP
-Updated by Chuck Mead 07/17/2003
-.PP
-Updated by Terry Chan 08/08/2003
-.SH "REPORTING BUGS"
-Report bugs to <maintainer at lunar\-linux.org>
-.SH "SEE ALSO"
-moonbase(5), lin(8), lvu(1), lget(8), lrm(8), lcrash(8)
-.SH "WARRANTY"
-This is free software with ABSOLUTELY NO WARRANTY
-
-
diff --git a/var/lib/lunar/compilers/c++ b/var/lib/lunar/compilers/c++
deleted file mode 100755
index ba4f65c..0000000
--- a/var/lib/lunar/compilers/c++
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $CXX_EXT $PROG $@" >&2
-fi
-
-exec $CXX_EXT $PROG "$@"
-
diff --git a/var/lib/lunar/compilers/cc b/var/lib/lunar/compilers/cc
deleted file mode 100755
index 5859b44..0000000
--- a/var/lib/lunar/compilers/cc
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $CC_EXT $PROG $@" >&2
-fi
-
-exec $CC_EXT $PROG "$@"
-
diff --git a/var/lib/lunar/compilers/g++ b/var/lib/lunar/compilers/g++
deleted file mode 100755
index 3d3edfa..0000000
--- a/var/lib/lunar/compilers/g++
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $CXX_EXT $PROG $@" >&2
-fi
-
-exec $CXX_EXT $PROG "$@"
-
diff --git a/var/lib/lunar/compilers/gcc b/var/lib/lunar/compilers/gcc
deleted file mode 100755
index 5859b44..0000000
--- a/var/lib/lunar/compilers/gcc
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $CC_EXT $PROG $@" >&2
-fi
-
-exec $CC_EXT $PROG "$@"
-
diff --git a/var/lib/lunar/compilers/ld b/var/lib/lunar/compilers/ld
deleted file mode 100755
index e543d88..0000000
--- a/var/lib/lunar/compilers/ld
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $PROG $@" >&2
-fi
-
-exec $PROG "$@"
-
diff --git a/var/lib/lunar/compilers/make b/var/lib/lunar/compilers/make
deleted file mode 100755
index 2820d8a..0000000
--- a/var/lib/lunar/compilers/make
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
-
-if [[ -n "$LUNAR_DEBUG" ]] ; then
- echo "++ $MAKE_EXT $PROG ${MAKES:+-j$MAKES} $@" >&2
-fi
-
-exec $MAKE_EXT $PROG ${MAKES:+-j$MAKES} "$@"
-
diff --git a/var/lib/lunar/excluded b/var/lib/lunar/excluded
deleted file mode 100644
index 690bbd7..0000000
--- a/var/lib/lunar/excluded
+++ /dev/null
@@ -1,12 +0,0 @@
-^/dev/
-^/home/
-^/proc/
-^/root/
-^/tmp/
-^/usr/src/
-^/var/cache/ccache/
-^/var/lock/
-^/var/log/
-^/var/run/
-^/var/state/lunar/
-^/var/tmp/
diff --git a/var/lib/lunar/functions/README b/var/lib/lunar/functions/README
deleted file mode 100644
index da57c04..0000000
--- a/var/lib/lunar/functions/README
+++ /dev/null
@@ -1,2 +0,0 @@
-There are some functions in this directory. These functions are called by
-subroutines. This place is defined in /etc/lunar/config, via FUNCTIONS variable.
diff --git a/var/lib/lunar/functions/aliases.lunar b/var/lib/lunar/functions/aliases.lunar
deleted file mode 100644
index 3b558fa..0000000
--- a/var/lib/lunar/functions/aliases.lunar
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# aliases.lunar - Lunar alias code #
-# #
-############################################################
-# #
-# Copyright 2004 by Auke Kok under GPLv2under GPLv2 #
-# #
-############################################################
-
-# translate %ALIAS if needed to a module name that is installed
-# and add it to the dependency chain if needed
-unalias() {
- # quick exit code
- if [[ "${1:0:1}" != "%" ]] ; then
- echo $1
- return
- fi
-
- local TARGET TARGETS TARGETBYNUM N CHOICE CACHED_ALIAS
- # lookup in cache
- CACHED_ALIAS=$(get_local_config `echo LUNAR_ALIAS_${1:1}`)
- if [ -n "$CACHED_ALIAS" ]; then
- echo $CACHED_ALIAS
- return
- fi
-
- debug_msg "unalias($@)"
- # try to figure out where the aliases file is:
- if [[ -z "$ALIASES" ]] || [[ ! -f "$ALIASES" ]]; then
- if [ -f "$MOONBASE/aliases" ] ; then
- ALIASES="$MOONBASE/aliases"
- else
- ALIASES="/var/lib/lunar/aliases"
- fi
- fi
-
- TARGETS=$(awk -F: -v mod=$1 '{if ($1==mod){print $2}}' $ALIASES)
-
- # shortcut out when explicitly instructed so
- if [[ -n "$NEVER_ASK" ]] ; then
- echo $1
- return
- fi
-
- # propose one and let the user pick it from a list:
- debug_msg "unalias: starting selection loop"
- error_message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} depends on ${DEFAULT_COLOR}${QUERY_COLOR}\"${1:1}\"${DEFAULT_COLOR}${MESSAGE_COLOR} which is an alias${DEFAULT_COLOR}"
- while true ; do
- error_message "${MESSAGE_COLOR}Please select a substitute ! Enter the number or the name of the module"
- error_message "Press [ENTER] to select choice #1 (the recommended choice).${DEFAULT_COLOR}"
- ((N=0))
- for TARGET in $TARGETS ; do
- ((N++))
- TARGETBYNUM[$N]=$TARGET
- if module_installed $TARGET ; then
- error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${LRM_COLOR}(Installed)${DEFAULT_COLOR}"
- else
- error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${MESSAGE_COLOR}(Not installed)${DEFAULT_COLOR}"
- fi
- done
- echo -n -e "${MESSAGE_COLOR}Choice> ${DEFAULT_COLOR}" >&2
- read -t $PROMPT_DELAY CHOICE
- # test directly first
- if echo $TARGETS | grep -qw "$CHOICE" ; then
- verbose_msg "Stored alias mapping $1 -> $TARGET"
- set_local_config `echo LUNAR_ALIAS_${1:1}` $TARGET
- echo $TARGET
- return
- # then the number, resolving the default
- elif [[ -n "${TARGETBYNUM[${CHOICE:=1}]}" ]] ; then
- verbose_msg "Stored alias mapping $1 -> ${TARGETBYNUM[$CHOICE]}"
- set_local_config `echo LUNAR_ALIAS_${1:1}` ${TARGETBYNUM[$CHOICE]}
- echo ${TARGETBYNUM[$CHOICE]}
- return
- fi
- error_message "${MESSAGE_COLOR}Sorry, I can't do anything with \"${DEFAULT_COLOR}${QUERY_COLOR}$CHOICE${DEFAULT_COLOR}${MESSAGE_COLOR}\", please try again${DEFAULT_COLOR}"
- done
-}
-
-
diff --git a/var/lib/lunar/functions/build.lunar b/var/lib/lunar/functions/build.lunar
deleted file mode 100644
index c3573bb..0000000
--- a/var/lib/lunar/functions/build.lunar
+++ /dev/null
@@ -1,442 +0,0 @@
-#!/bin/bash
-# #
-# build.lunar - building routines #
-# #
-############################################################
-# #
-# this WAS the subroutines of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Copyright 2001 by Kyle Sallee #
-# #
-# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-# Parts Copyrighted Steven Michalske 2004 under GPLv2 #
-# #
-############################################################
-
-
-save_libraries() {
- local OLD_VERSION OLD_LOG OLD_LIBS SAVED LINE
- debug_msg "save_libraries ($@)"
-
- [ "$MODULE" == "glibc" ] && return 0
-
- OLD_VERSION=`installed_version $MODULE`
- OLD_LOG=$INSTALL_LOGS/$MODULE-$OLD_VERSION
-
- [ -e "$OLD_LOG" ] || return 0
-
- OLD_LIBS=$SOURCE_DIRECTORY/old.libraries
- mkdir -p $OLD_LIBS
-
- SAVED=$OLD_LIBS/$MODULE.saved.libraries
- rm -rf $SAVED
-
- grep "/lib/" $OLD_LOG |
- while read LINE; do
-
- if [ -f "$LINE" ] &&
- file -bL $LINE |
- grep -q "shared object"
- then
- verbose_msg "saving library \"$LINE\""
- if [ -h $LINE ]; then
- DEST=$( basename $( ls -la "$LINE" |
- cut -d '>' -f2 |
- cut -c 2-
- )
- )
- ln -sf $DEST $OLD_LIBS/`basename $LINE`
- else
- cp $LINE $OLD_LIBS
- fi
- echo $OLD_LIBS/`basename $LINE` >> $SAVED
- fi
- done
-
- ldconfig $OLD_LIBS
-
- if [ -z "$LD_LIBRARY_PATH" ]
- then export LD_LIBRARY_PATH="$OLD_LIBS"
- else export LD_LIBRARY_PATH="$OLD_LIBS:$LD_LIBRARY_PATH"
- fi
-}
-
-
-release_saved_libraries() {
- local OLD_LIBS SAVED FILE
- debug_msg "release_saved_libraries ($@)"
- OLD_LIBS=$SOURCE_DIRECTORY/old.libraries
- SAVED=$OLD_LIBS/$MODULE.saved.libraries
-
- if [ -f $SAVED ] ; then
- while read FILE ; do
- verbose_msg "releasing library \"$FILE\""
- rm -f "$FILE"
- done < $SAVED
- fi
-
- ldconfig $OLD_LIBS
-}
-
-
-export_ld() {
- local DIRECTORY
- debug_msg "export_ld ($@)"
- for DIRECTORY in $* ; do
- if file -b $DIRECTORY/*.so* | grep -q "shared object" ; then
- if [ -z "$LD_LIBRARY_PATH" ] ; then
- export LD_LIBRARY_PATH="$DIRECTORY"
- else
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIRECTORY"
- fi
- fi
- done
-}
-
-
-prepare_install() {
- debug_msg "prepare_install ($@)"
- if module_installed $MODULE || module_held $MODULE ; then
- message "${MESSAGE_COLOR}Preparing to install" \
- "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- save_libraries
- verbose_msg "calling \"lrm --upgrade $MODULE\""
- lrm --upgrade $MODULE
- true
- fi
- # turn on tracking now
- invoke_installwatch
- plugin_call BUILD_INSTALL $MODULE
- if [ $? == 2 ]; then
- return 0
- fi
-}
-
-
-default_pre_build() {
- debug_msg "default_pre_build ($@)"
- verbose_msg "running \"default_pre_build\""
- validate_source_dir $SOURCE_DIRECTORY
- if [[ -d $SOURCE_DIRECTORY ]] &&
- [[ $KEEP_SOURCE == "on" ]]; then
- cd $SOURCE_DIRECTORY &&
- make clean
- if [ $? -ne 0 ]; then
- message "${PROBLEM_COLOR}ERROR: ${DEFAULT_COLOR}The source for ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}: could not be made clean for build."
- # Thoughts on forcing a new source directory?
- # More of how should we handle this, currently we will bail out
- # A vast majority of the moonbase will fail, (w/o: make clean)
- fi
- else
- mk_source_dir $SOURCE_DIRECTORY &&
- unpack $SOURCE
- fi
-}
-
-
-# wrapper function to call ./configure
-_configure()
-{
- debug_msg "_configure($@)"
- if [ -e ./configure ]; then
- verbose_msg "./configure $@"
- ./configure $@
- elif [ -e Makefile -o -e makefile ]; then
- verbose_msg "Missing \"configure\": skipping configure stage."
- else
- error_message "${PROBLEM_COLOR}Missing ${FILE_COLOR}configure${PROBLEM_COLOR} and/or ${FILE_COLOR}Makefile${PROBLEM_COLOR}!${DEFAULT_COLOR}"
- return 1
- fi
-}
-
-
-# cmake can be run two ways: in source and out of source. The determinante method is
-# to look for a cmake macro, if it exists then do out of source. There have been inconsistancies
-# with this, some apps compile fine out of source and others do not with the leaning towards
-# more wanting out of source even though they do not say so. Making this the default and
-# for those that do not want it, specify it in the BUILD.
-cmake_build_target() {
- debug_msg "cmake_build_target ($@)"
- verbose_msg "running \"Out of source build is required; configuring\""
- OOSB_DIR="$SOURCE_DIRECTORY/$MODULE-oosb" &&
- mkdir $OOSB_DIR &&
- cd $OOSB_DIR
-}
-
-
-default_config() {
- debug_msg "default_config ($@)"
- verbose_msg "running \"default_config\""
- _configure --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
-}
-
-
-default_game_config() {
- debug_msg "default_game_config ($@)"
- verbose_msg "running \"default_game_config\""
- _configure --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --bindir=$MODULE_PREFIX/games \
- --datadir=$MODULE_PREFIX/share/games \
- --sysconfdir=/etc \
- --localstatedir=/var/games \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
-}
-
-
-default_cvs_config() {
- debug_msg "default_cvs_config ($@)"
- verbose_msg "running \"default_cvs_config\""
- verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
-
- ./autogen.sh --build=$BUILD \
- --prefix=$MODULE_PREFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=$MODULE_PREFIX/share/info \
- --mandir=$MODULE_PREFIX/share/man \
- $OPTS
-}
-
-
-default_cmake_config() {
- debug_msg "default_cmake_config ($@)"
- verbose_msg "running \"default_cmake_config\""
- verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
-
- cmake_build_target
-
- cmake -DCMAKE_INSTALL_PREFIX=$MODULE_PREFIX \
- -DCMAKE_BUILD_TYPE=RELEASE \
- $OPTS $SOURCE_DIRECTORY
-}
-
-
-default_make() {
- debug_msg "default_make ($@)"
- verbose_msg "running \"default_make\""
- make ${MAKES:+-j${MAKES}} &&
- prepare_install &&
- make install
-}
-
-
-default_game_build() {
- debug_msg "default_game_build ($@)"
- verbose_msg "running \"default_game_build\""
- default_game_config &&
- default_make
-}
-
-
-default_cmake_build() {
- debug_msg "default_cmake_build ($@)"
- verbose_msg "running \"default_cmake_build\""
- default_cmake_config &&
- default_make
-}
-
-
-default_build() {
- debug_msg "default_build ($@)"
- verbose_msg "running \"default_build\""
- default_config &&
- default_make
-}
-
-
-default_cvs_build() {
- debug_msg "default_cvs_build ($@)"
- default_cvs_config &&
- default_make
-}
-
-
-default_cpan_pre_build() {
- local CPAN_MODULE CPAN_SOURCE_BRANCH
- debug_msg "default_cpan_pre_build ($@)"
- mk_source_dir $SOURCE_DIRECTORY
- cd $SOURCE_DIRECTORY
- CPAN_MODULE=${SOURCE_URL/cpan:\/\//}
- CPAN_SOURCE_BRANCH=$(dirname $CPAN_MODULE)
- mkdir -p authors/id/${CPAN_SOURCE_BRANCH}
- install -m 444 $SOURCE_CACHE/$SOURCE authors/id/${CPAN_SOURCE_BRANCH}
-}
-
-
-default_cpan_build() {
- local CPAN_MODULE
- debug_msg "default_cpan_build ($@)"
- prepare_install
- verbose_msg "running \"default_cpan_build\""
- if [ ! -x /usr/bin/cpan ] ; then
- return 1
- fi
-
- CPAN_MODULE=${SOURCE_URL/cpan:\/\//}
- echo "o conf cpan_root $STATE_DIRECTORY
- o conf build_dir $SOURCE_DIRECTORY
- o conf keep_source_where $SOURCE_DIRECTORY
- install $CPAN_MODULE
- quit" | /usr/bin/cpan || exit 1
- rm_source_dir $SOURCE_DIRECTORY
-}
-
-
-default_post_build() {
- debug_msg "default_post_build ($@)"
-
- if [ $(wc -l $INSTALLWATCHFILE | awk '{print$1}') == "0" ] &&
- [ "$PROFILE" != "yes" ] ; then
- message "${PROBLEM_COLOR}WARNING: ${DEFAULT_COLOR}${FILE_COLOR}BUILD${DEFAULT_COLOR}${PROBLEM_COLOR} does not call prepare_install or installs zero files!${DEFAULT_COLOR}"
- fi
-
- update_plugin $MODULE install
-
- plugin_call BUILD_POST_BUILD $MODULE
- if [ $? != 2 ]; then
- message "${PROBLEM_COLOR}ERROR: problems running POST_BUILD plugins!${PROBLEM_COLOR}"
- return 1
- fi
-
- ldconfig
- release_saved_libraries
- cd /
-}
-
-
-syms_not_owned() {
- local DEST
- debug_msg "syms_not_owned ($@)"
- while read ITEM ; do
- if [ -h "$ITEM" ] && [ -f "$ITEM" ]; then
- DEST=$(basename $(ls -la "$ITEM" | cut -d '>' -f2 | cut -c 2- ) )
- if ! grep -q "$DEST" "$1" ; then
- echo -n "$ITEM\|"
- echo "$ITEM" >> $TMPDIR/$MODULE.rejected.symlinks
- fi
- fi
- done < $1
-}
-
-
-prepare_module_config() {
- debug_msg "prepare_module_config ($@)"
- if [ ! -e "$MODULE_CONFIG" ] ; then
- > $MODULE_CONFIG
- fi
-}
-
-
-# run the CONFIGURE script
-run_configure() {
- debug_msg "run_configure ($@)"
- if [ -n "$RECONFIGURE" ]; then
- verbose_msg "Reconfiguring \"$MODULE\""
- rm -f $DEPENDS_CONFIG/$MODULE
- remove_depends $MODULE
- fi
-
- prepare_module_config
- grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
-
- # add custom passed OPTS before retrieving them
- if [ -n "$PASS_OPTS" ] ; then
- SAVE_OPTS="$(get_module_config OPTS) $PASS_OPTS"
- set_module_config OPTS "$SAVE_OPTS"
- fi
- plugin_call BUILD_CONFIGURE $MODULE
- if has_module_file $MODULE CONFIGURE ; then
- run_module_file $MODULE CONFIGURE
- fi
- # store $OPTS for later use
- echo "$MODULE:$OPTS" >> $TEMP_CONFIGOPTS
-}
-
-
-run_pre_build() {
- debug_msg "run_pre_build ($@)"
- message "${MESSAGE_COLOR}Building ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} version ${MODULE_COLOR}$VERSION${DEFAULT_COLOR}"
-
- cd $BUILD_DIRECTORY
-
- if verify_all_sources $MODULE ; then
- plugin_call BUILD_PRE_BUILD $MODULE
- if has_module_file $MODULE PRE_BUILD ; then
- run_module_file $MODULE PRE_BUILD
- else
- if ! default_pre_build ; then
- return 1
- fi
- fi
- else
- return 1
- fi
-}
-
-
-run_build() {
- debug_msg "run_build ($@)"
- if [[ -d "$SOURCE_DIRECTORY" ]] ; then
- cd $SOURCE_DIRECTORY
- fi
-
- verbose_msg "building \"$MODULE\" version \"$VERSION\" in `pwd`"
-
- # this calls optimizations and others:
- plugin_call BUILD_BUILD $MODULE
- # now override compile wrappers if needed:
- if [[ "${USE_WRAPPERS:-yes}" == "yes" ]]; then
- export PATH=/var/lib/lunar/compilers:$PATH
- fi
- (
- # fix errors, don't avoid them. This makes all errors fatal
- shopt -s execfail
- if has_module_file $MODULE BUILD ; then
- run_module_file $MODULE BUILD
- else
- default_build
- fi
- ) > $C_FIFO 2>&1
-}
-
-
-run_post_build() {
- debug_msg "run_post_build ($@)"
- if has_module_file $MODULE POST_BUILD ; then
- run_module_file $MODULE POST_BUILD
- fi
- default_post_build
-}
-
-
-run_post_install() {
- debug_msg "run_post_install ($@)"
- plugin_call BUILD_POST_INSTALL $MODULE
- if has_module_file $MODULE POST_INSTALL ; then
- run_module_file $MODULE POST_INSTALL
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/check.lunar b/var/lib/lunar/functions/check.lunar
deleted file mode 100644
index da2382f..0000000
--- a/var/lib/lunar/functions/check.lunar
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# check/lunar - module sanity checking functions #
-# #
-############################################################
-# #
-# Copyright 2005 Auke Kok under GPLv2 #
-# #
-############################################################
-
-
-run_checks() {
- debug_msg "run_checks ($@)"
- verbose_msg "Running sanity checks for module \"$1\""
- (
- run_details $1
- plugin_call MODULE_CHECK $1
- if [ $? == 2 ]; then
- return 0
- fi
- return 1
- )
-}
-
-
-# rework_module : check depends database for a module
-rework_module() {
- local MODULE
- debug_msg "rework_module ($@)"
-
- # we declare these local to override the systems default ones:
- optional_depends() {
- local DEP
- debug_msg " optional_depends ($@)"
- DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
- if module_exiled $DEP ; then
- echo "$MODULE:$DEP:off:optional:$2:$3"
- else
- if module_installed $DEP || module_held $DEP ; then
- echo "$MODULE:$DEP:on:optional:$2:$3"
- else
- echo "$MODULE:$DEP:off:optional:$2:$3"
- fi
- fi
- }
-
- depends() {
- local DEP
- debug_msg " depends ($@)"
- DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
- if ! module_installed $DEP && ! module_held $DEP ; then
- if ! is_depends $DEP && module_exiled $DEP ; then
- return 1
- else
- CHANGED_MODULES="$CHANGED_MODULES $DEP"
- fi
- fi
-
- echo "$MODULE:$DEP:on:required:$2:$3"
- }
-
- run_depends() {
- debug_msg " run_depends ($@)"
- (
- if run_details $1 &> /dev/null ; then
- if has_module_file $MODULE DEPENDS ; then
- run_module_file $MODULE DEPENDS | grep -v '%'
- fi
- fi
- )
- }
-
- # here starts the real work:
- MODULE=$1
-
- # remove whatever depends was residing in the depends state file and
- # append the new output:
- lock_file $DEPENDS_STATUS_BACKUP &&
- lock_file $DEPENDS_STATUS &&
- grep -v "^$MODULE:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS &&
- run_depends $MODULE >> $DEPENDS_STATUS
- cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP
- unlock_file $DEPENDS_STATUS
- unlock_file $DEPENDS_STATUS_BACKUP
-}
-
-
-# fix_depends : single pass to fix depends database
-fix_depends () {
- local LIST
- debug_msg "fix_depends ($@)"
-
- if [ -n "$1" ] ; then
- LIST="$@"
- else
- LIST=$(grep -v moonbase: $MODULE_STATUS | cut -d: -f1 | sort )
- fi
-
- for MODULE in $LIST ; do
- module_exiled $MODULE || rework_module $MODULE
- done
-}
-
-
-run_fix() {
- local MODULES MODULE
- debug_msg "run_fix ($@)"
- MODULES=$*
-
- if [ -z "$MODULES" ] ; then
- MODULES=$(list_installed | grep -v moonbase)
- fi
-
- if [[ -n "$FIXDEPENDS" ]] ; then
- for MODULE in $MODULES ; do
- fix_depends $MODULE
- done
- return
- fi
-
- # discover BROKEN modules and note them if we plan on fixing them
- if [[ ! -n "$NOFIX" ]] ; then
- for MODULE in $MODULES ; do
- if ! run_checks $MODULE ; then
- BROKEN_MODULES=( ${BROKEN_MODULES[@]} $MODULE )
- fi
- done
- else
- for MODULE in $MODULES ; do
- run_checks $MODULE
- done
- fi
-
- # if we were called with --fixdepends then we may skip the rest
- if [ -n "$FIXDEPENDS" ] ; then
- return
- fi
-
- export TMP_LIN_SUCCESS=$(temp_create "successful")
- export TMP_LIN_FAIL=$(temp_create "failed")
-
- if [[ ! -n "$NOFIX" ]] ; then
- for MODULE in $(sort_by_dependency ${BROKEN_MODULES[@]}) ; do
- if module_installed $MODULE && ! module_held $MODULE ; then
- if ! run_checks $MODULE ; then
- NEVER_ASK=1 DEPS_ONLY= satisfy_depends &&
- NEVER_ASK=1 DEPS_ONLY= FIX= satisfy_depends &&
-
- if ! run_checks $MODULE ; then
- verbose_msg "Attempting to recompile \"$MODULE\""
- if ! FIX= lin --compile $MODULE ; then
- verbose_msg "Attempt to recompile \"$MODULE\" FAILED"
- continue
- elif ! run_checks $MODULE ; then
- verbose_msg "Attempt to recompile \"$MODULE\" succeeded but \"$MODULE\" still is broken!"
- continue
- fi
- fi
- fi
- fi
- done
-
- display_update_log fix
- else
- display_update_log nofix
- fi
-
- temp_destroy $TMP_LIN_SUCCESS
- temp_destroy $TMP_LIN_FAIL
-}
diff --git a/var/lib/lunar/functions/config.lunar b/var/lib/lunar/functions/config.lunar
deleted file mode 100644
index ad8fb6c..0000000
--- a/var/lib/lunar/functions/config.lunar
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/config #
-# set_config, get_config, unset_config #
-# set_local_config, get_local_config, unset_local_config #
-# set_module_config, get_module_config, unset_module_config#
-# #
-############################################################
-# #
-# Copyrighted Auke Kok 2004 under GPLv2 #
-# #
-############################################################
-
-
-set_config()
-{
- local LINE NEW FILE VAR
- debug_msg "set_config ($@)"
-
- # remove leading/trailing whitespace
- VAR=${2#"${2%%[![:space:]]*}"}
- VAR=${VAR%%+([[:space:]])}
-
- LINE=$(grep -w "$VAR=.*" $1)
- FILE=$1
-
- shift 2
- if [ "$FILE" == "$LOCAL_CONFIG" ] ; then
- NEW="$(printf "%16s" "$VAR")=\"$@\""
- else
- NEW="$VAR=\"$@\""
- fi
-
- # on-demand creation
- if [ ! -f $FILE ] ; then
- touch $FILE
- fi
-
- lock_file $FILE &&
- if [ -n "$LINE" ] ; then
- sedit "/^\s*$VAR=/d" $FILE
- fi
- echo "$NEW" >> $FILE
- unlock_file $FILE
-}
-
-
-unset_config()
-{
- debug_msg "unset_config ($@)"
-
- # on-demand creation
- if [ ! -f $1 ] ; then
- touch $1
- fi
-
- lock_file $1 &&
- if [ -n "$2" ] ; then
- # make sure we escape those ':' characters:
- sedit "/^[ ]*$2=/d" $1
- fi
- unlock_file $1
-}
-
-
-get_config()
-{
- if [[ -f $1 ]] ; then
- grep -w "$2=.*" $1 | cut -d= -f2- | sed -e 's/^"//' -e 's/"$//'
- fi
-}
-
-
-set_local_config()
-{
- debug_msg "set_local_config ($@)"
- local VAR
- VAR=$1
- shift
- set_config "$LOCAL_CONFIG" "$VAR" "$@"
-}
-
-
-unset_local_config()
-{
- debug_msg "unset_local_config ($@)"
- unset_config "$LOCAL_CONFIG" "$1"
-}
-
-
-get_local_config() {
- get_config "$LOCAL_CONFIG" "$1"
-}
-
-
-set_module_config()
-{
- debug_msg "set_module_config ($@)"
- if [ -n "$MODULE" ] ; then
- set_config "$DEPENDS_CONFIG/$MODULE" "$1" "$2"
- fi
-}
-
-
-unset_module_config()
-{
- debug_msg "unset_module_config ($@)"
- if [ -n "$MODULE" ] ; then
- unset_config "$DEPENDS_CONFIG/$MODULE" "$1"
- fi
-}
-
-
-get_module_config()
-{
- debug_msg "get_module_config ($@)"
- if [ -n "$MODULE" ] ; then
- get_config "$DEPENDS_CONFIG/$MODULE" "$1"
- fi
-}
-
-
-get_other_module_config()
-{
- debug_msg "get_other_module_config ($@)"
- if [ -n "$1" ] ; then
- get_config "$DEPENDS_CONFIG/$1" "$2"
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/connect.lunar b/var/lib/lunar/functions/connect.lunar
deleted file mode 100644
index e5faab0..0000000
--- a/var/lib/lunar/functions/connect.lunar
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# download.lunar - get sources from the net #
-# #
-############################################################
-# leach is part of the sorcery spell management utility #
-# Copyright 2001 by Kyle Sallee #
-############################################################
-# #
-# this WAS the leach script of a source based Linux distro,#
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-# This secondly was lget mostly, and has been moved into #
-# a separate lunar functions file handling all the generic #
-# downloading functionality for lunar #
-# #
-############################################################
-# #
-# Parts Copyrighted Jason Johnston 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-# Parts Copyrighted Auke Kok 2002 under GPLv2 #
-# #
-############################################################
-
-
-connect() {
- local TIMEOUT
- debug_msg "connect ($@)"
-
- if ! ifconfig | grep -q "^eth[0-9]\|^wlan[0-9]\|^ppp[0-9]\|^ath[0-9]\|^tun[0-9]\|^ra[0-9]\|^usb[0-9]"
- then
- pon
-
- # Timeout in deciseconds to wait for Interface to come up.
- TIMEOUT=30
-
- until ifconfig | grep -q "^eth[0-9]\|^wlan[0-9]\|^ppp[0-9]\|^ath[0-9]\|^tun[0-9]\|^ra[0-9]\|^usb[0-9]" || [ $TIMEOUT == 0 ]
- do
- sleep 10
- (( TIMEOUT-- ))
- done
- disconnect
-
- fi
-
-}
-
-
-disconnect() {
- debug_msg "disconnect ($@)"
- if ps -C disconnect > /dev/null
- then return
- fi
-
- rm -f $TMPDIR/disconnect
- cat << EOF > $TMPDIR/disconnect
-#!/bin/sh
-
-while ps -A | grep -q "lget"; do sleep 120; done
-poff
-rm -f $TMPDIR/disconnect
-EOF
-
-chmod a+x $TMPDIR/disconnect
- $TMPDIR/disconnect &
-
-}
-
-
diff --git a/var/lib/lunar/functions/depends.lunar b/var/lib/lunar/functions/depends.lunar
deleted file mode 100644
index 7205953..0000000
--- a/var/lib/lunar/functions/depends.lunar
+++ /dev/null
@@ -1,425 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/depends #
-# includes find_depends is_depends in_depends #
-# remove_depends add_depends run_depends #
-# satisfy_depends #
-# #
-# 20020710 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-# Copyright Auke Kok 2004 under GPLv2 #
-# #
-############################################################
-
-
-# function : find_depends
-# usage : find_depends "module name"
-# purpose : recursive dependency finder, no need to be installed
-function find_depends() {
- local TMP_FDEPS
- debug_msg "find_depends ($@)"
-
- find_depends_intern() {
- local DEP
- for DEP in $(awk -F: -v mod=$1 '{if ($1==mod){print $2}}' $DEPENDS_CACHE) ; do
- DEP=$(unalias "$DEP")
- # this is our shortcut out:
- if ! grep -qx "$DEP" $TMP_FDEPS ; then
- echo "$DEP" >> $TMP_FDEPS
- if grep -q "^$1:$DEP:required:" $DEPENDS_CACHE ; then
- echo "$DEP"
- find_depends_intern "$DEP"
- elif module_installed "$DEP" ; then
- echo "$DEP"
- find_depends_intern "$DEP"
- fi
- fi
- done
- }
-
- TMP_FDEPS=$(temp_create "found.depends")
- find_depends_intern $(unalias $1)
- temp_destroy $TMP_FDEPS
-}
-
-
-# function : sort_by_dependency
-# usage : LIST=$(sort_by_dependency $LIST)
-# purpose : return a LIST sorted by dependency
-sort_by_dependency() {
- local TMP_LIST TMP_ALL TMP_TSRT A B
- debug_msg "sort_by_dependency ($@)"
-
- TMP_LIST=$(temp_create "deptree.in")
- TMP_ALL=$(temp_create "deptree.all")
-
- for M in $* ; do
- echo "$M" >> $TMP_LIST
- done
-
- # tsort the existing dep relations in all of moonbase
- TMP_TSRT=$(temp_create "dependency.sort")
- awk -F: '{print $1,$2}' $DEPENDS_CACHE | while read A B ; do
- B=$(MODULE=$A NEVER_ASK=1 DEPS_ONLY= unalias $B)
- echo "$A $B" >> $TMP_TSRT
- done
- tsort $TMP_TSRT 2> /dev/null | tac > $TMP_ALL
- temp_destroy $TMP_TSRT
-
- # append all modules that do not have a DEPENDS file at all at the end
- # note that this is logically WRONG, but it actually will help with
- # unincluded depends, and therefore is *better* behaviour
- for M in $* ; do
- if ! grep -q -x $M $TMP_ALL ; then
- echo $M >> $TMP_ALL
- fi
- done
-
- # now reverse grep over the files:
- cat $TMP_ALL | grep -x -f $TMP_LIST
-
- temp_destroy $TMP_LIST
- temp_destroy $TMP_ALL
-}
-
-
-is_depends() {
- debug_msg "is_depends ($@)"
- # Is $1 a previously selected dependency of any module.
- return $(grep -q ":$1:on:" $DEPENDS_STATUS)
-}
-
-
-in_depends() {
- debug_msg "in_depends ($@)"
- # Was $2 presented as a dependency for module $1
- return $(grep -q "^$1:$2:on:" $DEPENDS_STATUS)
-}
-
-
-remove_depends() {
- debug_msg "remove_depends ($@)"
- lock_file $DEPENDS_STATUS_BACKUP &&
- lock_file $DEPENDS_STATUS ||
- return 1
-
- if [ -n "$2" ] ; then
- if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
- grep -v "^$1:$2:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS
- verbose_msg "removing depends for \"$1\" on \"$2\""
- fi
- elif grep -q "^$1:" $DEPENDS_STATUS ; then
- grep -v "^$1:" $DEPENDS_STATUS_BACKUP | \
- grep -v ":$1:on:optional:" > $DEPENDS_STATUS
- verbose_msg "removing all depends for and optional on \"$1\""
- fi
-
- cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
-
- unlock_file $DEPENDS_STATUS &&
- unlock_file $DEPENDS_STATUS_BACKUP
-}
-
-
-add_depends() {
- debug_msg "add_depends ($@)"
- if ! grep -q "^$1:$2:$3:$4:$5:$6$" $DEPENDS_STATUS ; then
- lock_file $DEPENDS_STATUS_BACKUP &&
- lock_file $DEPENDS_STATUS &&
- if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
- grep -v "^$1:$2:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS
- else
- verbose_msg "adding \"$4\" depends for \"$1\" on \"$2\" ($3)"
- fi
-
- echo "$1:$2:$3:$4:$5:$6" >> $DEPENDS_STATUS &&
- cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP &&
- unlock_file $DEPENDS_STATUS &&
- unlock_file $DEPENDS_STATUS_BACKUP
- fi
-}
-
-
-run_depends() {
- debug_msg "run_depends ($@)"
- # local definitions of depends and optional_depends!
- depends() {
- local DEP
- debug_msg " depends ($@)"
- DEP=$(unalias $1)
- if grep -q "^$DEP\$" $TEMP_PREPAREDDEPS 2>/dev/null ; then
- return 0
- fi
-
- if module_installed $DEP ; then
- add_depends "$MODULE" "$DEP" "on" "required" "$2" "$3"
- echo "$DEP" >> $TEMP_PREPAREDDEPS
- elif ! is_depends $DEP ! module_installed $DEP && ! module_held $DEP ; then
- if module_exiled $DEP ; then
- message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! Error: required dependency ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${PROBLEM_COLOR} is exiled and cannot be installed${DEFAULT_COLOR}"
- return 1
- else
- message "${MODULE_COLOR}${MODULE}:${DEFAULT_COLOR}" \
- "${MESSAGE_COLOR}Adding required dependency${DEFAULT_COLOR}" \
- "${MODULE_COLOR}$DEP${DEFAULT_COLOR}"
- add_depends "$MODULE" "$DEP" "on" "required" "$2" "$3"
- lin --deps $DEP
- echo "$DEP" >> $TEMP_PREPAREDDEPS
- fi
- fi
- }
-
- optional_depends() {
- debug_msg " optional_depends ($@)"
- local DEP DEFAULT DEPMOD_AVAIL
- # parameters: $1 = module name
- # $2 = configure parameter if module wanted
- # $3 = configure parameter if module declined
- # $4 = description of why to use this module
-
- DEP=$(unalias $1)
- if ! grep -q "^$MODULE:$DEP:" $DEPENDS_STATUS ; then
-
- if module_exiled $DEP ; then
- verbose_msg "\"$MODULE\" optionally depends on exiled module \"$DEP\""
- add_depends "$MODULE" "$DEP" "off" "optional" "$2" "$3"
- else
- if module_installed $DEP ; then
- DEFAULT="y"
- else
- DEFAULT="n"
- fi
-
- if module_installed $DEP ; then
- DEPMOD_AVAIL="Use optional (${FILE_COLOR}installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
- else
- DEPMOD_AVAIL="Install & use optional (${PROBLEM_COLOR}not installed${QUERY_COLOR}) module ${MODULE_COLOR}$DEP${DEFAULT_COLOR}${MESSAGE_COLOR}"
- fi
-
- # this is shortcut case s1) as discussed in lunar-dev ML
- if module_installed $DEP && [ -z "$2" -a -z "$3" ] ; then
- verbose_msg "Auto-adding optional dependency \"$DEP\""
- add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
- lin --deps $DEP
- elif query "$DEPMOD_AVAIL
- ${QUERY_COLOR}Purpose: ${DEFAULT_COLOR}${MESSAGE_COLOR}$4 ${QUERY_COLOR}?" $DEFAULT ; then
- add_depends "$MODULE" "$DEP" "on" "optional" "$2" "$3"
- lin --deps $DEP
- else
- add_depends "$MODULE" "$DEP" "off" "optional" "$2" "$3"
- fi
- fi
- fi
- }
-
- grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
- if has_module_file $MODULE DEPENDS ; then
- if [ -n "$SINGLE_MODULE" ] ; then
- # we only need to show this once, but we get here twice per module
- message "${CHECK_COLOR}Checking dependencies for" \
- "${MODULE_COLOR}${MODULE}" \
- "${DEFAULT_COLOR}"
- fi
- run_module_file $MODULE DEPENDS
- fi
-}
-
-
-# function : satisfy_depends
-# usage : satisfy_depends (operates on $MODULE variable)
-# purpose : re-check module deps based on DEPENDS_CONFIG and DEPENDS_STATUS
-# NOTE: this is where a missing dependency gets installed! IOW we really do
-# "satisfy" any dependencies here!
-satisfy_depends() {
- local TMP_FILE DEP_MODULE DEP_STATUS DEP_ON DEP_OFF LINE
- debug_msg "satisfy_depends ($@)"
- if [ -n "$DEPS_ONLY" ] ; then
- return 0
- fi
-
- # make sure we start with clean OPTS here:
- unset OPTS
-
- if [ -s "$MODULE_CONFIG" ] ; then
- . $MODULE_CONFIG
- fi
-
- TMP_FILE=$(temp_create "${MODULE}.satify-depends")
- grep "^$MODULE:" $DEPENDS_STATUS > $TMP_FILE
-
- # first recursively check if all required dependencies are installed
- for DEP_MODULE in $(find_depends $MODULE | grep -v '%') ; do
- if [ $DEP_MODULE != $MODULE ]; then
- if ! module_installed $DEP_MODULE ; then
- if ! SINGLE_MODULE=1 lin $SILENT $COMPILE $DEP_MODULE ; then
- exit 1
- fi
- fi
- fi
- done
-
- # then parse $OPTS
- while read LINE; do
- DEP_MODULE=$(echo $LINE | cut -d: -f2)
- DEP_STATUS=$(echo $LINE | cut -d: -f3)
- DEP_ON=$(echo $LINE | cut -d: -f5)
- DEP_OFF=$(echo $LINE | cut -d: -f6)
-
- if [ -n "$FIX" ] ; then
- if DEP_STATUS="on" ; then
- lin $FIX $DEP_MODULE
- fi
- elif [ "$DEP_STATUS" == "off" ] || module_exiled $DEP_MODULE ; then
- OPTS="$OPTS $DEP_OFF"
- elif [ "$DEP_STATUS" == "on" ] && ! module_installed $DEP_MODULE && \
- ! module_held $DEP_MODULE ; then
- if SINGLE_MODULE=1 lin $DEPS_ONLY $SILENT $COMPILE $DEP_MODULE ; then
- OPTS="$OPTS $DEP_ON"
- else
- exit 1
- fi
- else
- OPTS="$OPTS $DEP_ON"
- fi
- done < $TMP_FILE
-
- temp_destroy $TMP_FILE
-}
-
-
-# conflicts... remove conflicting modules
-conflicts() {
- local DEP
- debug_msg "conflicts ($@)"
- DEP=$1
- if module_installed $DEP ; then
- message "${PROBLEM_COLOR}WARNING: ${DEFAULT_COLOR}${MODULE_COLOR}$DEP${DEFAULT_COLOR}${PROBLEM_COLOR} conflicts with module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
- if query "Do you want to remove module ${DEFAULT_COLOR}${MODULE_COLOR}$DEP${DEFAULT_COLOR}${QUERY_COLOR} ? " n ; then
- lrm $DEP
- else
- message "${PROBLEM_COLOR}ERROR: Cannot continue installing conflicting modules, exiting!${DEFAULT_COLOR}"
- exit 1
- fi
- fi
-
- true
-}
-
-
-run_conflicts() {
- debug_msg "run_conflicts ($@)"
- if has_module_file $MODULE CONFLICTS ; then
- run_module_file $MODULE CONFLICTS
- fi
-}
-
-
-build_module_depends() {
- debug_msg "build_module_depends ($@)"
- if [ -n "$DEPS_ONLY" ] ; then
- (
- if ! run_conflicts $1 ; then
- exit 1
- fi &&
- run_details $1 &&
- run_configure &&
- RECONFIGURE= run_depends
- )
- else
- if ! run_conflicts $1 ; then
- exit 1
- fi &&
- run_details $1 &&
- RECONFIGURE= run_depends &&
- RECONFIGURE= satisfy_depends
- fi
-}
-
-
-build_depends() {
- debug_msg "build_depends ($@)"
- for MODULE in $@ ; do
- if ! module_installed $MODULE || [ ! -n "$PROBE" ] ; then
- if ! module_held $MODULE ; then
- build_module_depends $MODULE
- else
- verbose_msg "Skipping dependency checking of held module \"$MODULE\""
- fi
- fi
- done
-}
-
-
-create_depends_cache()
-{(
- local TMP_DEP_CACHE DEPFILES DEPFILE MODULE
- debug_msg "create_depends_cache($@)"
-
- if [ ! -w $DEPENDS_CACHE -a -e $DEPENDS_CACHE ] ; then
- return 1
- fi
-
- if [ $MODULE_INDEX -nt $DEPENDS_CACHE ] ; then
- verbose_msg "Generating a new depends cache..."
- TMP_DEP_CACHE=$(temp_create "depends.cache")
-
- # you guessed it: local decls.
- depends() {
- echo "$MODULE:$1:required:$2:$3:"
- }
-
- optional_depends() {
- # No quotes, this prevent us from parsing newlines
- # if someone by accident add a newline in optional_depends
- echo $MODULE:$1:optional:$2:$3:$4
- }
-
- # yeah, this sucks:
- message() {
- :
- }
-
- # speedups for system moonbases:
- if [ "$MOONBASE" == "/var/lib/lunar/moonbase" ] ; then
- DEPFILES=$(grep "/DEPENDS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase))
- # don't forget zlocal:
- DEPFILES="$DEPFILES $(find $MOONBASE/zlocal -type f -name DEPENDS)"
- else
- DEPFILES=$(find $MOONBASE -type f -name DEPENDS)
- fi
-
- # fast method for re-creating the depends.cache, might take long though
- for DEPFILE in $DEPFILES ; do
- TMP=${DEPFILE%/*} MODULE=${TMP##*/} . $DEPFILE
- done > $TMP_DEP_CACHE &&
- install -m644 $TMP_DEP_CACHE $DEPENDS_CACHE
-
- temp_destroy $TMP_DEP_CACHE
- else
- verbose_msg "Skipping depends cache regeneration"
- fi
-)}
-
-
-# list all installed modules depending on $1
-list_installed_depending() {
- local SUBDEP
- debug_msg "list_installed_depending($2)"
- for SUBDEP in $(grep ":$1:" $DEPENDS_CACHE | cut -d: -f1) ; do
- if $(module_installed $SUBDEP ) ; then
- list_installed_depending $SUBDEP | sort | uniq
- echo $SUBDEP
- fi
- done
-}
-
-
diff --git a/var/lib/lunar/functions/download.lunar b/var/lib/lunar/functions/download.lunar
deleted file mode 100644
index 755dbe6..0000000
--- a/var/lib/lunar/functions/download.lunar
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# download.lunar - get sources from the net #
-# #
-############################################################
-# #
-# Copyright Auke Kok / Lunar-Linux 2005 under GPLv2 #
-# #
-############################################################
-
-
-lget_lock() {
- debug_msg "lget_lock ($@)"
- echo $$ > /var/lock/lgetting.$MODULE
-}
-
-
-lget_locked() {
- debug_msg "lget_locked ($@)"
- if [ -f "/var/lock/lgetting.$MODULE" ] &&
- ps `cat /var/lock/lgetting.$MODULE` | grep -q "lget" ; then
- true
- else
- false
- fi
-}
-
-
-lget_unlock() {
- debug_msg "lget_unlock ($@)"
- rm -f /var/lock/lgetting.$MODULE &> /dev/null
-}
-
-
-download_url() {
- local RETVAL
- debug_msg "download_url($@)"
- verbose_msg "trying to download \"${2}\" from \"${1}\""
- connect &&
- plugin_call SOURCE_DOWNLOAD $1 $2 $3
- return $?
-}
-
-
-download_module() {
-(
- local MAX_SOURCES SRC ALL_URLS URLS URL MLIST ALT REST HIT
- debug_msg "download_module ($@)"
- if ! run_details $1 ; then
- return 1
- fi
-
- if ! module_license_accepted $1 ; then
- message "${MESSAGE_COLOR}The license of this module is incompatible with the list of"
- message "allowed and/or rejected licenses. Please adjust the ACCEPTED_LICENSES or"
- message "REJECTED_LICENSES variables to include or not include the specific"
- message "license of this module.${DEFAULT_COLOR}"
- return 1
- fi
-
- MAX_SOURCES=${MAX_SOURCES:-100}
-
- # loop over all sources
- for (( N = 0 ; N < MAX_SOURCES ; N++ )) ; do
- # get the URL part
- eval SRC=\$$(echo SOURCE$N | sed s/SOURCE0/SOURCE/ )
- eval URLS=\${$(echo SOURCE${N}_URL | sed s/SOURCE0/SOURCE/ )[@]}
-
- # continue (to next) if empty once, break if empty twice
- if [ -z "$SRC" ] ; then
- if [ -z "$SECOND" ] ; then
- SECOND="yes"
- continue
- else
- break
- fi
- fi
-
- # silly that this exists:
- if [ "$CLEAR_CACHE" == "on" ] ; then
- verbose_msg "clearing source cache copy of \"$SRC\""
- rm -f $SOURCE_CACHE/$SRC 2>/dev/null
- fi
-
- add_url() {
- if [ -n "$1" ]; then
- if ! echo " $ALL_URLS " | grep -q " $1 "; then
- ALL_URLS="$ALL_URLS $1"
- fi
- fi
- }
-
- if ! plugin_call SOURCE_NEEDREFRESH ${URLS[0]} $SRC $SOURCE_CACHE && [ -f $SOURCE_CACHE/$SRC ] ; then
- # break out of the loop if the cache has it:
- verbose_msg "Skipping download of \"$SRC\" (in cache)"
- continue
- fi
-
- # check for cache?
- message "${MESSAGE_COLOR}Downloading source file" \
- "${FILE_COLOR}$SRC${DEFAULT_COLOR}" \
- "${MESSAGE_COLOR}for module" \
- "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
-
- if [ -n "$BASE_URL" ] ; then
- # in case -u was passed:
- ALL_URLS=$BASE_URL
- else
- # compose a list of URLS
- ALL_URLS=
- add_url $FRESORT_URL
- for URL in $URLS ; do
- add_url $URL
- done
- for URL in $URLS ; do
- if [ "$EXHAUSTIVE" != "on" ]; then
- continue
- fi
-
- # scan for hits against known clusters of mirrors
- for MLIST in $MIRRORS/*; do
- for ALT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST | grep -v "^Custom$"); do
- if [ "${URL:0:${#ALT}}" == "$ALT" ] ; then
- # compose the list of valid mirrors
- REST=${URL:${#ALT}}
- for HIT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
- add_url ${HIT}${REST}
- done
- fi
- done
- done
- done
- add_url $LRESORT_URL
- fi
-
- for URL in $ALL_URLS; do
- # and download
- if download_url $URL $SRC $SOURCE_CACHE == 0 ; then
- # done for this file!
- SUCCESS=1
- break
- fi
- done
- if [ ${SUCCESS:-0} == 0 ] ; then
- FAILALL=1
- error_message "${PROBLEM_COLOR}I don't know how to download ${QUERY_COLOR}\"$1\".${DEFAULT_COLOR}"
- error_message "${MESSAGE_COLOR}Install the package that provides the method and plugin to download it.${DEFAULT_COLOR}"
- fi
-
- done
-
- return ${FAILALL:-0}
-)
-}
-
-
-testpack () {
- local FILENAME
- debug_msg "testpack ($@)"
- if [ -f "$1" ]; then
- FILENAME=$1
- else
- FILENAME=$SOURCE_CACHE/$1
- fi
- if [ -f "$FILENAME" ] ; then
- FILEMAGIC=$(file -b $FILENAME)
- case $FILENAME in
- *.bz2|*.BZ2)
- echo $FILEMAGIC | grep -qw "bzip2"
- ;;
- *.gz|*.GZ|*.tgz|*.TGZ)
- echo $FILEMAGIC | grep -qw "gzip"
- ;;
- *.z|*.Z)
- echo $FILEMAGIC | grep -qw "compress"
- ;;
- *.zip|*.ZIP)
- echo $FILEMAGIC | grep -qw "Zip"
- ;;
- *.rpm|*.RPM)
- echo $FILEMAGIC | grep -qw "RPM"
- ;;
- *.CAB|*.cab)
- echo $FILEMAGIC | grep -qw "Cabinet"
- ;;
- *)
- # we don't know how to handle this type of file
- true
- ;;
- esac
- else
- # filename does not exist!
- false
- fi
-}
-
-
-show_downloading()
-{
- local DOWNLOAD_PID DOWNLOAD_LOG
- debug_msg "show_downloading ($@)"
- DOWNLOAD_PID=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f2)
- if [ -n "$DOWNLOAD_PID" ]; then
- DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
- if [ ! -d "/proc/$DOWNLOAD_PID" -a -f "$DOWNLOAD_LOG" ]; then
- cat $DOWNLOAD_LOG
- rm -f $DOWNLOAD_LOG
- elif [ -f "$DOWNLOAD_LOG" ]; then
- tail -s 0.1 -n 200 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
- sleep 1
- rm -f $DOWNLOAD_LOG
- fi
- elif lget_locked $MODULE; then
- message "${MESSAGE_COLOR}Please wait while downloading of ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} progresses${DEFAULT_COLOR}"
- while lget_locked $MODULE; do
- echo -n "."
- sleep 5
- done
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/edit.lunar b/var/lib/lunar/functions/edit.lunar
deleted file mode 100644
index 00c212a..0000000
--- a/var/lib/lunar/functions/edit.lunar
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash
-# #
-# edit.lunar - functions to edit files #
-# #
-####################################################################
-# #
-# Parts copyright Jason Johnston 2002 under GPLv2 #
-# #
-# Parts copyright Auke Kok 2002 under GPLv2 #
-# #
-####################################################################
-
-
-# function : patch_it
-# usage : patch_it patch_file patch_level
-# purpose : calls "patch -px < $filename", where filename may be a variety
-# of formats
-patch_it () {
- local PATCH TARCMD GZCMD TMPFILE1 TMPFILE2
- verbose_msg "patch_it \"$1\" \"$2\"";
-
- # get patch from $SOURCE_CACHE automatically
- if [ ! -f "$1" -a -f "$SOURCE_CACHE/$1" ] ; then
- PATCH="$SOURCE_CACHE/$1"
- else
- PATCH="$1"
- fi
-
- if [[ -n `echo $PATCH | grep '\.tar'` ]] ; then
- TARCMD="tar x -O"
- else
- TARCMD="cat"
- fi
-
- if [[ -n `echo $PATCH | grep '\.bz2$'` ]] ; then
- GZCMD="bzcat"
- elif [[ -n `echo $PATCH | grep '\.gz$'` ]] ; then
- GZCMD="zcat"
- elif [[ -n `echo $PATCH | grep -e '\.xz$' -e '\.lzma$'` ]] ; then
- GZCMD="xzcat"
- else
- GZCMD="cat"
- fi
-
- TMPFILE1=$(temp_create "patch_1")
- TMPFILE2=$(temp_create "patch_2")
-
- if $GZCMD $PATCH > $TMPFILE1 ; then
- # uncompress OK
- if cat $TMPFILE1 | $TARCMD > $TMPFILE2 ; then
- # untar OK
- if patch -N -p$2 < $TMPFILE2 ; then
- # patch cmd is OK
- temp_destroy $TMPFILE1
- temp_destroy $TMPFILE2
- return 0
- fi
- fi
- fi
-
- message "${PROBLEM_COLOR}! Broken patch file ${DEFAULT_COLOR}${FILE_COLOR}$PATCH${DEFAULT_COLOR}"
-
- temp_destroy $TMPFILE1
- temp_destroy $TMPFILE2
- return 255
-}
-
-
-# function : sedit
-# usage : sedit sed-statement file [file [file] ...]
-# purpose : edit [files] with a sed function
-sedit () {
- local SEDIT
- debug_msg "sedit ($@)"
- SEDIT=$1
- shift
- for FILE in $@ ; do
- verbose_msg "Editing \"$FILE\""
- sed -i "$SEDIT" "$FILE"
- done
-}
-
-
-# function : edit_file
-# usage : edit_file FILENAME
-# purpose : to edit a file
-edit_file() {
- debug_msg "edit_file ($@)"
- ${EDITOR:-nano} $1
-}
-
-
diff --git a/var/lib/lunar/functions/init.lunar b/var/lib/lunar/functions/init.lunar
deleted file mode 100644
index 5f8fc5e..0000000
--- a/var/lib/lunar/functions/init.lunar
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-# #
-# init.lunar - Lunar subroutines #
-# #
-############################################################
-# #
-# this WAS the subroutines of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Copyright 2001 by Kyle Sallee #
-# #
-# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-
-# function : enviro_check
-# usage : enviro_check
-# purpose : check if the shell is proper
-enviro_check() {
- debug_msg "enviro_check ($@)"
- if [ -z $LUNAR_INSTALL ]; then
- if [ -z "$SHELL" ] || [ "$(getent passwd $USER | cut -d: -f3)" != "0" ] ; then
- message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
- "You are not running a fully initialized root shell, consider"
- message "running a proper root shell with 'su -'" \
- "${DEFAULT_COLOR}"
- fi
- fi
-}
-
-# function : root_check
-# usage : root_check
-# purpose : check if the user is root
-root_check() {
- debug_msg "root_check ($@)"
- if [ "$UID" != "0" ] ; then
- message "${PROBLEM_COLOR}ERROR:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
- "User must have root privileges to run this program" \
- "${DEFAULT_COLOR}"
- exit 1
- fi
-}
-
-
-# function : set_priority
-# usage : set_priority
-# purpose : force niceness on lunar's processes
-set_priority() {
- debug_msg "set_priority ($@)"
- LUNAR_PRIORITY=${LUNAR_PRIORITY:-"+10"}
- renice "$LUNAR_PRIORITY" -p $$ 2> /dev/null >/dev/null
-}
-
-
diff --git a/var/lib/lunar/functions/kernel.lunar b/var/lib/lunar/functions/kernel.lunar
deleted file mode 100644
index 8c9251d..0000000
--- a/var/lib/lunar/functions/kernel.lunar
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# kernel.lunar functions for managing kernel installation #
-# and bootloaders #
-# #
-############################################################
-# #
-# Parts Copyright Terry Chan 2002 GPLv2 #
-# Parts Copyright Niki Guldbrand 2003 GPLv2 #
-# Parts Copyright FW Systems llc 2003 GPLv2 #
-# Parts Copyright Auke Kok 2005 GPLv2 #
-# Parts Copyright Stefan Wold 2010 GPLv2 #
-# #
-############################################################
-
-
-# Description : This function makes backups of the kernels and modules
-# Arg 1 : Filename of the kernel to backup (With or without full path)
-# With the format $VERSION_$EXTRAVERSION
-backup_mods_krnl() {
- debug_msg "backup_mods_krnl ($@)"
-
- devoke_installwatch
-
- if [ -f /boot/$1.old ]; then
- verbose_msg "moving old kernel backup"
- mv -f /boot/$1.old /boot/$1.old_2
- fi
- if [ -f /boot/$1 ]; then
- verbose_msg "copying $1"
- cp -p /boot/$1 /boot/$1.old
- fi
- if [ -d /lib/modules/$1 ]; then
- rm -rf /lib/modules/$1.old
- cp -a /lib/modules/$1 /lib/modules/$1.old
- fi
-
- invoke_installwatch
-}
-
-
-update_bootloader() {
- plugin_call KERNEL_UPDATEBOOTLOADER $1 $2
-}
-
-
-# function: kernel_config_exists
-# usage: kernel_config_exists
-# purpose: Verify that a readable kernel config is available
-# returns: Config file path, (0) if successful, (1) if config not found
-kernel_config_exists() {
- if [ -e /proc/config.gz ]; then
- echo "/proc/config.gz"
- elif [ -e /usr/src/linux/.config ]; then
- echo "/usr/src/linux/.config"
- elif [ -e $CONFIG_CACHE/.config.2.6.stable ]; then
- echo "$CONFIG_CACHE/.config.2.6.stable"
- else
- return 1
- fi
- return 0
-}
-
-# function: kernel_option_present
-# usage: kernel_option_present config_option
-# purpose: Check if a kernel option is configured
-# returns: (0) if option is found and enabled, (1) if option is not found or disabled, (255) if kernel config not found
-kernel_option_present() {
- local KERNEL_CONFIG KERNEL_OPTION KERNEL_VALUE CAT
- KERNEL_CONFIG=$(kernel_config_exists) || return 255
- KERNEL_OPTION=$1
- KERNEL_VALUE=$2
-
- case $KERNEL_CONFIG in
- *.gz)
- CAT=zcat
- ;;
- *)
- CAT=cat
- ;;
- esac
-
- if [ -n "$KERNEL_VALUE" ]; then
- if $CAT $KERNEL_CONFIG | grep -Eq "^$KERNEL_OPTION=\"$KERNEL_VALUE\""; then
- return 0
- fi
- else
- if $CAT $KERNEL_CONFIG | grep -Eq "^$KERNEL_OPTION=(y|m)$"; then
- return 0
- fi
- fi
-
- return 1
-}
diff --git a/var/lib/lunar/functions/locking.lunar b/var/lib/lunar/functions/locking.lunar
deleted file mode 100644
index 5620dba..0000000
--- a/var/lib/lunar/functions/locking.lunar
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/locking #
-# includes lock_file and unlock_file functions #
-# #
-# 20020526 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# function: lock_file
-# usage : lock_file <absolute file name>
-# purpose : locks a file or wait until. Better use as lock_file <file> && || etc
-function lock_file() {
- local TEMPFILE LOCKFILE STALE_PID
- debug_msg "lock_file ($@)"
- function file_lock() {
- #locking is disabled if ln or rm not found!!
- [ -x "/bin/ln" ] || return 0
- [ -x "/bin/rm" ] || return 0
-
- TEMPFILE="$1.$$"
- LOCKFILE="$1.lock"
-
- # test permission
- if ! echo $$ > $TEMPFILE 2>/dev/null; then
- message "${PROBLEM_COLOR}You don't have permission to access" \
- "$TEMPFILE ${DEFAULT_COLOR}"
- exit 1
- fi
-
- # file exists?
- if [ ! -f "$1" ]; then
- touch "$1"
- fi
-
- # set lockfile
- if ln $TEMPFILE $LOCKFILE 2>/dev/null ; then
- rm -f $TEMPFILE
- return 0
- # failed due to other lock?
- elif [ ! -f "$LOCKFILE" ]; then
- return 1
- fi
- # stale lock?
- STALE_PID=`< $LOCKFILE`
- if [ "$STALE_PID" -le "0" ]; then
- return 1
- fi
- if kill -0 $STALE_PID 2>/dev/null; then
- rm -f $TEMPFILE
- return 1
- fi
- # yes, stale
- rm -f $LOCKFILE 2>/dev/null &&
- echo "Removed stale lock file of process $STALE_PID"
- if ln $TEMPFILE $LOCKFILE 2>/dev/null; then
- rm -f $TEMPFILE
- return 0
- fi
- rm -f $TEMPFILE
- return 1
- }
-
- while ! file_lock $1; do
- message "${MESSAGE_COLOR}Waiting to lock the file $1${DEFAULT_COLOR}"
- sleep 1
- done
- return 0
-}
-
-
-# function: unlock_file
-# usage : unlock_file <absolute file name>
-# purpose : unlocks a file
-function unlock_file() {
- debug_msg "unlock_file ($@)"
- #unlocking is disabled if rm not found!!
- [ -x "/bin/rm" ] || return 0
- rm -f $1.lock 2>/dev/null && return 0
- return 1
-}
-
-
-lin_locked() {
- debug_msg "lin_locked ($@)"
- [ -f /var/lock/installing.$1 ] &&
- ps `cat /var/lock/installing.$1` |
- grep -q "lin"
-}
-
-
-solo_locked() {
- debug_msg "solo_locked ($@)"
- for SOLO_MODULE in `cat $SOLO` ; do
- if lin_locked $SOLO_MODULE ; then
- message "${PROBLEM_COLOR}lining${DEFAULT_COLOR}${MESSAGE_COLOR} of other modules is disabled during a lin ${MODULE_COLOR}$SOLO_MODULE${DEFAULT_COLOR}"
- return
- fi
- done
- false
-}
-
-
-current_locked() {
- debug_msg "current_locked ($@)"
- if lin_locked $MODULE; then
- message "${QUERY_COLOR}Detected lin lock file: ${FILE_COLOR}$linING${DEFAULT_COLOR_COLOR}"
- message "${MESSAGE_COLOR}Now waiting for ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}${MESSAGE_COLOR} to finish installing or for the lock to clear.${DEFAULT_COLOR}"
-
- while lin_locked $MODULE; do sleep 2; done
- false
- else
- false
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/logging.lunar b/var/lib/lunar/functions/logging.lunar
deleted file mode 100644
index a7d5238..0000000
--- a/var/lib/lunar/functions/logging.lunar
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/logging.lunar #
-# #
-############################################################
-
-
-start_logging () {
- debug_msg "start_logging ($@)"
- export C_LOG=$(temp_create "${MODULE}.compile-log")
- export C_FIFO=$(temp_create "${MODULE}.compile-fifo")
-
- # just remaking this as FIFO
- rm -f $C_FIFO
- mknod $C_FIFO p
- echo "++ Mark Compile start : \"$MODULE\" \"$VERSION\" \"$(date -Ru)\"" > $C_LOG
- activate_voyeur
-}
-
-
-stop_logging() {
- debug_msg "stop_logging ($@)"
- echo "++ Mark Compile stop : \"$MODULE\" \"$VERSION\" \"$(date -Ru)\"" >> $C_LOG
- message "${MESSAGE_COLOR}Creating" \
- "${FILE_COLOR}$COMPILE_LOGS/$MODULE-$VERSION.bz2" \
- "${DEFAULT_COLOR}"
-
- bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MODULE-$VERSION.bz2
- temp_destroy $C_LOG
- temp_destroy $C_FIFO
-}
-
-
-progress() {
- local OLDLOG OLDSZ S PC
- OLDLOG=$(ls -1d $COMPILE_LOGS/$MODULE-*.bz2 2>&- | head -n 1)
- if [[ -f $OLDLOG ]]; then
- X="############################################################"
- Y=" "
- OLDSZ=$(bzcat $OLDLOG | wc -c)
- while true ; do
- read -t 2 LINE
- STATUS=$?
- if [ $STATUS -gt 128 ]; then
- sleep 2
- continue
- elif [ $STATUS -eq 1 ]; then
- echo -ne "\r [${X:0:60}] (100%)\n"
- exit
- fi
- (( S += ${#LINE} ))
- if [[ $S -gt OLDSZ ]]; then
- # never print 100% - subtract 1 :)
- S=$((OLDSZ - 1))
- fi
- PC=$((S * 100 / OLDSZ))
- L=$((S * 60 / OLDSZ))
- echo -ne "\r [${X:0:$L}${Y:0:$((60 - L))}] ($PC%)\r"
- done
- else
- SPINNER="/-\|"
- # spinerrrrrr!!!!
- while true ; do
- read -t 2 LINE
- STATUS=$?
- if [ $STATUS -gt 128 ]; then
- sleep 2
- continue
- elif [ $STATUS -eq 1 ]; then
- exit
- fi
- ((C++))
- if [[ $C -gt ${#SPINNER} ]]; then
- C=0
- fi
- echo -en "\r [${SPINNER:$C:1}]\r"
- done
- fi
-}
-
-
-activate_voyeur() {
- debug_msg "activate_voyeur ($@)"
- if [ -z "$SILENT" ] ; then
- case $VOYEUR in
- on) tee -a $C_LOG < $C_FIFO & ;;
- p*) tee -a $C_LOG < $C_FIFO | progress & ;;
- *) tee -a $C_LOG < $C_FIFO >/dev/null & ;;
- esac
- else
- tee -a $C_LOG < $C_FIFO >/dev/null &
- fi
-}
-
-
-activity_log() {
- debug_msg "activity_log ($@)"
- lock_file $ACTIVITY_LOG &&
- echo -e "$(date -u +%Y%m%d-%T)\t$1\t$2\t$3\t$4\t$5" >> $ACTIVITY_LOG
- unlock_file $ACTIVITY_LOG
-}
-
-
diff --git a/var/lib/lunar/functions/main.lunar b/var/lib/lunar/functions/main.lunar
deleted file mode 100644
index 3254204..0000000
--- a/var/lib/lunar/functions/main.lunar
+++ /dev/null
@@ -1,363 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/main.lunar #
-# contains all main handling code, aka the long complex #
-# functions like renew, update, fix, etc. One day they all #
-# will be in here. #
-# #
-############################################################
-# #
-# Copyrighted Auke Kok 2003 under GPLv2 #
-# #
-############################################################
-
-# function : renew
-# usage : renew
-# purpose : frontend function that includes all renewing code
-renew() {
- debug_msg "renew ($@)"
- message "${MESSAGE_COLOR}Starting update of installed modules${DEFAULT_COLOR}"
-
- purge_modules
-
- export TMP_LIN_SUCCESS=$(temp_create "successful")
- export TMP_LIN_FAIL=$(temp_create "failed")
-
- update_modules
-
- # Only run this if there was something to update
- if [ $? -ne "255" ]; then
- if [ "$AUTOFIX" == "on" ] ; then
- message "${MESSAGE_COLOR}Executing AUTOFIX : lunar fix${DEFAULT_COLOR}"
- run_fix
- fi
-
- if [ "$AUTOPRUNE" == "on" ] ; then
- message "${MESSAGE_COLOR}Executing AUTOPRUNE : lunar prune${DEFAULT_COLOR}"
- prune
- fi
-
- display_update_log renew
- fi
-
- temp_destroy $TMP_LIN_SUCCESS
- temp_destroy $TMP_LIN_FAIL
-
-}
-
-
-update() {
- debug_msg "update ($@)"
- if ps -C lin > /dev/null ; then
- error_message "${PROBLEM_COLOR}Unable to update lunar concurrently while installing.${DEFAULT_COLOR}"
- return 1
- fi
-
- # test if $LUNAR_MODULE is installed (for old boxes)
- if [ -z "$LUNAR_MODULE" ] ; then
- for ALT in $LUNAR_MODULES ; do
- if module_installed $ALT ; then
- lunar set LUNAR_MODULE $ALT
- export LUNAR_MODULE=$ALT
- verbose_msg "LUNAR_MODULE set to \"$ALT\""
- fi
- done
- if [ -z "$LUNAR_MODULE" ] ; then
- error_message "${PROBLEM_COLOR}Error:${DEFAULT_COLOR} ${MESSAGE_COLOR}No core code installed: install one of the following first:${DEFAULT_COLOR}"
- error_message $LUNAR_MODULES
- error_message "${MESSAGE_COLOR}then try again (I can't update if I don't know which toolset I use)${DEFAULT_COLOR}"
- return 1
- fi
- fi
-
- if lin moonbase ; then
- if (( $(lvu installed $LUNAR_MODULE) < $(lvu version $LUNAR_MODULE) ))
- then
- lin $LUNAR_MODULE && lunar renew
- else
- lunar renew
- fi
- fi
-}
-
-
-rebuild() {
- local LIST QUEUE TMP_QUEUE
- debug_msg "rebuild ($@)"
-
- message "${MESSAGE_COLOR}Starting non-recursive rebuild${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}Running FIX on all modules${DEFAULT_COLOR}"
- run_fix
-
- LIST=$(grep ":installed:" $MODULE_STATUS | cut -d: -f1 | grep -v moonbase | grep -v $LUNAR_MODULE)
-
- message "${MESSAGE_COLOR}Sorting modules by dependency${DEFAULT_COLOR}"
- QUEUE=$(sort_by_dependency $LIST)
-
- TMP_QUEUE=$(temp_create "rebuild-queue")
- for MODULE in $QUEUE ; do
- echo $MODULE >> $TMP_QUEUE
- done
-
- unset MODULE
- if query "Edit rebuild queue?" n ; then
- edit_file $TMP_QUEUE
- fi
-
- QUEUE=$(cat $TMP_QUEUE)
- temp_destroy $TMP_QUEUE
-
- if [ -n "$QUEUE" ] ; then
- export TMP_LIN_SUCCESS=$(temp_create "successful")
- export TMP_LIN_FAIL=$(temp_create "failed")
-
- message "${MESSAGE_COLOR}Starting rebuild of modules${DEFAULT_COLOR}"
- lin -c $QUEUE
-
- display_update_log rebuild
- temp_destroy $TMP_LIN_SUCCESS
- temp_destroy $TMP_LIN_FAIL
- fi
-}
-
-
-expand_cache_safe() {(
- debug_msg "expand_cache_safe ($@)"
-
- export SOURCE_DIRECTORY=$BUILD_DIRECTORY/resurrect-$MODULE-$VERSION
- mk_source_dir $SOURCE_DIRECTORY
- # untar the file so we can compare first
- tar -pkxjf $1 -C $SOURCE_DIRECTORY 1>/dev/null 2>&1
- # make a md5sum list of files
- TMP_TARGETS=$(temp_create "resurrect.targets.$MODULE")
- tar j --list < $1 > $TMP_TARGETS
- TMP_TARGETS_OK=$(temp_create "resurrect.targets_OK.$MODULE")
- # do directories: we don't care here
- # the sed trick is advanced: a non-greedy pattern that returns all
- # directory names listed in the input
- for TARGET in $(cat $TMP_TARGETS | sed 's/\/[^\/]*$/\//g' ) ; do
- if [ ! -d $TARGET ]; then
- debug_msg "mkdir -p $TARGET"
- mkdir -p $TARGET
- fi
- done
- # do links
- for TARGET in $(find $SOURCE_DIRECTORY -type l | sed "s:$SOURCE_DIRECTORY::g" ) ; do
- # wipe the current link cos it ruins things
- if [ -h "$TARGET" ] ; then
- rm -f "$TARGET"
- fi
- debug_msg "ln -s $(readlink $SOURCE_DIRECTORY$TARGET) $TARGET"
- echo "$TARGET" >> $TMP_TARGETS_OK
- done
- # do files - bulk process the normal ones
- cat $TMP_TARGETS | grep -v -f $EXCLUDED >> $TMP_TARGETS_OK
- # now double check the EXCLUDED ones
- for TARGET in $(cat $TMP_TARGETS | grep -f $EXCLUDED ) ; do
- if [ -e "$TARGET" ] ; then
- debug_msg "Cowardishly not overwriting \"$TARGET\""
- else
- echo "$TARGET" >> $TMP_TARGETS_OK
- fi
- done
-
- debug_msg "tar xjf $1 -P -k -T $TMP_TARGETS_OK"
- tar xjf $1 -P -k -T $TMP_TARGETS_OK > /dev/null 2>&1
-
- temp_destroy $TMP_TARGETS
- temp_destroy $TMP_TARGETS_OK
- rm_source_dir $SOURCE_DIRECTORY
-)}
-
-
-resurrect() {
-(
- debug_msg "resurrect ($@)"
-
- if [ -s /etc/lunar/local/optimizations ] ; then
- . /etc/lunar/local/optimizations
- fi
- if ! run_details $1 ; then
- return 1
- fi
- run_conflicts &&
- satisfy_depends &&
-
- STATUS=installed &&
-
- if module_held $MODULE ; then
- VERSION=$(installed_version $MODULE)
- STATUS=held
- lrm --keepconfig $MODULE
- elif module_installed $MODULE ; then
- lrm --keepconfig $MODULE
- fi &&
-
- CACHE_BZ="$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2"
-
- if [ -f "$CACHE_BZ" ] && bzip2 -tf $CACHE_BZ ; then
- message "${RESURRECT_COLOR}Resurrecting ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR} ${MESSAGE_COLOR}version ${VERSION_COLOR}${VERSION}${DEFAULT_COLOR}"
- expand_cache_safe $CACHE_BZ &&
- add_module $MODULE $STATUS $VERSION &&
- verbose_msg "running \"lunar fix $MODULE\"" &&
- if run_fix $MODULE ; then
- report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
- sound SUCCESS
- activity_log "lin" "$MODULE" "$VERSION" "success" "resurrected"
- message "${RESURRECT_COLOR}Resurrected ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR} ${MESSAGE_COLOR}successfully${DEFAULT_COLOR}"
- else
- sound FAILURE
- activity_log "lin" "$MODULE" "$VERSION" "failed" "resurrect failed"
- false
- fi
- else
- # do not log an error in case we tried autoresurrect:
- if [ "$AUTORESURRECT" == "off" -o -n "$COMPILE" ] ; then
- sound FAILURE
- activity_log "lin" "$MODULE" "$VERSION" "failed" "resurrect failed"
- false
- fi
- false
- fi
-)
-}
-
-resurrect_modules() {
- debug_msg "resurrect_modules ($@)"
- for MODULE in $@ ; do
- if run_details $MODULE ; then
- resurrect $MODULE
- fi
- done
-}
-
-
-lin_module() {
-(
- debug_msg "lin_module ($@)"
- xterm_msg "compiling $1"
- # make sure we got all the info
- if ! run_details $1 ; then
- return 1
- fi
-
- # resurrect if we can, but not is -c was issued
- if [ "$AUTORESURRECT" == "on" -a -z "$COMPILE" ] ; then
- # we also do not resurrect if $MODULE is currently installed!
- if ! module_installed $MODULE ; then
- if resurrect $MODULE ; then
- return 0
- fi
- fi
- fi
-
- # set the installwatchfile
- export INSTALLWATCHFILE=$(temp_create "$MODULE.installwatch")
-
- # lock the module for installation, check for moonbase call
- linING="/var/lock/installing.$MODULE"
- if [ "$MODULE" == "moonbase" ] ; then
- if ! current_locked && ! solo_locked ; then
- echo $$ > $linING &&
- lget moonbase &&
- rm -f $linING &&
- return
- else
- exit 1
- fi
- fi
- check_blacklist &&
-
- # here we run CONFLICTS, DEPENDS and CONFIGURE stuff
- run_conflicts &&
- satisfy_depends &&
- show_downloading &&
-
- OPTS="$OPTS `grep ^$MODULE: $TEMP_CONFIGOPTS | cut -d: -f2`"
-
- # last minute source code presence check:
- (
- for SOURCE in $(sources $MODULE) ; do
- if [ ! -f $SOURCE_CACHE/$SOURCE ] ; then
- lget $MODULE
- break
- fi
- done
- ) &&
-
- # now entering the physical BUILD stage
- if ! current_locked && ! solo_locked ; then
- echo $$ > $linING &&
- start_logging
-
- if ! run_pre_build ; then
- LIN_ERROR="PRE_BUILD"
- else
- if ! run_build ; then
- LIN_ERROR="BUILD"
- else
- if ! run_post_build ; then
- LIN_ERROR="POST_BUILD"
- fi
- fi
- fi
-
- stop_logging
-
- if [ -n "$LIN_ERROR" ] ; then
- if [ -f "$INSTALLWATCHFILE" ] ; then
- temp_destroy $INSTALLWATCHFILE
- fi
- sound FAILURE
- message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
- rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
- activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
- return 1
- fi
-
- if ! finish_install ; then
- LIN_ERROR="POST_BUILD"
- else
- if ! run_post_install ; then
- LIN_ERROR="POST_INSTALL"
- fi
- fi
- if [ -f "$INSTALLWATCHFILE" ] ; then
- verbose_msg "removing installwatch file"
- temp_destroy $INSTALLWATCHFILE
- fi
-
- if [ -n "$LIN_ERROR" ] ; then
- sound FAILURE
- message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
- rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
- activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
- return 1
- fi
-
- rm_source_dir &&
- report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
- rm -f $linING &&
- sound SUCCESS &&
- activity_log "lin" "$MODULE" "$VERSION" "success"
-
- if [ "$?" != 0 ] ; then
- sound FAILURE
- message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
- rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
- activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during or after $LIN_ERROR"
- return 1
- fi
- fi
-)
-}
-
-
diff --git a/var/lib/lunar/functions/messages.lunar b/var/lib/lunar/functions/messages.lunar
deleted file mode 100644
index fcbfe39..0000000
--- a/var/lib/lunar/functions/messages.lunar
+++ /dev/null
@@ -1,236 +0,0 @@
-#!/bin/bash
-# #
-# messages - lunar message display functions #
-# #
-############################################################
-# #
-# this WAS the subroutines of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Copyright 2001 by Kyle Sallee #
-# #
-# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-# #
-# moved to messages.lunar by sofar 2003 #
-# #
-############################################################
-
-
-# error msgs go to stderr !
-error_message() {
- echo -e "$*" >&2
-}
-
-
-# normal messages go to stdout
-message() {
- if [[ -z "$SILENT" ]] ; then
- echo -e "$*"
- fi
-}
-
-
-verbose_msg() {
- if [[ "$VERBOSE" == "on" ]] ; then
- message "+ $*" >&2
- fi
-}
-
-
-debug_msg() {
- local PLUSSES
- if [[ -n "$LUNAR_DEBUG" ]] ; then
- if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
- PLUSSES="+++++++++++++++++++++++++*"
- echo -n "${PLUSSES:0:${#FUNCNAME[@]}} " >&2
- fi
- if [[ "$LUNAR_DEBUG" -ge "4" ]] ; then
- echo -n "$(basename $0)[$$]: " >&2
- fi
- if [[ "$LUNAR_DEBUG" -ge "3" ]] ; then
- echo -n "$(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: " >&2
- fi
- if [[ "$LUNAR_DEBUG" -ge "2" ]] ; then
- if [[ "${FUNCNAME[1]}" != "$1" ]]; then
- echo "$@" >&2
- else
- echo "${FUNCNAME[1]} ($@)" >&2
- fi
- else
- echo "++ $@" >&2
- fi
- if [[ "$LUNAR_DEBUG" -ge "5" ]] ; then
- echo "++ $@" >> $TMPDIR/lp_debuglog.$$
- if [ -f $TMPDIR/l_debug_var.$$ ] ; then
- mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
- else
- return
- fi
- set | grep '^[A-Z]' | sed 's/^/VAR /' > $TMPDIR/l_debug_var.$$
- diff -U0 $TMPDIR/l_debug_var.$$.old $TMPDIR/l_debug_var.$$ | \
- grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ >&2
- fi
- fi
-}
-
-
-# function : xterm_msg
-# usage : xterm_msg MESSAGE
-# purpose : To display a short message in the title bar of a X terminal
-xterm_msg() {
- local MSG
- debug_msg "xterm_bar ($@)"
- case $TERM in
- xterm*|gnome*|konsole*|rxvt*)
- MSG="$(hostname) $(basename $0)[$$]: $@"
- echo -n "]0; $MSG "
- ;;
- esac
-}
-
-# function : report FILE [description] MODULE VERSION
-report() {
- local TMP_MAIL
- debug_msg "report ($@)"
- if [ ! -f "$1" ] ; then
- return
- fi
-
- if [ "$VIEW_REPORTS" == "on" ] ; then
- sound REPORT
- if query "View $2 for ${MODULE_COLOR}${3}-${VERSION_COLOR}${4}${DEFAULT_COLOR}${QUERY_COLOR} ?" n ; then
- view_file $1
- fi
- fi
-
- if [ "$MAIL_REPORTS" == "on" ] ; then
- TMP_MAIL=$(temp_create "mailreport")
- date -u > $TMP_MAIL
- echo >> $TMP_MAIL
- view_file $1 >> $TMP_MAIL
- mail -s "Lunar Report from $HOSTNAME : $2 for $3-$4" \
- $ADMIN < $TMP_MAIL 2>/dev/null
- temp_destroy $TMP_MAIL
- fi
-
- true
-}
-
-
-query() {
- local RESPONSE
- debug_msg "query ($@)"
- # 2 arguments
- # query "what do you want? " DEFAULT
-
- if [ -z "$SILENT" ]; then
- unset RESPONSE
- while [ -z "$RESPONSE" ]; do
- if [ -n "$MODULE" ]; then
- echo -e -n "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}: "
- fi
- echo -e -n "${QUERY_COLOR}$1 [$2] ${DEFAULT_COLOR}"
- read -t $PROMPT_DELAY -n 1 RESPONSE
- if [ -z "$RESPONSE" ]; then
- RESPONSE=${RESPONSE:-$2}
- else
- echo
- fi
- case $RESPONSE in
- y|Y) true ;;
- n|N) false ;;
- *) unset RESPONSE ;;
- esac
- done
- else
- case $2 in
- y|Y) true ;;
- n|N) false ;;
- *) message "Error: bad input in query()" ; exit 1 ;;
- esac
- fi
-}
-
-
-# mquery is a wrapper to autodetect if a certain y/n parameter in a module
-# config is not set yet and handles the case in a single function
-# usage: mquery USE_LILO "Use lilo instead of grub ?" y [yesopts] [noopts]
-# note : $MODULE must be set properly
-# note : both [yesopts] and [noopts] may be empty or ""
-mquery()
-{
- debug_msg "mquery ($@)"
- if [ -n "$MODULE" ]; then
- if [ -z "$(get_module_config $1)" ]; then
- # it's not set yet... start the asking loop
- if query "$2" "$3" ; then
- set_module_config "$1" y
- else
- set_module_config "$1" n
- fi
- fi
- # and lookup the result in case of yes/no opts
- if [ $(get_module_config $1) == "y" ] ; then
- OPTS="$OPTS $4"
- else
- OPTS="$OPTS $5"
- fi
- fi
-}
-
-
-color() {
- debug_msg "color ($@)"
- case $1 in
- off) unset MODULE_COLOR
- unset VERSION_COLOR
- unset QUERY_COLOR
- unset LRM_COLOR
- unset CHECK_COLOR
- unset RESURRECT_COLOR
- unset FILE_COLOR
- unset SYMLINK_COLOR
- unset PROBLEM_COLOR
- unset MESSAGE_COLOR
- unset DEFAULT_COLOR
- COLOR=off
- ;;
- on) COLOR=on
- ;;
- esac
-}
-
-
-sound()
-{
- debug_msg "sound ($@)"
- if [ "$SOUND" == "on" ]; then
- if [ -f "$SOUND_DIRECTORY/$SOUND_THEME/$1" ]; then
- ( cd / ; play "$SOUND_DIRECTORY/$SOUND_THEME/$1" & )
- fi
- fi
-}
-
-
-# function : show_fancy_progress
-# usage : show_fancy_progress <fancy_progress_var_string>
-# purpose : display progress ex: show_fancy_progress "Processing: $MODULE"
-show_fancy_progress () {
- debug_msg "show_fancy_progress ($@)"
- echo -en "\r \r$1\r"
-}
-
-
diff --git a/var/lib/lunar/functions/misc.lunar b/var/lib/lunar/functions/misc.lunar
deleted file mode 100644
index 0a2cf31..0000000
--- a/var/lib/lunar/functions/misc.lunar
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/bin/bash
-# #
-# misc.lunar - Lunar subroutines #
-# #
-############################################################
-# #
-# this WAS the subroutines of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Copyright 2001 by Kyle Sallee #
-# #
-# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# function : ld_add
-# usage : ld_add <directory>
-# purpose : Add a path to ld.so.conf
-
-ld_add() {
- debug_msg "ld_add ($@)"
-
- if [ ! -z "$1" ] && [ -d "$1" ] ; then
- if ! grep -q $1 /etc/ld.so.conf; then
- verbose_msg "Adding $1 to ld.so.conf"
- echo "$1" >> /etc/ld.so.conf
- ldconfig
- fi
- fi
-}
-
-# function : ld_remove
-# usage : ld_remove <directory>
-# purpose : Remove a path from ld.so.conf
-
-ld_remove() {
- debug_msg "ld_remove ($@)"
-
- if [ ! -z "$1" ]; then
- if grep -q $1 /etc/ld.so.conf ; then
-
- TMP_LD_CONF=$(temp_create "ldsoconf")
- verbose_msg "Removing $1 from ld.so.conf"
-
- grep -v $1 /etc/ld.so.conf > $TMP_LD_CONF
- cat $TMP_LD_CONF > /etc/ld.so.conf
- ldconfig
-
- temp_destroy $TMP_LD_CONF
- fi
- fi
-}
-
-# function : directories
-# usage : VARIABLE=`directories < dirlistfile`
-# purpose : to determine the directories from a given list
-directories() {
- debug_msg "directories ($@)"
- local ITEM
- while read ITEM ; do
- if [ -d "$ITEM" ] && [ ! -h "$ITEM" ] ; then
- echo "$ITEM"
- fi
- done
-}
-
-
-# function : files
-# usage : VARIABLE=`files < dirlistfile`
-# purpose : to determine the ordinary files from a given list
-files() {
- debug_msg "files ($@)"
- local ITEM
- while read ITEM ; do
- if [ -f "$ITEM" ] && [ ! -h "$ITEM" ] ; then
- echo "$ITEM"
- fi
- done
-}
-
-
-# function : sysmlinks
-# usage : VARIABLE=`symlinks < dirlistfile`
-# purpose : to determine the symbolic links from a given list
-symlinks() {
- debug_msg "symlinks ($@)"
- local ITEM
- while read ITEM ; do
- if [ -h "$ITEM" ] ; then
- echo "$ITEM"
- fi
- done
-}
-
-
-# function : dirnames
-# usage : VARIABLE=`dirnames < dirlistfile`
-# purpose : info about the real locations of symlinks
-dirnames() {
- debug_msg "dirnames ($@)"
- local FILE
- while read FILE ; do
- dirname "$FILE"
- done
-}
-
-
-# function : exists
-# usage : VARIABLE=`exists < dirlistfile`
-# purpose : filter out the non-existent files in a list
-exists() {
- debug_msg "exists ($@)"
- local ITEM
- while read ITEM ; do
- if [ -e "$ITEM" ] ; then
- echo "$ITEM"
- fi
- done
-}
-
-
-# function : filter
-# usage : filter $FILE
-# purpose : filter stdin with files/dirs/symlinks provided in file $1.
-filter() {
- debug_msg "filter ($@)"
- local TMP_GREPRE
- if [ -f "$1" ] ; then
- TMP_GREPRE=$(temp_create "fgrep")
- directories < $1 | sed -e 's:^:^:g' -e 's:$:/:g' > $TMP_GREPRE
- files < $1 | sed -e 's:^:^:g' -e 's:$:\$:g' >> $TMP_GREPRE
- symlinks < $1 | sed -e 's:^:^:g' -e 's:$:\$:g' >> $TMP_GREPRE
- read
- grep -v -f $TMP_GREPRE
- temp_destroy $TMP_GREPRE
- else
- cat
- fi
-}
-
-
-unmap_device()
-{
- debug_msg "unmap_device($@)"
- local DEVICE REAL
- REAL=$(readlink -f $1)
- for DEVICE in $(ls -1d /dev/[hs]d* 2> /dev/null); do
- if [[ "$(readlink -f $DEVICE)" == "$REAL" ]]; then
- echo $DEVICE
- return 0
- fi
- done
- echo $1
- return 0
-}
-
-
-find_pam_aware() {
- debug_msg "find_pam_aware ($@)"
- local MODULE SECTION
-
- for MODULE in $(list_installed); do
- SECTION=$(find_section $MODULE)
- if [ -d "$MOONBASE/$SECTION/$MODULE/pam.d" ] &&
- [ "$MODULE" != "Linux-PAM" ]; then
- echo $MODULE
- fi
- done < $MODULE_STATUS
-}
-
-
-custom_filters()
-{
- local FILE
- if [[ "${COMPRESS_MANPAGES:-on}" == "on" ]]; then
- while read FILE; do
- if [[ -f "$FILE" ]] ; then
- if echo "$FILE" | grep '^/usr/share/man/.*\..$' | grep -q -v '\.gz$'; then
- gzip -9 < "$FILE" > "$FILE.gz"
- debug_msg "Compressing man page \"$FILE\""
- rm -f "$FILE"
- echo "$FILE.gz"
- else
- echo "$FILE"
- fi
- else
- echo "$FILE"
- fi
- done
- else
- cat -
- fi
-}
-
-
-source_basename()
-{
- echo $1 | sed 's/.tar.\(bz2\|gz\)$//g'
-}
-
-
-last_kernel()
-{
- if [ -f /usr/src/linux/include/linux/utsrelease.h ]; then
- grep UTS_RELEASE /usr/src/linux/include/linux/utsrelease.h | cut -d'"' -f2
- else
- grep UTS_RELEASE /usr/src/linux/include/linux/version.h | cut -d'"' -f2
- fi
-}
diff --git a/var/lib/lunar/functions/modules.lunar b/var/lib/lunar/functions/modules.lunar
deleted file mode 100644
index a0b3f66..0000000
--- a/var/lib/lunar/functions/modules.lunar
+++ /dev/null
@@ -1,646 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/modules #
-# includes create_module_index, find_section #
-# list_sections, list_modules, list_installed #
-# check_module_index, run_details #
-# module_installed, module_held, module_exiled #
-# hold_modules, unhold_modules #
-# 20020528 #
-# 20030113 merging more functions in here - sofar #
-# 20030417 adding hold routines - sofar #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# Portions Copyrighted Chuck Mead 2002 under GPLv2 #
-# Portions Copyrighted Auke Kok 2003 under GPLv2 #
-# #
-############################################################
-
-
-# function : list_sections
-# usage : list_sections
-# purpose : list the moonbase sections, filter out the specific files
-list_sections() {
- debug_msg "list_sections ($@)"
- check_module_index
- cut -d: -f2 < $MODULE_INDEX | sort | uniq
- find $MOONBASE/zlocal -name DETAILS | sed "s:^$MOONBASE\/::g;s:\/[^\/]*\/DETAILS$::g" | sort | uniq
- return 0
-}
-
-
-# function : list_modules
-# usage : list_modules $SECTION
-# purpose : list the modules in a section, filter out the specific files
-list_modules() {
- debug_msg "list_modules ($@)"
- if [[ -z "$1" ]] ; then
- error_message "${PROBLEM_COLOR}list_modules(): no SECTION defined!${DEFAULT_COLOR}"
- exit 1
- fi
-
- if [[ ! -d $MOONBASE/$1 ]] ; then
- error_message "${PROBLEM_COLOR}list_modules(): no such section \"$1\"!${DEFAULT_COLOR}"
- exit 1
- fi
-
- if grep -q ":$1$" $MODULE_INDEX; then
- grep ":$1$" $MODULE_INDEX | cut -d: -f1
- return 0
- else
- (
- cd $MOONBASE/$1
- find . -maxdepth 2 -name DETAILS -type f | sed 's/\.\///g;s/\/DETAILS$//g'
- )
- fi
-}
-
-
-# function : list_moonbase
-# usage : list_moonbase
-# purpose : returns the names of all modules in moonbase
-list_moonbase() {
- local SECTION
- debug_msg "list_moonbase ($@)"
- for SECTION in $(list_sections) ; do
- list_modules $SECTION
- done
-}
-
-
-# function : list_installed
-# usage : list_installed
-# purpose : return a list of installed (or held) modules
-list_installed() {
- debug_msg "list_installed ($@)"
- grep -e ":installed:" -e ":held:" $MODULE_STATUS | cut -d: -f1 | sort
-}
-
-
-# function: create_module_index
-# usage : create_module_index
-# purpose : created an index file of module:section pair list
-create_module_index() {
- local TMP_INDEX
- debug_msg "create_module_index ($@)"
- # make sure it exists before trying to see it's writeable
- # this also assures that depends.cache gets remade
- if [[ ! -f $MODULE_INDEX ]] ; then
- touch $MODULE_INDEX &> /dev/null
- fi
-
- # silently fail if we cannot write to $MODULE_INDEX, it is okay
- # for this to fail in case we are a mere user using lvu's search
- # functionality
- if [[ ! -w "$MODULE_INDEX" ]] ; then
- return 0
- fi
-
- verbose_msg "Updating module index file..."
- # doing this allows us to ctrl-C the process without breaking the
- # index file
- TMP_INDEX=$(temp_create "module.index")
-
- # here we have two options: system moonbase or custom:
- if [[ "$MOONBASE" == "/var/lib/lunar/moonbase" ]] && [[ -f $INSTALL_LOGS/moonbase-$(installed_version moonbase) ]] ; then
- # short way out:
- debug_msg "Quick generating \$MODULE_INDEX..."
- grep "/DETAILS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase) | \
- sed -e 's:/var/lib/lunar/moonbase/::' -e 's:/DETAILS::g' \
- -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
- else
- # this *really* is the fastest way to do it, no guarantees, we
- # do have to make sure MOONBASE is coherent and tidy though
- debug_msg "Regenerating \$MODULE_INDEX manually..."
- find $MOONBASE -type f -name DETAILS ! -regex "$MOONBASE/zlocal/.*" \
- -printf "%h\n" | sed "s:$MOONBASE/::g;s:^\(.*\)/\(.*\)$:\2\:\1:g" > $TMP_INDEX
- fi
-
- # this should be safe enough:
- lock_file $MODULE_INDEX &&
- install -m644 $TMP_INDEX $MODULE_INDEX
-
- # do not forget to do these at any time:
- unlock_file $MODULE_INDEX
- temp_destroy $TMP_INDEX
-}
-
-
-# function: check_module_index
-# usage : check_module_index
-# purpose : checks if the index is up-to-date regarding to moonbase
-function check_module_index() {
-(
- debug_msg "check_module_index ($@)"
- local RESULT=1
- if [[ ! -e $MODULE_INDEX ]] || [[ ! -e $DEPENDS_CACHE ]]; then
- create_module_index
- create_depends_cache
- RESULT=0
- else
- if [[ -n "$(find $MOONBASE -type f -name "DEPENDS" -cnewer $DEPENDS_CACHE)" ]]; then
- create_depends_cache
- RESULT=0
- fi
- if [[ -n "$(find $MOONBASE -type f -name "DETAILS" -cnewer $MODULE_INDEX)" ]]; then
- create_module_index
- RESULT=0
- fi
- fi
- return $RESULT
-)
-}
-
-
-# function : find_section
-# usage : find_section "module name"
-# purpose : finds the section of a given module as parameter
-# returns : (0) on success, (1) on failure, errors on stdout
-find_section() {
- local SECTION SECTIONS
- debug_msg "find_section ($@)"
-
- # if using ZLOCAL, we must search there first
- if [[ "${ZLOCAL_OVERRIDES:-off}" == "on" ]] ; then
- for SECTION in $(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||;s|/$1$||" ) ; do
- if [[ -f "$MOONBASE/$SECTION/$1/DETAILS" ]]; then
- echo $SECTION
- return 0
- fi
- done
- fi
-
- # otherwise check for ordinary modules named that way
- SECTION=$(awk -F: "(\$1==\"$1\"){print \$2;exit 0}" $MODULE_INDEX)
- if [[ -n "$SECTION" ]] && [[ -d "$MOONBASE/$SECTION/$1" ]] ; then
- echo "$SECTION"
- return 0
- fi
-
- # assuming we're not using ZLOCAL, we haven't looked there yet!
- # perhaps it's a zlocal module ? search zlocal for it now
- if SECTION=$(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||;s|/$1$||" ) ; then
- if [[ -n "$SECTION" ]]; then
- echo $SECTION
- return 0
- fi
- fi
-
- # still not found? refresh module index... this may take a while
- if ! check_module_index ; then
- # shave some time off not trying the rest of the code below since that
- # is useless
- return 1
- fi
-
- # and search again, this should be quick now
- SECTION=$(awk -F: "(\$1==\"$1\"){print \$2;exit 0}" $MODULE_INDEX)
- if [[ -n "$SECTION" ]] && [[ -d "$MOONBASE/$SECTION/$1" ]] ; then
- echo "$SECTION"
- return 0
- fi
-
- # bummer, not found
- return 1
-}
-
-
-# function : run_details
-# usage : run_details module_name ($MODULE is pre-defined or param)
-# purpose : runs the DETAILS file of a module
-# returns : (0) on success, (1) on failure, error messages on stdout
-run_details() {
- local TMP_DETAILS
- debug_msg "run_details ($@)"
- # Note: run_details doesn't EXIT the code, but merely drops a warning
- # (return 1), which means that the calling code needs to decide
- # if this is a problem or not... -sofar
-
- SECTION=$(find_section $1)
- if [[ -z "$SECTION" ]] ; then
- error_message "${PROBLEM_COLOR}Unable to find module ${MODULE_COLOR}${1}${DEFAULT_COLOR}" \
- "${PROBLEM_COLOR}in ${FILE_COLOR}$MOONBASE${DEFAULT_COLOR}"
- return 1
- else
- SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
- if ! has_module_file $1 DETAILS ; then
- error_message "${PROBLEM_COLOR}Module ${MODULE_COLOR}${1}" \
- "${DEFAULT_COLOR}${PROBLEM_COLOR}has no ${FILE_COLOR}DETAILS" \
- "${DEFAULT_COLOR}${PROBLEM_COLOR}file!${DEFAULT_COLOR}"
- return 1
- fi
-
- if [[ -z "$WANT_VERSION" ]] ; then
- run_module_file $1 DETAILS &> /dev/null || return 255
- else
- TMP_DETAILS=$(temp_create "details.version")
- if [[ -e "$MOONBASE/$SECTION/$1/DETAILS.$PLATFORM" ]]; then
- cat $MOONBASE/$SECTION/$1/DETAILS.$PLATFORM | sed '/^\s*VERSION=/d' > $TMP_DETAILS
- else
- cat $MOONBASE/$SECTION/$1/DETAILS | sed '/^\s*VERSION=/d' > $TMP_DETAILS
- fi
- VERSION="$WANT_VERSION"
- . $TMP_DETAILS &> /dev/null || return 255
- temp_destroy $TMP_DETAILS
- fi
- SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
- MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MODULE}
- MODULE_PREFIX=${MODULE_PREFIX:-$DEFAULT_PREFIX}
- if [ "$MODULE_PREFIX" != "$DEFAULT_PREFIX" ]; then
- export PKG_CONFIG_PATH=$MODULE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
- export PATH=$PATH:$MODULE_PREFIX/bin
- fi
- return 0
- fi
-}
-
-
-has_module_file()
-{
- if [[ -e "$SCRIPT_DIRECTORY/$2" ]] || [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
- return 0
- else
- return 1
- fi
-}
-
-
-# function : run_module_file
-# usage : run_module_file $MODULE $SCRIPTNAME
-# purpose : runs the given script for a pre-defined module
-run_module_file() {
- debug_msg "run_module_file ($@)"
- if [[ "$1" == "moonbase" ]] ; then
- return 0
- fi
- if [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
- . $SCRIPT_DIRECTORY/$2.$PLATFORM
- elif [[ -e "$SCRIPT_DIRECTORY/$2" ]]; then
- . $SCRIPT_DIRECTORY/$2
- fi
-}
-
-
-# function : module_installed
-# usage : module_installed $MODULE
-# purpose : check if $MODULE is installed (or held)
-module_installed()
-{
- grep -q "^$1:[[:digit:]]*:installed:\|^$1:[[:digit:]]*:held:" $MODULE_STATUS
-}
-
-
-# function : module_held
-# usage : module_held $MODULE
-# purpose : check if $MODULE is held
-module_held() {
- debug_msg "module_held ($@)"
- grep -q "^$1:[[:digit:]]*:held:" $MODULE_STATUS
-}
-
-
-module_license_accepted() {
- #
- # This code handles acceptance or rejection of certain licenses.
- #
- # valid licenses currently are:
- # osi == gpl gpl2 lgpl gfdl bsd mpl cc apache artistic qpl
-
- debug_msg "module_license_accepted ($@)"
-
- local L LICENSE IS_OSI
- LICENSE=$(run_details $1 > /dev/null ; echo $LICENSE)
- # assume it's osi if it's empty
- if [ -z "$LICENSE" ]; then
- debug_msg "assuming LICENSE=\"osi\""
- LICENSE="osi"
- fi
-
- # check for osi license
- case $LICENSE in
- gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl|osi)
- IS_OSI=yes
- ;;
- esac
-
- # check if $MODULE's $LICENSE is accepted or not, works as follows:
- # if ACCEPTED_LICENSES is set, LICENSE *must* be listed, else if
- # REJECTED_LICESES is set, must _NOT_ be listed
- # * accept "osi" will accept all osi licenses
- # * accept "all" will accept anything
- if [[ -n "$ACCEPTED_LICENSES" ]]; then
- for L in $ACCEPTED_LICENSES; do
- if [[ "$L" == "osi" ]] && [[ "$IS_OSI" == "yes" ]] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
- # explicitly accepted license!
- debug_msg "module_license_accepted: \"$LICENSE\" is explicitly accepted"
- return 0
- fi
- done
- # it was not explicitly accepted
- error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is not explicitly accepted${DEFAULT_COLOR}"
- return 1
- elif [[ -n "$REJECTED_LICENSES" ]]; then
- for L in $REJECTED_LICENSES; do
- if [[ "$LICENSE" == "$L" ]]; then
- # explicitly rejected license!
- error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is explicitly rejected${DEFAULT_COLOR}"
- return 1
- fi
- done
- # implicitly not rejected
- debug_msg "module_license_accepted: \"$LICENSE\" is not rejected"
- return 0
- else ## if [ -z "${ACCEPTED_LICENSES}${REJECTED_LICESES}" ]; then
- # so now we have a problem - the user didn't set their prefs
- if [[ "$IS_OSI" != "yes" ]]; then
- error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" cannot be accepted by default${DEFAULT_COLOR}"
- return 1
- fi
- fi
-}
-
-
-# function : module_exiled
-# usage : module_exiled $MODULE
-# purpose : check if $MODULE is exiled
-module_exiled() {
- debug_msg "module_exiled ($@)"
- $(cut -d: -f1,3 $MODULE_STATUS | grep -q "^$1:exiled")
-}
-
-
-# function : installed_version
-# usage : installed_version $MODULE
-# purpose : return the installed version of $MODULE
-installed_version() {
- debug_msg "installed_version ($@)"
- grep "^$1:" $MODULE_STATUS | cut -d: -f4
-}
-
-
-# display current moonbase version of $MODULE
-module_version() {
- debug_msg "module_version($@)"
- (
- if run_details $1 ; then
- echo $VERSION
- else
- exit 1
- fi
- )
-}
-
-
-# function : hold_modules
-# usage : hold_modules $MODULE [$MODULE....]
-# purpose : put modules on hold
-hold_modules() {
- local MODULE
- debug_msg "hold_modules ($@)"
- if [[ -n "$1" ]] ; then
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- for MODULE in "$@" ; do
- awk -F: -v mod=$MODULE '{if ($1==mod && $3 == "installed") {print $1":"$2":held:"$4":"$5} else print;}' $MODULE_STATUS > $MODULE_STATUS_BACKUP
- cp $MODULE_STATUS_BACKUP $MODULE_STATUS
- done
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
- fi
-}
-
-
-# function : unhold_modules
-# usage : unhold_modules $MODULE [$MODULE....]
-# purpose : put modules on hold back to normal
-unhold_modules () {
- local MODULE
- debug_msg "unhold_modules ($@)"
- if [[ -n "$1" ]] ; then
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- for MODULE in "$@" ; do
- awk -F: -v mod=$MODULE '{if ($1==mod && $3 == "held") {print $1":"$2":installed:"$4":"$5} else print;}' $MODULE_STATUS > $MODULE_STATUS_BACKUP
- cp $MODULE_STATUS_BACKUP $MODULE_STATUS
- done
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
- fi
-}
-
-
-# function : exile_modules
-# usage : exile_modules $MODULE [$MODULE....]
-# purpose : put modules on exile
-exile_modules() {
- local MODULE
- debug_msg "exile_modules ($@)"
- if [[ -n "$1" ]] ; then
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- for MODULE in "$@" ; do
- if $(module_installed $MODULE); then
- error_message "${PROBLEM_COLOR}Cannot exile installed module ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
- else
- echo "$MODULE::exiled::" >> $MODULE_STATUS_BACKUP
- cp $MODULE_STATUS_BACKUP $MODULE_STATUS
- fi
- done
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
- fi
-}
-
-
-# function : unexile_modules
-# usage : unexile_modules $MODULE [$MODULE....]
-# purpose : put modules on exile back to normal
-unexile_modules () {
- local MODULE
- debug_msg "unexile_modules ($@)"
- if [ -n "$1" ] ; then
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- for MODULE in "$@" ; do
- grep -v "^$MODULE:" $MODULE_STATUS > $MODULE_STATUS_BACKUP
- cp $MODULE_STATUS_BACKUP $MODULE_STATUS
- done
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
- fi
-}
-
-
-# function : remove_module
-# usage : remove_module; but $MODULE must be defined earlier
-# purpose : removed a module from the MODULE_STATUS files, no source removal
-remove_module() {
- debug_msg "remove_module ($@)"
-
- # catch this on new boxes:
- if [ ! -f $MODULE_STATUS ] ; then
- touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
- fi
-
- verbose_msg "updating lunar state files after module removal"
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- grep -v "^$1:" $MODULE_STATUS > $MODULE_STATUS_BACKUP
- cp $MODULE_STATUS_BACKUP $MODULE_STATUS
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
-}
-
-
-# function: add_module
-# usage : add_module <module_name>
-# purpose : adds the 1st parameter as the module name to the MODULE_STATUS files
-add_module() {
- debug_msg "add_module ($@)"
-
- # catch this on new boxes:
- if [ ! -f $MODULE_STATUS ] ; then
- touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
- fi
-
- verbose_msg "updating lunar state files after module installation"
- lock_file $MODULE_STATUS_BACKUP &&
- lock_file $MODULE_STATUS &&
- if [ -s $MODULE_STATUS ]; then
- grep -v "^$1:" $MODULE_STATUS_BACKUP > $MODULE_STATUS 2>/dev/null
- fi &&
- echo "$1:$(date -u +%Y%m%d):$2:$3:$4" >> $MODULE_STATUS &&
- cp $MODULE_STATUS $MODULE_STATUS_BACKUP
- unlock_file $MODULE_STATUS
- unlock_file $MODULE_STATUS_BACKUP
-}
-
-
-# function : purge_modules
-# usage : purge_modules
-# purpose : purge modules that were removed from moonbase
-purge_modules() {
- local MODULE
- debug_msg "purge_modules ($@)"
- verbose_msg "Discovering modules that were removed from moonbase"
- # safetynet: don't wipe everything
- if [ $(list_moonbase | wc -l) -lt 100 ]; then
- error_message "${PROBLEM_COLOR}Error: ${DEFAULT_COLOR}${MESSAGE_COLOR} your moonbase seems damaged. Re-lin moonbase to fix.${DEFAULT_COLOR}"
- exit 1
- fi
- for MODULE in $(list_installed | grep -v "^moonbase$") ; do
- (
- if ! run_details $MODULE &> /dev/null ; then
- message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} was removed from ${FILE_COLOR}${MOONBASE}${DEFAULT_COLOR}"
- if query "Do you want to remove ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${QUERY_COLOR} ?" y ; then
- lrm $MODULE
- continue
- else
- message "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is kept and can be removed manually later${DEFAULT_COLOR}"
- fi
- fi
- )
- done
-}
-
-
-module_is_expired() {
- debug_msg "module_is_expired ($@)"
- (
- if [ -z "$MODULE" ] ; then
- MODULE=$1
- fi
- LINE=$(grep "^$MODULE:" $MODULE_STATUS | grep -v "^moonbase" | awk -F: '{print "IDATE="$2" STATUS="$3" IVERSION="$4}')
- eval $LINE
- if run_details $MODULE &> /dev/null ; then
- if [[ "$STATUS" == "installed" ]] ; then
- if [[ "$VERSION" != "$IVERSION" ]] || [[ -z "$IDATE" ]] ||
- (( "$UPDATED" > "$IDATE" )) ; then
- if [[ "$MODULE" != "lunar" ]] && [[ "$MODULE" != "theedge" ]] ; then
- return 0
- fi
- fi
- fi
- fi
- # nope... it's not expired
- return 255
- )
-}
-
-
-# function : list_expired_modules
-# usage : list_expired_modules
-# purpose : return a list of modules that need to be updated
-list_expired_modules() {
- local MODULE
- debug_msg "list_expired_modules ($@)"
- for MODULE in $(list_installed) ; do
- if $(module_is_expired $MODULE) ; then
- echo "$MODULE"
- fi
- done
-}
-
-
-# function : update_modules
-# usage : update_modules
-# purpose : update all installed modules that need to be updated
-update_modules() {
- local IFS LIST QUEUE MODULE
- debug_msg "update_modules ($@)"
-
- export IFS="$STANDARD_IFS"
-
- verbose_msg "Searching for modules to update"
- LIST=$(list_expired_modules)
-
- if [ -z "$LIST" ] ; then
- verbose_msg "Nothing to update!"
- return 255
- fi
-
- verbose_msg "Sorting update queue"
- QUEUE=$(sort_by_dependency $LIST)
-
- message "${MESSAGE_COLOR}The following modules will be updated:${DEFAULT_COLOR}"
- TMP_QUEUE=$(temp_create "update-queue")
- for MODULE in $QUEUE ; do
- echo $MODULE >> $TMP_QUEUE
- echo $MODULE
- done
-
- unset MODULE
- if query "Do you wish to edit the update queue ? " n ; then
- edit_file $TMP_QUEUE
- fi
- QUEUE=$(cat $TMP_QUEUE)
- temp_destroy $TMP_QUEUE
-
- if [ -n "$QUEUE" ] ; then
- lin -c $QUEUE
- else
- verbose_msg "Nothing to update!"
- return 255
- fi
-}
-
-
-
-check_blacklist() {
- debug_msg "check_blacklist ($@)"
- if [ -f /var/state/lunar/blacklist.$PLATFORM ] ; then
- if grep "^$MODULE$" /var/state/lunar/blacklist.$PLATFORM ; then
- error_message "${PROBLEM_COLOR}ERROR:${DEFAULT_COLOR}${MESSAGE_COLOR} Module ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} is blacklisted and will not be installed!${DEFAULT_COLOR}"
- exit 0
- fi
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/moonbase.lunar b/var/lib/lunar/functions/moonbase.lunar
deleted file mode 100644
index 4b0342b..0000000
--- a/var/lib/lunar/functions/moonbase.lunar
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-# #
-# moonbase.lunar - get moonbase from the net #
-# #
-############################################################
-# #
-# Copyrighted Auke Kok 2002 under GPLv2 #
-# #
-############################################################
-
-
-get_moonbase () {
-(
- debug_msg "get_moonbase ($@)"
- if $(module_held "moonbase") ; then
- verbose_msg "Skipping compile and install for held module \"moonbase\""
- return
- fi
-
- SYSTEM_MOONBASE=/var/lib/lunar/moonbase
-
- # prevent using stale copies of moonbase. You can still override moonbase's
- # URL with `lunar set MOONBASE_URL[0] http://.....
- unset LRESORT_URL FRESORT_URL
-
- # the following overrides run_details:
- run_details() {
- debug_msg " run_details ($@)"
- MODULE=moonbase
- VERSION=`date -u +%Y%m%d.%H`
- SOURCE=$MODULE.tar.bz2
- SOURCE_URL=$MOONBASE_URL
- PARTIAL=off
- CLEAR_CACHE=on
- }
-
- # make sure we set these values up front to be sure
- run_details moonbase
- rm -f $TMPDIR/$SOURCE
-
- if [ ! -d "$SYSTEM_MOONBASE" ] ; then
- mkdir -p $SYSTEM_MOONBASE
- fi
-
- if [ ! -d "$SYSTEM_MOONBASE/zlocal" ] ; then
- mkdir -p $SYSTEM_MOONBASE/zlocal
- fi
-
- if [ "$SYSTEM_MOONBASE" == "$MOONBASE" ]; then
- push_uniq_id
- if ! download_module $MODULE ; then
- OUTCOME=failed
- INFO="Could not download a fresh moonbase"
- else
- message "${MESSAGE_COLOR}Preparing to install ${FILE_COLOR}${SOURCE}" \
- "${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
- mv $SYSTEM_MOONBASE/zlocal/ /var/lib/lunar/.zlocal-backup &&
- rm -rf $SYSTEM_MOONBASE &&
- TMP_MODULE_INDEX=$(temp_create "temp.module.index") &&
- cp $MODULE_INDEX $TMP_MODULE_INDEX &&
- lrm moonbase &&
- mkdir $SYSTEM_MOONBASE &&
- mv /var/lib/lunar/.zlocal-backup $SYSTEM_MOONBASE/zlocal &&
- message "${MESSAGE_COLOR}Extracting ${FILE_COLOR}${SOURCE}" \
- "${DEFAULT_COLOR}${MESSAGE_COLOR}...${DEFAULT_COLOR}" &&
- bzcat $SOURCE_CACHE/$SOURCE | tar xv -C /var/lib/lunar | \
- sed "s:^:/var/lib/lunar/:g" > $INSTALL_LOGS/$MODULE-$VERSION &&
- echo $INSTALL_LOGS/$MODULE-$VERSION >> $INSTALL_LOGS/$MODULE-$VERSION &&
- echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $INSTALL_LOGS/$MODULE-$VERSION &&
- message "${MESSAGE_COLOR}Created ${FILE_COLOR}$INSTALL_LOGS/$MODULE-$VERSION" \
- "${DEFAULT_COLOR}${MESSAGE_COLOR}${DEFAULT_COLOR}" &&
- # create an md5sum log
- create_md5sum_log &&
-
- add_module $MODULE installed $VERSION $(du -ks $SYSTEM_MOONBASE | cut -f1)KB &&
- OUTCOME=success || OUTCOME=failed
- fi
- fi
-
- if [ "$OUTCOME" != "failed" ] ; then
- # get ready to regenerate the module index cache file
- create_module_index &&
- create_depends_cache &&
- update_plugins &&
- display_moonbase_changes &&
- temp_destroy $TMP_MODULE_INDEX &&
- OUTCOME=success || OUTCOME=failed
- fi
-
- activity_log "lin" "moonbase" "$VERSION" "$OUTCOME" "$INFO"
- if [ "$OUTCOME" == "failed" ] ; then
- return 1
- fi
-)
-}
-
-
diff --git a/var/lib/lunar/functions/optimize.lunar b/var/lib/lunar/functions/optimize.lunar
deleted file mode 100644
index c8826f6..0000000
--- a/var/lib/lunar/functions/optimize.lunar
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# optimize.lunar - Lunar general optimization code #
-# #
-############################################################
-# #
-# Copyright 2006 by Auke Kok under GPLv2 #
-# #
-############################################################
-
-
-bad_flags()
-{
- debug_msg "bad_flags ($@)"
- verbose_msg "bad_flags \"$@\""
-
- # maintain some degree of backward compatibility here
- if [[ "$1" == "ALL" ]]; then
- unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
- elif [[ "$1" == "compiler" ]]; then
- unset CFLAGS CXXFLAGS CPPFLAGS
- elif [[ "$1" == "linker" ]]; then
- unset LDFLAGS
- else
- for BAD_FLAG in "$@" ; do
- CFLAGS=$(echo $CFLAGS | sed "s/$BAD_FLAG//")
- CXXFLAGS=$(echo $CXXFLAGS | sed "s/$BAD_FLAG//")
- CPPFLAGS=$(echo $CPPFLAGS | sed "s/$BAD_FLAG//")
- LDFLAGS=$(echo $LDFLAGS | sed "s/$BAD_FLAG//")
- done
- fi
-}
-
-
-optimize_menu()
-{(
- export IFS=$'\t\n'
- while true; do
- if [ -z "$(plugin_call OPTIMIZE_MENU)" ]; then
- $DIALOG --msgbox "There are no configurable compontents. Please update your moonbase!" 6 60
- return
- fi
- PLUGIN=`$DIALOG --cancel-label "Close" --default-item "$PLUGIN" --menu "Select a component for which to configure optimizations" 0 0 0 $(plugin_call OPTIMIZE_MENU)`
- if [ $? != 0 ]; then
- return
- fi
-
- plugin_call OPTIMIZE_MENU $PLUGIN
- done
-)}
-
-
-# because we pretty much need to know our $BUILD string
-# everywhere this code is separate and guides all other
-# parts of lunar where related things are done. Here we
-# autodetect the most important part but leave it open
-# to the user to override it
-
-# PLATFORM - translated uname -m / arch
-PLATFORM=$(uname -m | sed 's/i[3456]86/x86/')
-# BUILD -
-case $PLATFORM in
- x86|x86_64)
- BUILD=$(uname -m)-pc-linux-gnu ;;
- *)
- BUILD=$(uname -m | sed 's/.*/\L&/g')-linux-gnu ;;
-esac
diff --git a/var/lib/lunar/functions/plugins.lunar b/var/lib/lunar/functions/plugins.lunar
deleted file mode 100644
index 77640e9..0000000
--- a/var/lib/lunar/functions/plugins.lunar
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# plugins.lunar - Lunar plugin code #
-# #
-############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-############################################################
-
-#
-# plugin handler return status convention:
-#
-# when a handler is called, it should use the following return codes
-#
-# 0 - OK AND HALT, do not process other plugins
-# 1 - FAIL, stop executing plugins and report an error
-# 2 - OK AND CONTINUE or CONTINUE, run other plugins
-#
-
-plugin_register() {
- # first arg: plugin type
- # second arg: function hook name
- # Defined plugin types:
- # 1 - SOURCE_DOWNLOAD download some source code
- # 2 - SOURCE_NEEDREFRESH source exists but needs refresh
- # 3 - SOURCE_VERIFY perform integrity verification on a file
- # 4 - SOURCE_UNPACK unpack a certain file to $(PWD)
- # 5 - MODULE_CHECK integrity checking on installed modules
- # 6 - KERNEL_UPDATEBOOTLOADER automate bootloader maintenance
- # 7 - BUILD_CONFIGURE called before running CONFIGURE
- # 8 - BUILD_PRE_BUILD ,, ,, ,, PRE_BUILD
- # 9 - BUILD_BUILD ,, ,, ,, BUILD
- # 10 - BUILD_INSTALL ,, ,, ,, INSTALL
- # 11 - BUILD_POST_BUILD ,, ,, ,, POST_BUILD
- # 12 - BUILD_POST_INSTALL ,, ,, ,, POST_INSTALL
- # 13 - BUILD_PRE_REMOVE ,, ,, ,, PRE_REMOVE
- # 14 - BUILD_POST_REMOVE ,, ,, ,, POST_REMOVE
- # 15 - OPTIMIZE_MENU Display optimization menu's
- LUNAR_PLUGINS=(${LUNAR_PLUGINS[@]} "$1:$2")
- ((LUNAR_PLUGIN_COUNT++))
- debug_msg "Registered plugin #$LUNAR_PLUGIN_COUNT, $1 -> $2()"
-}
-
-
-plugin_call() {
- local REQUESTED_TYPE COUNT THIS_TYPE THIS_HANDLER RETVAL
- debug_msg "plugin_call($@)"
- # scan available plugins for plugin_type $1 and pass args to it
- REQUESTED_TYPE=$1
- shift
- for ((COUNT=0; COUNT < $LUNAR_PLUGIN_COUNT; COUNT++)); do
- THIS_TYPE=${LUNAR_PLUGINS[$COUNT]%%:*}
- THIS_HANDLER=${LUNAR_PLUGINS[$COUNT]#*:}
- if [ "$REQUESTED_TYPE" == "$THIS_TYPE" ]; then
- # we have identified a valid plugin for this type
- $THIS_HANDLER $@
- RETVAL=$?
- if [ $RETVAL -eq 2 ]; then
- continue
- else
- debug_msg "plugin $THIS_HANDLER returned \"$RETVAL\""
- return $RETVAL
- fi
- fi
- done
- debug_msg "Finished running all plugins for type \"$REQUESTED_TYPE\""
- return 2
-}
-
-
-update_plugin() {
- local SECTION PLUGIN
- debug_msg "update_plugin($@)"
- # update plugins of all modules or a specific one
- #
- # $1 - module name
- # $2 - forced removal of plugin
- #
- # scan module for plugins, and add/delete them as needed
- if SECTION=$(find_section $1); then
- if [ -d $MOONBASE/$SECTION/$1/plugin.d ]; then
- if [ "$2" == "install" ] ; then
- for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
- debug_msg "Installed \"$(basename $PLUGIN)\""
- install -m644 $PLUGIN $PLUGIN_DIR/
- done
- elif [ "$2" == "remove" ] || ! module_installed $1 ; then
- for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
- debug_msg "Removed \"$(basename $PLUGIN)\""
- rm -f $PLUGIN_DIR/$(basename $PLUGIN)
- done
- else
- for PLUGIN in $MOONBASE/$SECTION/$1/plugin.d/*.plugin; do
- debug_msg "Installed \"$(basename $PLUGIN)\""
- install -m644 $PLUGIN $PLUGIN_DIR/
- done
- fi
- fi
- reload_plugins
- fi
-}
-
-
-update_plugins() {
- local MODULE
- debug_msg "update_plugins($@)"
- # find all plugins in moonbase and run update_plugin() on them
- verbose_msg "Updating plugins"
- find $MOONBASE -wholename "*/plugin.d/*.plugin" | while read PLUGIN ; do
- update_plugin `basename $(echo $PLUGIN | sed 's/\/plugin.d\/.*//g')`
- done
-}
-
-
-reload_plugins() {
- local ITERATOR
- debug_msg "reload_plugins($@)"
-
- # Unload current plugins
- unset LUNAR_PLUGINS
-
- for ITERATOR in $PLUGIN_DIR/*.plugin; do
- . $ITERATOR
- done
-}
-
-
diff --git a/var/lib/lunar/functions/prune.lunar b/var/lib/lunar/functions/prune.lunar
deleted file mode 100644
index ab2167c..0000000
--- a/var/lib/lunar/functions/prune.lunar
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-# #
-# prune.lunar - Lunar prune code #
-# #
-############################################################
-# #
-# Copyright 2003 by Auke Kok under GPLv2under GPLv2 #
-# #
-############################################################
-
-
-# function : prune
-# usage : prune
-# purpose : prune all old logs, source copy's, install caches
-prune() {
- local TMP_SPOOL_KEEP TMP_CACHE_KEEP MODULE SOURCE VERSION FILE LOGS
- debug_msg "prune ($@)"
-
- if [ -z "$BUILD" ] ; then
- eval $(grep BUILD= /etc/lunar/local/optimizations)
- fi
-
- TMP_SPOOL_KEEP=$(temp_create "spool-keep")
- TMP_CACHE_KEEP=$(temp_create "cache-keep")
-
- message "${MESSAGE_COLOR}Generating keep lists...${DEFAULT_COLOR}"
- for MODULE in $(list_installed) ; do
- # spool:
- if [ ! "$MODULE" == "moonbase" ]; then
- for SOURCE in $(sources $MODULE) ; do
- echo $SOURCE >> $TMP_SPOOL_KEEP
- done
- # cache:
- VERSION=$(installed_version $MODULE)
-
- echo "$MODULE-$VERSION-$BUILD.tar.bz2" >> $TMP_CACHE_KEEP
- fi
- done
- echo "README" >> $TMP_SPOOL_KEEP
- echo "cpan" >> $TMP_SPOOL_KEEP
-
- verbose_msg "finding stale source files"
- for FILE in $(ls -1 $SOURCE_CACHE); do
- if ! grep -q $FILE $TMP_SPOOL_KEEP ; then
- message "Removing stale source: $SOURCE_CACHE/$FILE"
- rm -f $SOURCE_CACHE/$FILE
- fi
- done
- temp_destroy $TMP_SPOOL_KEEP
-
- verbose_msg "finding stale install caches"
- for FILE in $(ls -1 $INSTALL_CACHE); do
- if ! grep -q $FILE $TMP_CACHE_KEEP ; then
- message "Removing stale install cache: $INSTALL_CACHE/$FILE"
- rm -f $INSTALL_CACHE/$FILE
- fi
- done
- temp_destroy $TMP_CACHE_KEEP
-
- # the log files are easy:
- LOGS=$(cat $MODULE_STATUS | cut -d: -f1,4 --output-delimiter="-")
-
- verbose_msg "finding stale install logs"
- for FILE in $(ls -1 $INSTALL_LOGS) ; do
- if ! echo -e "$LOGS" | grep -q $FILE ; then
- message "Removing stale log: $INSTALL_LOGS/$FILE"
- rm $INSTALL_LOGS/$FILE
- fi
- done
-
- verbose_msg "finding stale compile logs"
- for FILE in $(ls -1 $COMPILE_LOGS | sed "s/\.bz2//") ; do
- if ! echo -e "$LOGS" | grep -q $FILE ; then
- message "Removing stale log: $COMPILE_LOGS/$FILE.bz2"
- rm $COMPILE_LOGS/$FILE.bz2
- fi
- done
-
- verbose_msg "finding stale md5sum logs"
- for FILE in $(ls -1 $MD5SUM_LOGS) ; do
- if ! echo -e "$LOGS" | grep -q $FILE ; then
- message "Removing stale log: $MD5SUM_LOGS/$FILE"
- rm $MD5SUM_LOGS/$FILE
- fi
- done
-}
diff --git a/var/lib/lunar/functions/queue.lunar b/var/lib/lunar/functions/queue.lunar
deleted file mode 100644
index 294ff18..0000000
--- a/var/lib/lunar/functions/queue.lunar
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/queue #
-# includes add_queue and remove_queue #
-# #
-# 20020527 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# Definition:
-# a queue is a multielement data structure from which elements
-# can be removed only in the same order in which they are inserted;
-# that is, it follows a FIFO constraint.
-
-# function: add_queue
-# usage : add_queue <file_name> <item_name>
-# purpose : adds an item to the end of a queue
-
-add_queue() {
- debug_msg "add_queue ($@)"
- in_queue() {
- debug_msg " in_queue ($@)"
- grep -q "^"$2"\$" $1 && return 0 || return 1
- }
-
- [ "$#" -ne 2 ] && return 1
-
- [ -f "$1" ] || touch $1 2>/dev/null || return 1
-
- lock_file $1 &&
- ! in_queue $1 $2 && echo "$2" >> $1
- unlock_file $1
-}
-
-# function: remove_queue
-# usage : remove_queue <file_name> |name|
-# purpose : removes an item from a queue OR pops the first element from a queue
-
-remove_queue() {
- debug_msg "remove_queue ($@)"
-
- [ -f "$1" ] || return 1
-
- if [ -n "$2" ];
- then
- TMP_QUEUE="$TMPDIR/lunar_remove_queue.$$"
- rm -f $TMP_QUEUE 2>/dev/null
- lock_file $1 &&
- cat $1 | grep -v "^"$2"\$" > $TMP_QUEUE
- cat $TMP_QUEUE > $1
- unlock_file $1
- rm -f $TMP_QUEUE 2>/dev/null
- else
- lock_file $1 &&
- echo `cat $1 | sed 1!d` &&
- cat $1 | sed "1d" > $1 &&
- unlock_file $1
- fi
-}
-
-
-push_install_queue() {
- debug_msg "push_install_queue ($@)"
- remove_queue $REMOVE_QUEUE "$1"
- remove_queue $INSTALL_QUEUE "$1"
- ! module_installed "$1" &&
- add_queue $INSTALL_QUEUE "$1"
-}
-
-
-push_remove_queue() {
- debug_msg "push_remove_queue ($@)"
- remove_queue $INSTALL_QUEUE "$1"
- remove_queue $REMOVE_QUEUE "$1"
- module_installed "$1" &&
- add_queue $REMOVE_QUEUE "$1"
-}
-
-
diff --git a/var/lib/lunar/functions/recovery.lunar b/var/lib/lunar/functions/recovery.lunar
deleted file mode 100644
index 9e20796..0000000
--- a/var/lib/lunar/functions/recovery.lunar
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/recovery #
-# includes rebuild_status_files, replace_status_file, #
-# check_status_files #
-# 20020528 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# function : rebuild_status_files
-# usage : rebuild_status_files
-# purpose : rebuild the accidentally deleted status files
-rebuild_status_files() {
- debug_msg "rebuild_status_files ($@)"
-
- if ! query \
- "Do you want to re-construct the status files from install logs?" y; then
- message "${PROBLEM_COLOR}Unable to continue without status files" \
- "${DEFAULT_COLOR}"
- exit 1
- fi
-
- if ! [ -d "$INSTALL_LOGS" ]; then
- message "${PROBLEM_COLOR}Unable to continue without install logs " \
- "${DEFAULT_COLOR}"
- exit 1
- fi
-
- message "${MESSAGE_COLOR}Re-creating status files." \
- "${DEFAULT_COLOR}"
-
- LOG_FILES=$(ls -rt $INSTALL_LOGS)
- for MODULE_NAME in $LOG_FILES; do
- COUNTS=3
- REAL_NAME=$MODULE_NAME
- unset SECTION
- while [ "$COUNTS" -gt "0" ]; do
- REAL_NAME=$(echo $REAL_NAME | cut -d "-" -f -"$COUNTS")
- SECTION=$(find_section $REAL_NAME)
- if [ -n "$SECTION" ]; then
- ((COUNTS++))
- VERSION=$(echo $MODULE_NAME | cut -d "-" -f "$COUNTS"-)
- SIZE=$(find_module_size $REAL_NAME $VERSION)
- DATE=$(ls -l $INSTALL_LOGS/$REAL_NAME-$VERSION --time-style=+%Y%m%d | awk '{print $6}')
- remove_module "$REAL_NAME" &&
- # adjusted add_module code that echos the DATE field ;^)
- lock_file $MODULE_STATUS &&
- lock_file $MODULE_STATUS_BACKUP &&
- echo "$REAL_NAME:$DATE:installed:$VERSION:$SIZE" >>$MODULE_STATUS &&
- cat $MODULE_STATUS >$MODULE_STATUS_BACKUP &&
- unlock_file $MODULE_STATUS_BACKUP &&
- unlock_file $MODULE_STATUS &&
-
- message "Added: $REAL_NAME-$VERSION ($SIZE) ($DATE)"
- break
- fi
- ((COUNTS--))
- done
- done
-
- message "${MESSAGE_COLOR}Success!!${DEFAULT_COLOR}\n"
-}
-
-
-# function : replace_status_file
-# usage : replace_status_file
-# purpose : cp $MODULE_STATUS_BACKUP $MODULE_STATUS via query
-replace_status_file() {
- debug_msg "replace_status_file ($@)"
-
- if ! [ -f "$MODULE_STATUS_BACKUP" ]; then rebuild_status_files; return; fi
- message "${PROBLEM_COLOR}Unable to find MODULE_STATUS file" \
- "${MODULE_COLOR}$MODULE_STATUS" \
- "${DEFAULT_COLOR}"
-
- if query "Do you want to use the backup?" y; then
- if ! [ -f "$MODULE_STATUS_BACKUP" ]; then rebuild_status_files; fi
- if `cp $MODULE_STATUS_BACKUP $MODULE_STATUS`; then
- message "${MESSAGE_COLOR}Success!!" \
- "${DEFAULT_COLOR}"
- else
- message "${PROBLEM_COLOR}Unsuccessful :=( No more operation!!" \
- "${DEFAULT_COLOR}"
- exit 1
- fi
- else
- message "${PROBLEM_COLOR}Unable to continue without that :=("\
- "No more operation!!" \
- "${DEFAULT_COLOR}"
- exit 1
- fi
-}
-
-# function : check_status_files
-# usage : check_status_files
-# purpose : checks the avail of MODULE_STATUS and MODULE_STATUS_BACKUP files
-check_status_files() {
- debug_msg "check_status_files ($@)"
- if ! [ -f "$MODULE_STATUS" ]; then replace_status_file; fi
- if ! [ -f "$MODULE_STATUS" ]; then echo "Unknown error!!!"; exit; fi
- if ! [ -f "$MODULE_STATUS_BACKUP" ]; then
- message "${PROBLEM_COLOR}Unable to find MODULE_STATUS_BACKUP file" \
- "${MODULE_COLOR}$MODULE_STATUS_BACKUP" \
- "${DEFAULT_COLOR}"
- if `cp $MODULE_STATUS $MODULE_STATUS_BACKUP`; then
- message "${MESSAGE_COLOR}MODULE_STATUS is successfully copied" \
- "to MODULE_STATUS_BACKUP" \
- "${DEFAULT_COLOR}"
- else
- message "${PROBLEM_COLOR}Unsuccessful while copying" \
- "MODULE_STATUS to MODULE_STATUS_BACKUP :=( " \
- "No more operation!!" \
- "${DEFAULT_COLOR}"
- exit 1
- fi
- fi
-}
-
diff --git a/var/lib/lunar/functions/sizes.lunar b/var/lib/lunar/functions/sizes.lunar
deleted file mode 100644
index 77a44a9..0000000
--- a/var/lib/lunar/functions/sizes.lunar
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/sizes #
-# includes find_module_size #
-# #
-# 20020527 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-# function: find_module_size
-# usage : find_module_size <module> |version|
-# purpose : finds the installed size of module in KB
-find_module_size() {
- local VERSION LINE SIZE0 SIZE
- #this functions checks the modules file if there is already size entry
- module_size()
- {
- local SIZE
- unset SIZE
- [ -e "$MODULE_STATUS" ] &&
- SIZE=`grep "^$1\:" $MODULE_STATUS | cut -d ":" -f 5-5`
- [ -n "$SIZE" ] && echo ${SIZE} || false
- }
-
- [ -z "$1" ] && return
-
- [ -n "$2" ] && VERSION=$2 || VERSION=`installed_version $1`
- [ -z "$VERSION" ] &&
- message "${PROBLEM_COLOR}$1 is not installed${DEFAULT_COLOR}" &&
- return
-
- # yes, there is a size entry
- module_size $1 $VERSION && return
-
- # no :( lets dig through logs
- [ -e "$INSTALL_LOGS/$MODULE-$VERSION" ] &&
- while read LINE
- do
- [ -f "$LINE" ] &&
- SIZE0=`du "$LINE" |
- cut -f 1-1` &&
- SIZE=$((SIZE0+SIZE))
- done <$INSTALL_LOGS/$MODULE-$VERSION &&
- echo ${SIZE}KB ||
- message "${PROBLEM_COLOR}Install log for $1 is not found${DEFAULT_COLOR}"
-}
-
diff --git a/var/lib/lunar/functions/sources.lunar b/var/lib/lunar/functions/sources.lunar
deleted file mode 100644
index cd03349..0000000
--- a/var/lib/lunar/functions/sources.lunar
+++ /dev/null
@@ -1,219 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/sources #
-# includes sources, md5_verify_source, verify_sources #
-# verify_source #
-# #
-# 20020604 #
-# #
-############################################################
-# #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-
-verify_source() {
- local VERIFIED SOURCE_FILE
- debug_msg "verify_source ($@)"
- VERIFIED="true"
- for SOURCE_FILE in $@ ; do
- if [ ! -f $SOURCE_CACHE/$1 ] ; then
- message "${PROBLEM_COLOR}Missing ${FILE_COLOR}${1}${DEFAULT_COLOR}"
- message "${PROBLEM_COLOR}Lunar Install aborting.${DEFAULT_COLOR}"
- activity_log "lin" "$MODULE" "$VERSION" "failed" "because it was missing source: $1"
- return 1
- fi
- done
-}
-
-
-# function : sources
-# usage : sources <module_name>
-# purpose : displays the sources needed for a given module
-sources() {
-(
- debug_msg "sources ($@)"
- MAX_SOURCES=${MAX_SOURCES:-100}
-
- if ! run_details $1 ; then
- return 1
- fi
-
- for (( CNT=0; CNT<=$MAX_SOURCES; CNT++ )) ; do
- TEMP=SOURCE$((CNT))
- TEMP=${TEMP/SOURCE0/SOURCE}
-
- eval SRC1=\$${TEMP}
- eval SRC2=\$SOURCE$((CNT+1))
- eval SRC3=\$SOURCE$((CNT+2))
-
- if [ -n "$SRC1" ] ; then
- echo $SRC1
- fi
-
- #if two consequtive empty sources, then break
- [ -z "$SRC2" ] && [ -z "$SRC3" ] && {
- break
- }
- done
-)
-}
-
-
-erase() {
- debug_msg "erase ($@)"
- if [ "$PARTIAL" == "off" ]; then
- debug_msg "erase: deleting \"$1\""
- rm -f $1
- fi
-}
-
-
-unpack() {
- local FILENAME
- debug_msg "unpack ($@)"
-
- FILENAME=$SOURCE_CACHE/$1
- verbose_msg "Unpacking \"$FILENAME\" in \"$(pwd)\""
- plugin_call SOURCE_UNPACK $SOURCE_CACHE/$1
-
- if [ "$?" != 0 ] ; then
- message "${PROBLEM_COLOR}! Error while unpacking ${FILE_COLOR}$SOURCE_CACHE/$1${DEFAULT_COLOR}${PROBLEM_COLOR}${DEFAULT_COLOR}"
- return 1
- fi
-}
-
-
-# usage: verify_all_sources $MODULE
-# check all sources regarding verification method
-verify_all_sources() {
-(
- debug_msg "verify_all_sources ($@)"
- MAX_SOURCES=${MAX_SOURCES:-100}
-
- if ! run_details $1 ; then
- return 1
- fi
-
- if [ -n "$WANT_VERSION" ] ; then
- message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR} Integrity checking is disabled when using \"--want\"!${DEFAULT_COLOR}"
- return 0
- fi
-
- for (( C=0 ; C<=$MAX_SOURCES ; C++ )) ; do
- TEMP=SOURCE$((C))
- TEMP=${TEMP/SOURCE0/SOURCE}
- eval SRC1=\$${TEMP}
-
- # it needs to exist prior before we can check it:
- if ! verify_source $SRC1 ; then
- return 1
- fi
- eval VFYS=\${${TEMP}_VFY[@]}
-
- # cumulate result:
- unset RESULT
- if [ -n "$VFYS" ] ; then
- # we need to check ALL args for validity... if one fails we should not
- # trust the source
- for VFY in $VFYS ; do
- plugin_call SOURCE_VERIFY $SRC1 $VFY
- if [ $? == 1 ]; then
- RESULT=1
- fi
- done
- # so what if?
- if [ "$RESULT" == "1" ] ; then
- # remove?
- MODULE=$1
- message "${MESSAGE_COLOR}You should remove ${DEFAULT_COLOR}${FILE_COLOR}$SRC1${DEFAULT_COLOR}${MESSAGE_COLOR} !${DEFAULT_COLOR}"
-
- if query "Remove \"$SOURCE_CACHE/$SRC1\" ? " y ; then
- rm -f $SOURCE_CACHE/$SRC1
- fi
- fi
- fi
-
- # our fallthrough as usual:
- eval SRC2=\$SOURCE$((C+1));
- eval SRC3=\$SOURCE$((C+2));
- [ -z "$SRC2" ] && [ -z "$SRC3" ] && break
- done
-
- # result?
- if [ -n "$RESULT" ] ; then
- return 1
- fi
-
- # if we removed something we better make sure we break:
- if ! verify_source $(sources $1) ; then
- return 1
- fi
-)
-}
-
-
-rm_source_dir() {
- local DEAD_DIR
- debug_msg "rm_source_dir ($@)"
-
- if [ "$KEEP_SOURCE" == "on" ] ; then
- return 0
- fi
-
- cd $BUILD_DIRECTORY
- DEAD_DIR=$1
- DEAD_DIR=${DEAD_DIR:-$SOURCE_DIRECTORY}
-
- verbose_msg "destroying building dir \"$DEAD_DIR\""
- rm -rf $DEAD_DIR 2> /dev/null
-}
-
-
-mk_source_dir() {
- local NEW_DIR
- debug_msg "mk_source_dir ($@)"
-
- # yes this sounds weird but it might happen: no dir $BUILD_DIRECTORY on
- # clean boxes!
- if [ ! -e "$BUILD_DIRECTORY" ] ; then
- mkdir -p "$BUILD_DIRECTORY"
- fi
- cd "$BUILD_DIRECTORY"
- NEW_DIR=$1
- NEW_DIR=${NEW_DIR:-$SOURCE_DIRECTORY}
-
- verbose_msg "creating building dir \"$NEW_DIR\""
- if [ -d $NEW_DIR ] ; then
- verbose_msg "Removing old source directory first!"
- rm -rf $NEW_DIR 2>/dev/null
- fi
- mkdir -p $NEW_DIR
-}
-
-
-validate_source_dir() {
- debug_msg "validate_source_dir ($@)"
-
- verbose_msg "validating \"$SOURCE_DIRECTORY\""
- if [ -n "$SOURCE_DIRECTORY" ] &&
- [ "$SOURCE_DIRECTORY" != "$BUILD_DIRECTORY" ] &&
- echo "$SOURCE_DIRECTORY" | grep -q "$BUILD_DIRECTORY"
- then
- true
- else
- message "\$SOURCE_DIRECTORY and \$BUILD_DIRECTORY must not be the same."
- message "\$SOURCE_DIRECTORY must not be empty."
- message "\$SOURCE_DIRECTORY must be a subdirectory of \$BUILD_DIRECTORY"
- false
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/temp.lunar b/var/lib/lunar/functions/temp.lunar
deleted file mode 100644
index 76b174b..0000000
--- a/var/lib/lunar/functions/temp.lunar
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# #
-# temp.lunar - lunar temp code handling #
-# #
-####################################################################
-# #
-# Copyright 2003 - Auke Kok under GPLv2 #
-# #
-####################################################################
-# #
-# temp.lunar contains uniform temporary file name creation and #
-# tracking. All lunar tools MUST use these functions if they wish #
-# to perform temporary file operations #
-# #
-# functions: temp_create, temp_destroy #
-# #
-####################################################################
-
-
-temp_create() {
- local TMPFILE
- debug_msg "temp_create ($@)"
- TMPFILE="$@"
- if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
- echo $TMPFILE
- else
- message "${PROBLEM_COLOR}ERROR:${NORMAL_COLOR}${DEFAULT_COLOR}" \
- "Cannot create temp file${NORMAL_COLOR}"
- exit 1
- fi
-}
-
-
-temp_destroy() {
- debug_msg "temp_destroy ($@)"
- if [ -e "$1" ] ; then
- rm -f "$1"
- fi
-}
-
-
diff --git a/var/lib/lunar/functions/tracking.lunar b/var/lib/lunar/functions/tracking.lunar
deleted file mode 100644
index 361d53f..0000000
--- a/var/lib/lunar/functions/tracking.lunar
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/bash
-# #
-# subroutines - Lunar subroutines #
-# #
-############################################################
-# #
-# this WAS the subroutines of a source based Linux distro, #
-# calls Sorcerer GNU/Linux, or SGL. SGL is no longer #
-# available with GPL license. Since this script was taken #
-# before licensing scheme change, no legal problems I #
-# guess. #
-# #
-# the code is re-written for Lunar. The previous Copyright #
-# notices are kept; just in case some code is left :=) #
-# Kagan Kongar <kongar at tsrsb.org.tr>, 20020519 #
-# #
-############################################################
-# #
-# Copyright 2001 by Kyle Sallee #
-# #
-# Parts Copyrighted Hendrik Visage 2002 under GPLv2 #
-# #
-# Parts Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-
-# function : invoke_installwatch
-# usage : invoke_installwatch
-# purpose : start logging all disk accesses with installwatch
-invoke_installwatch() {
- debug_msg "invoke_installwatch ($@)"
- if [ -e /usr/lib/installwatch.so ] ; then
- export LD_PRELOAD=/usr/lib/installwatch.so
- fi
-}
-
-
-# function : devoke_installwatch
-# usage : devoke_installwatch
-# purpose : stop logging all disk accesses with installwatch
-devoke_installwatch() {
- debug_msg "devoke_installwatch ($@)"
- unset LD_PRELOAD
-}
-
-
-# function : parse_iw
-# usage : parse_iw
-# purpose : remove unwanted accesses from the installwatch file
-parse_iw() {
- local OMIT_IN
- debug_msg "parse_iw ($@)"
- OMIT_IN=" rename\| symlink\| unlink"
-
- grep -v "$OMIT_IN" $INSTALLWATCHFILE | cut -f3 | grep -v "^$SOURCE_DIRECTORY" | grep -v -f $EXCLUDED
- cat $INSTALLWATCHFILE | cut -f4 | grep -v "^$SOURCE_DIRECTORY" | grep -v -f $EXCLUDED | grep "^/"
-}
-
-
-# function : create_install_log
-# usage : create_install_log
-# purpose : create an install log
-create_install_log() {
- local TMP_INST_LOG INST_LOG IFS MISOWNED_SYMLINKS
- debug_msg "create_install_log ($@)"
-
- TMP_INST_LOG=$(temp_create "install-log")
- INST_LOG="$INSTALL_LOGS/$MODULE-$VERSION"
- rm -f $INST_LOG &> /dev/null
-
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
-
- export IFS="$TAB_ENTER_IFS"
-
- parse_iw | sort | uniq | filter "$LOCAL_EXCLUDED" | custom_filters | exists > $TMP_INST_LOG
- echo "$INSTALL_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
- echo "$COMPILE_LOGS/$MODULE-$VERSION.bz2" >> $TMP_INST_LOG
- echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
-
- MISOWNED_SYMLINKS=$(syms_not_owned $TMP_INST_LOG
- echo -n "/dev/null")
-
- if [ "$MISOWNED_SYMLINKS" == "/dev/null" ] ; then
- install -m644 $TMP_INST_LOG $INST_LOG
- else
- grep -v "$MISOWNED_SYMLINKS" $TMP_INST_LOG > $INST_LOG
- fi
-
- temp_destroy $TMP_INST_LOG
-}
-
-
-create_md5sum_log() {
- local FILE
- debug_msg "create_md5sum_log ($@)"
-
- rm -f $MD5SUM_LOGS/$MODULE-$VERSION &> /dev/null
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MODULE-$VERSION${DEFAULT_COLOR}"
-
- IFS=$'\n' files < $INSTALL_LOGS/$MODULE-$VERSION | xargs -i md5sum '{}' >> $MD5SUM_LOGS/$MODULE-$VERSION
-}
-
-create_install_cache() {
- debug_msg "create_install_cache($@)"
-
- if [ "$ARCHIVE" == "off" ] ; then
- return
- fi
-
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
- tar cPjf "$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MODULE-$VERSION
-
-}
-
-
-finish_install() {
- debug_msg "finish_install ($@)"
-
- create_install_log &&
- create_md5sum_log &&
- create_install_cache &&
-
- add_module $MODULE installed $VERSION $(find_module_size $MODULE $VERSION)
- verbose_msg "module size is $(find_module_size $MODULE $VERSION)"
-}
-
-
diff --git a/var/lib/lunar/functions/uniqid.lunar b/var/lib/lunar/functions/uniqid.lunar
deleted file mode 100644
index 45dc0fa..0000000
--- a/var/lib/lunar/functions/uniqid.lunar
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-# #
-# uniqid.lunar - Make a unique id for tracking clients #
-# #
-############################################################
-# #
-# Copyright Fw systems LLC Under eitherGPL v2 or BSD Lic. #
-# #
-############################################################
-
-
-push_uniq_id() {
- debug_msg "push_uniq_id ($@)"
- if [ -z "$UNIQID" ]; then
- create_uniq_id
- fi
-
- verbose_msg "registering \"$UNIQID\" with server"
- wget -t 1 -T 5 -q -O - "lunar-linux.org/cgi-bin/houston?loc=$UNIQID"
-
-}
-
-
-create_uniq_id() {
- local OS HASH IFACE
- debug_msg "create_uniq_id ($@)"
- if [ -n "$UNIQID" ]; then
- return
- fi
-
- OS=$(uname -s)
-
- if [ "$OS" == "OpenBSD" ]; then
- HASH="sha1"
- IFACE=`netstat -r | grep default | awk '{print $7}'`
- elif [ "$OS" == "Linux" ]; then
- HASH="md5sum"
- IFACE=`netstat -r | grep default | awk '{print $8}'`
- else
- exit 1
- fi
-
- UNIQID=`ifconfig $IFACE |\
- awk '/addr.*[:]* [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]/ {print $NF}' |\
- tr 'A-Z' 'a-z' | $HASH | awk '{print $1}'`
- export UNIQID
-
- verbose_msg "id(\"$IFACE\")=\"$UNIQID\""
-
- set_local_config "UNIQID" "$UNIQID"
-
-}
-
-
diff --git a/var/lib/lunar/functions/updatelog.lunar b/var/lib/lunar/functions/updatelog.lunar
deleted file mode 100644
index e5fba73..0000000
--- a/var/lib/lunar/functions/updatelog.lunar
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/updatelog #
-# includes display_update_log #
-# 20020711 #
-# #
-############################################################
-# #
-# Copyrighted Jason Jackson 2002 under GPLv2 #
-# #
-############################################################
-
-
-# function : display_update_log
-# usage : display_update_log update|rebuild
-# purpose : display a log describing update successes, failures, and summaries
-display_update_log() {
- debug_msg "display_update_log ($@)"
- rm -f /var/log/lunar/update
- {
- if [ -e "$TMP_LIN_SUCCESS" -a -e "$TMP_LIN_FAIL" ] ; then
- display_success_info $1
- fi
- } | tee /var/log/lunar/update
-}
-
-
-# function : display_success_info
-# usage : display_success_info update|rebuild
-# purpose : display a list of update successes and failures
-display_success_info() {
- local NUMSUCCESS NUMFAILURES
- debug_msg "display_success_info ($@)"
-
- NUMSUCCESS=$(wc -l $TMP_LIN_SUCCESS | cut -d" " -f1)
- NUMFAILURES=$(wc -l $TMP_LIN_FAIL | cut -d" " -f1)
-
- message
- message "${MESSAGE_COLOR}Lunar $1 completed at `date`${DEFAULT_COLOR}"
- message "Successful : $NUMSUCCESS"
- message "Failed : $NUMFAILURES"
- message
-
- if [ "$NUMSUCCESS" -gt "0" ]; then
- message "${MESSAGE_COLOR}Successfully updated modules:${DEFAULT_COLOR}"
- cat $TMP_LIN_SUCCESS
- message
- fi
-
- if [ "$NUMFAILURES" -gt "0" ]; then
- message "${MESSAGE_COLOR}Failed updated modules:${DEFAULT_COLOR}"
- cat $TMP_LIN_FAIL
- message
- fi
-
-}
-
-# function : display_moonbase_changes
-# usage : display_moonbase_changes
-# purpose : display a list of modules added or removed during this update
-display_moonbase_changes() {
- local MODULE_CHANGES NEW_MODULES DEL_MODULES MOV_MODULES M
- debug_msg "display_moonbase_changes ($@)"
-
- if [ -e "$MODULE_INDEX" ] && [ -e "$TMP_MODULE_INDEX" ]; then
- MODULE_CHANGES=$(temp_create "module-changes")
- diff -U0 $TMP_MODULE_INDEX $MODULE_INDEX | grep -v -e '^@@' -e '^---' -e '^+++' > $MODULE_CHANGES
-
- MODULES=$(cat $MODULE_CHANGES | cut -d: -f1 | sed 's:^[+-]::' | sort -t : | uniq)
- for M in $MODULES; do
- IN=$(grep "^-$M:" $MODULE_CHANGES)
- OUT=$(grep "^+$M:" $MODULE_CHANGES)
- if [ -z "$IN" -a -n "$OUT" ] ; then
- # new module:
- NEW_MODULES="$NEW_MODULES $M"
- elif [ -n "$IN" -a -z "$OUT" ] ; then
- # removed module:
- DEL_MODULES="$DEL_MODULES $M"
- else
- # moved module
- MOV_MODULES="$MOV_MODULES $M"
- fi
- done
-
- if [ -n "$NEW_MODULES" ]; then
- message "${MESSAGE_COLOR}New modules:${DEFAULT_COLOR}"
- for M in $NEW_MODULES; do
- message " $M"
- done
- message
- fi
-
- if [ -n "$DEL_MODULES" ]; then
- message "${MESSAGE_COLOR}Removed modules:${DEFAULT_COLOR}"
- for M in $DEL_MODULES; do
- message " $M"
- done
- message
- fi
-
- if [ -n "$MOV_MODULES" ]; then
- message "${MESSAGE_COLOR}Moved modules:${DEFAULT_COLOR}"
- for M in $MOV_MODULES; do
- INS=$(grep "^[-]$M:" $MODULE_CHANGES | cut -d: -f2)
- OUTS=$(grep "^[+]$M:" $MODULE_CHANGES | cut -d: -f2)
- message " $M: $INS -> $OUTS"
- done
- message
- fi
- temp_destroy $MODULE_CHANGES
- fi
-}
-
diff --git a/var/lib/lunar/functions/useradd.lunar b/var/lib/lunar/functions/useradd.lunar
deleted file mode 100644
index 0ac4018..0000000
--- a/var/lib/lunar/functions/useradd.lunar
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/bin/bash
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $FUNCTIONS/uid.lunar #
-# includes add_priv_user add_priv_group #
-# 20030306 #
-# #
-############################################################
-# #
-# Copyrighted Auke Kok 2006 under GPLv2 #
-# #
-############################################################
-
-
-# function: add_priv_group
-# usage : add_priv_group groupname [addgroupopts [addgroupopts]...]
-# info : adds groupname and passes addgroupopts to 'addgroup'
-function add_priv_group() {
- local GROUPNAME
- debug_msg "function add_priv_group ($@)"
-
- if [ -n "$INSTALLWATCHFILE" ] ; then
- devoke_installwatch
- fi
- GROUPNAME=$1
-
- if [ -z "$GROUPNAME" ] ; then
- message "${PROBLEM_COLOR}!add_priv_user: no groupname specified${DEFAULT_COLOR}"
- exit 1
- fi
-
- if grep -q "^$GROUPNAME:" /etc/group ; then
- verbose_msg "group \"$GROUPNAME\" already exists, not creating"
- else
- # add the group:
- for (( N=0 ; N<100 ; N++)) ; do
- if [ -z "$(cat /etc/group | cut -d: -f3 | grep "^$N$" )" ] ; then
- break
- fi
- done
- if [ "$N" == "100" ] ; then
- message "${PROBLEM_COLOR}!add_priv_user: no more group id's left under gid=100, bailing out!${DEFAULT_COLOR}"
- exit 1
- fi
- verbose_msg "creating group \"$GROUPNAME\" with id=\"$N\""
- groupadd -g $N $GROUPNAME
- fi
-
- if [ -n "$INSTALLWATCHFILE" ] ; then
- invoke_installwatch
- fi
-}
-
-
-# function: add_priv_user
-# usage : add_priv_user username:groupname [adduseropts [adduseropts]...]
-# info : adds username:groupname and passes adduseropts to 'adduser'
-function add_priv_user() {
- local USERNAME GROUPNAME
- debug_msg "function add_priv_user ($@)"
-
- if [ -n "$INSTALLWATCHFILE" ] ; then
- devoke_installwatch
- fi
- USERNAME=$(echo $1 | cut -d: -f1)
- GROUPNAME=$(echo $1 | cut -d: -f2)
-
- if [ -z "$USERNAME" ] ; then
- message "${PROBLEM_COLOR}!add_priv_user: no username specified${DEFAULT_COLOR}"
- exit 1
- fi
-
- if [ -z "$GROUPNAME" ] ; then
- message "${PROBLEM_COLOR}!add_priv_user: no groupname specified${DEFAULT_COLOR}"
- exit 1
- fi
-
- if id $USERNAME &> /dev/null ; then
- verbose_msg "user \"$USERNAME\" already exists, not creating or modifying"
- else
- if grep -q "^$GROUPNAME:" /etc/group ; then
- verbose_msg "group \"$GROUPNAME\" already exists, not creating"
- else
- if ! add_priv_group $GROUPNAME ; then
- exit 1
- fi
- fi
-
- # add the user:
- for (( N=0 ; N<100 ; N++)) ; do
- if [ -z "$(cat /etc/passwd | cut -d: -f3 | grep "^$N$" )" ] ; then
- break
- fi
- done
- if [ "$N" == "100" ] ; then
- message "${PROBLEM_COLOR}!add_priv_user: no more user id's left under uid=100, bailing out!${DEFAULT_COLOR}"
- exit 1
- fi
-
- shift
-
- verbose_msg "creating user \"$USERNAME\" (opts=\"-u $N -g $GROUPNAME $@\")"
- useradd -u $N -g $GROUPNAME $USERNAME $@
-
- fi
-
- if [ -n "$INSTALLWATCHFILE" ] ; then
- invoke_installwatch
- fi
-}
-
diff --git a/var/lib/lunar/functions/view.lunar b/var/lib/lunar/functions/view.lunar
deleted file mode 100644
index 1e5cb62..0000000
--- a/var/lib/lunar/functions/view.lunar
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-# #
-# display.lunar - functions to view files #
-# #
-####################################################################
-
-
-# function : view_file
-# usage : view_file FILENAME
-# purpose : to view a file
-view_file() {
- debug_msg "view_file ($@)"
- if [ -n "$1" ] ; then
- # show a file $1
- case $(file -b $1 | cut -d' ' -f1) in
- bzip2) bzcat $1 | ${PAGER:-less} ;;
- gzip) zcat $1 | ${PAGER:-less} ;;
- *)
- # default fallback
- cat $1 | ${PAGER:-less} ;;
- esac
- else
- cat | ${PAGER:-less}
- fi
-}
-
diff --git a/var/lib/lunar/menu/alias.menu b/var/lib/lunar/menu/alias.menu
deleted file mode 100644
index 3760d1b..0000000
--- a/var/lib/lunar/menu/alias.menu
+++ /dev/null
@@ -1,85 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# Copyright 2007 (c) GPLv2 - Auke Kok #
-# #
-############################################################
-
-
-alias_menu_list_aliases()
-{
- for A in `cut -d: -f1 $MOONBASE/aliases`; do
- echo ${A:1}
- CHOICE=$(get_local_config `echo LUNAR_ALIAS_${A:1}`)
- if [ -n "$CHOICE" ] ; then
- echo "$CHOICE"
- else
- echo "[unset]"
- fi
- done
-}
-
-
-alias_menu_list_alias_choices()
-{
- echo "None"
- echo "None"
- if [ -z "$(get_local_config `echo LUNAR_ALIAS_$1`)" ] ; then
- echo "on"
- else
- echo "off"
- fi
- IFS=$STANDARD_IFS
- for C in `grep "^%$1:" $MOONBASE/aliases | cut -d: -f2`; do
- echo "$C"
- echo "$C"
- if [ $(get_local_config `echo LUNAR_ALIAS_$1`) == "$C" ] ; then
- echo "on"
- else
- echo "off"
- fi
- done
-}
-
-
-select_aliases()
-{
- export IFS=$ENTER_IFS
-
- while true ; do
- DEFAULT=${CHOICE}
- CHOICE=`$DIALOG --title "Select Lunar Aliases" \
- --ok-label "Select" \
- --cancel-label "Close" \
- --default-item "$DEFAULT" \
- --menu "" 0 0 0 \
- $(alias_menu_list_aliases)`
- if [ $? != 0 ]; then
- return
- fi
-
- # modify an alias
- DEFAULT=$(get_local_config `echo LUNAR_ALIAS_$CHOICE`)
- if [ -z "$DEFAULT" ] ; then
- DEFAULT="None"
- fi
- ACHOICE=`$DIALOG --title "Select Lunar Aliases" \
- --ok-label "Select" \
- --cancel-label "Close" \
- --default-item "$DEFAULT" \
- --radiolist "" 0 0 0 \
- $(alias_menu_list_alias_choices $CHOICE)`
- if [ $? == 0 ]; then
- # modify it
- if [ "$ACHOICE" != "None" ] ; then
- set_local_config `echo LUNAR_ALIAS_$CHOICE` "$ACHOICE"
- else
- unset_local_config `echo LUNAR_ALIAS_$CHOICE`
- fi
- fi
- done
-}
diff --git a/var/lib/lunar/menu/dmodule.menu b/var/lib/lunar/menu/dmodule.menu
deleted file mode 100644
index c5e9cfa..0000000
--- a/var/lib/lunar/menu/dmodule.menu
+++ /dev/null
@@ -1,55 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/dmodule #
-# includes menu for setting the default lunar module #
-# #
-# 20020715 #
-# #
-############################################################
-# #
-# Portions Copyrighted Kyle Sallee under GPL #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-set_default_module(){
-
- PROMPT="Please select the master Lunar module.
-
-This setting permits the SA to track different base
-scripts via selecting the appropriate module. There
-are at least two base modules at the time of writing.
-
-Regardless of the number of modules listed here,
-*lunar* module is the default and stable one.
-
-The modules MUST exist in the moonbase and MUST meet
-some common criteria. Better do not hack by yourself."
-
- LUNAR_MODULES=$(echo "$LUNAR_MODULES" | tr " " "\t")
- LUNAR_MODULES=${LUNAR_MODULES:-lunar}
- LUNAR_MODULE=${LUNAR_MODULE:-lunar}
-
- unset SDM
- for LUNAR in $LUNAR_MODULES ; do
- [ "$LUNAR" == "$LUNAR_MODULE" ] && ONOFF="on" || ONOFF="off"
- SDM=$SDM"$LUNAR:module:$ONOFF:"
- done
-
- SDM=$(echo "$SDM" | tr ":" "\t")
-
- LUNAR_MODULE=`$DIALOG --title "Default Lunar Module" \
- --ok-label "Commit" \
- --radiolist \
- "$PROMPT" \
- 0 0 0 $SDM`
-
- set_local_config "LUNAR_MODULE" "$LUNAR_MODULE"
-
-}
-
diff --git a/var/lib/lunar/menu/download.menu b/var/lib/lunar/menu/download.menu
deleted file mode 100644
index 9805a7f..0000000
--- a/var/lib/lunar/menu/download.menu
+++ /dev/null
@@ -1,320 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/download #
-# includes menu for download options in lunar #
-# #
-# 20020714 #
-# #
-############################################################
-# #
-# Portions Copyrighted Kyle Sallee under GPL #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# proxy portions Copyright 2002 by rodzilla #
-# #
-############################################################
-
-
-inputbox() {
-
- $DIALOG --nocancel \
- --inputbox \
- "$1" 0 0 "$2"
-}
-
-configure_proxy() {
-
- HTTP_PROMPT="Please enter the HTTP proxy server. \
-Example: http://192.168.1.1:8080/"
-
- FTP_PROMPT="Please enter the FTP proxy server. \
-Example: http://192.168.1.1:8080/"
-
- NO_PROMPT="Please enter all domains/ip addresses \
-(comma-separated) proxy should NOT be used for: \
-Example: .mit.edu,mysite.com"
-
- HPROXY=`inputbox "$HTTP_PROMPT" "$http_proxy"` &&
-
- [ "$ftp_proxy" == "" ] && ftp_proxy="$HPROXY"
-
- FPROXY=`inputbox "$FTP_PROMPT" "$ftp_proxy"` &&
- NPROXY=`inputbox "$NO_PROMPT" "$no_proxy"`
-
-}
-
-confirm_proxy_settings() {
-
- confirm() {
- $DIALOG $2 --nocancel --yesno "$1" 8 50
- }
-
- FINISHED=NO
-
- while [ "$FINISHED" != "YES" ] ; do
- PROMPT="Are these settings correct?"
- PROMPT="$PROMPT\nHTTP Proxy: $HPROXY"
- PROMPT="$PROMPT\n FTP Proxy: $FPROXY"
- PROMPT="$PROMPT\n No Proxy: $NPROXY"
-
- if confirm "$PROMPT" "--cr-wrap" ; then
- FINISHED=YES
- else
- configure_proxy
- FINISHED=NO
- fi
- done
-
- set_local_config "http_proxy" "$HPROXY"
- set_local_config "ftp_proxy" "$FPROXY"
- set_local_config "no_proxy" "$NPROXY"
-}
-
-proxy_exit_message() {
-
- $DIALOG --cr-wrap \
- --title "Lunar Proxy Settings Complete" \
- --msgbox \
-"Your proxy configuration has been saved.
-
-Please note that these proxy settings will only be used by
-Lunar (wget) and possibly some other command-line utilities.
-
-You will still have to configure proxy settings in your
-favorite web browser, etc..." 12 65
-
-}
-
-proxy_menu()
-{
- configure_proxy
- confirm_proxy_settings
- proxy_exit_message
-}
-
-download_options() {
-
-set_download_rate() {
- PROMPT="Please enter the maximum bytes per second for lgeting. \
-Example: enter 8000 for downloading no faster then \
-8 kBps, 80k for 80 kBps, or 1m for 1mBps"
-
- if DOWNLOAD_RATE=`$DIALOG --title "Download Rate" \
- --ok-label "Commit" \
- --inputbox \
- "$PROMPT" \
- 0 0 "$DOWNLOAD_RATE"`
- then
- set_local_config "DOWNLOAD_RATE" "$DOWNLOAD_RATE"
- fi
-}
-
-set_repository_threshold() {
- PROMPT="Please enter the minimum time between repository updates in minutes, \
-enter 0 for no threshold. Default threshold is 10 minutes"
-
- if REPOSITORY_THRESHOLD=`$DIALOG --title "Repository threshold" \
- --ok-label "Commit" \
- --inputbox \
- "$PROMPT" \
- 0 0 "$REPOSITORY_THRESHOLD"`
- then
- set_local_config "REPOSITORY_THRESHOLD" "$REPOSITORY_THRESHOLD"
- fi
-}
-
-
-
-set_ftp_active(){
-
- PROMPT="Please select the connection type for ftp downloads.
-
-Passive ftp is the safe and default option. However, if you
-are behind a weird firewall, or if you are experiencing
-download problems, select active ftp option.
-
-This option can also be set per module basis. Add
-FTP_ACTIVE=on in DETAILS file :=) or vice-versa."
-
- FTP_ACTIVE=${FTP_ACTIVE:-off}
- FTP_PASSIVE=${FTP_PASSIVE:-on}
-
- [ "$FTP_ACTIVE" == "on" ] &&
- FTP_PASSIVE=off ||
- FTP_PASSIVE=on
-
- FTP_CONNECTION=`$DIALOG --title "Ftp Connection" \
- --ok-label "Commit" \
- --radiolist \
- "$PROMPT" \
- 0 0 0 \
- "Passive" "normal behaviour" $FTP_PASSIVE \
- "Active" "behind a firewall" $FTP_ACTIVE`
-
- case $FTP_CONNECTION in
- Active) FTP_ACTIVE=on
- ;;
-
- Passive) FTP_ACTIVE=off
- ;;
- esac
-
- set_local_config "FTP_ACTIVE" "$FTP_ACTIVE"
-}
-
-set_partial_downloads(){
-
- PROMPT="Please enable/disable the partial download option.
-
-This is the -c option of wget. Enable is default
-and works fine on almost all cases.
-
-This option can also be set per module basis. Add
-CONTINUE=off in DETAILS file :=) or vice-versa."
-
- CONTINUE=${CONTINUE:-on}
-
- PARTIAL=`$DIALOG --title "Partial Downloads" \
- --ok-label "Commit" \
- --checklist \
- "$PROMPT" \
- 0 0 0 \
- "Enable" "partial downloads" $CONTINUE`
-
- #lets get rid of " and spaces in the variable
- PARTIAL=`echo $PARTIAL | sed s/\"//g | tr -d " "`
-
- if [ "$PARTIAL" == "Enable" ] ; then
- set_local_config "CONTINUE" "on"
- else
- set_local_config "CONTINUE" "off"
- fi
-}
-
-
-set_cache_usage(){
-
- PROMPT="Please enable/disable the cache usage.
-
-This options controls the use of cache for http downloads.
-Default is ON. If this option is set to off, wget will send
-a Pragma: no-cache directive to http server.
-
-This option can also be set per module basis. Add
-USE_CACHE=off in DETAILS file :=) or vice-versa."
-
- USE_CACHE=${USE_CACHE:-on}
-
- CACHE=`$DIALOG --title "Cache Usage" \
- --ok-label "Commit" \
- --checklist \
- "$PROMPT" \
- 0 0 0 \
- "Enable" "http cache usage" $USE_CACHE`
-
- #lets get rid of " and spaces in the variable
- CACHE=`echo $CACHE | sed s/\"//g | tr -d " "`
-
- if [ "$CACHE" == "Enable" ] ; then
- set_local_config "USE_CACHE" "on"
- else
- set_local_config "USE_CACHE" "off"
- fi
-}
-
-set_retries() {
- PROMPT="Please enter the maximum number of retries.
-
-Example: enter 3 for retrying the download three times.
-The default value (if unset) is 5. Enter 0 for infinite
-number of retries.
-
-This option can also be set per module basis. Add
-NUM_RETRY=<n> in DETAILS file :=)"
-
- NUM_RETRY=${NUM_RETRY:-5}
-
- if NUM_RETRY=`$DIALOG --title "Number of Retries" \
- --ok-label "Commit" \
- --inputbox \
- "$PROMPT" \
- 0 0 "$NUM_RETRY"`
- then
- set_local_config "NUM_RETRY" "$NUM_RETRY"
- fi
-}
-
-set_exhaustive() {
- PROMPT="If you want, lget may try downloading the file from all
-available mirrors, instead of the one you select from the mirror
-menu. All mirrors will be tried until the file is found.
-
-This is not recommended for normal downloads, broken downloads
-should be reported to maintainer at lunar-linux.org.
-"
-
- EXHAUSTIVE=${EXHAUSTIVE:-off}
-
- EXHAUSTIVE=`$DIALOG --title "Exhaustive mirror testing: " \
- --ok-label "Commit" \
- --checklist \
- "$PROMPT" \
- 0 0 0 \
- "Enable" "exhaustive mirror testing" $EXHAUSTIVE`
-
- EXHAUSTIVE=`echo $EXHAUSTIVE | sed s/\"//g | tr -d " "`
-
- if [ "$EXHAUSTIVE" == "Enable" ] ; then
- set_local_config "EXHAUSTIVE" "on"
- else
- set_local_config "EXHAUSTIVE" "off"
- fi
-
-}
-
-
-
-while
- A_HELP="Active or passive connections while using ftp"
- C_HELP="Continue to get or re-get the partial downloads"
- N_HELP="How many times will wget try to download the file?"
- H_HELP="Cache usage for http downloads"
- R_HELP="Per process download rate"
- P_HELP="Proxy Settings"
- E_HELP="Test all mirrors available on download"
- T_HELP="Repository update threshold time"
-
- COMMAND=`$DIALOG --title "Download Options" \
- --item-help \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --menu \
- "" \
- 0 40 8 \
- "A" "Ftp Active/Passive" "$A_HELP" \
- "C" "Partial Downloads" "$C_HELP" \
- "H" "Cache Usage" "$H_HELP" \
- "N" "Number of Retries" "$N_HELP" \
- "P" "Proxies" "$P_HELP" \
- "R" "Download Rate" "$R_HELP" \
- "E" "Exhaustive mirrors" "$E_HELP" \
- "T" "Repository update threshold" "$T_HELP"`
-
- do
- case $COMMAND in
- A) set_ftp_active ;;
- C) set_partial_downloads ;;
- H) set_cache_usage ;;
- N) set_retries ;;
- P) proxy_menu ;;
- R) set_download_rate ;;
- E) set_exhaustive ;;
- T) set_repository_threshold ;;
- esac
- done
-}
-
diff --git a/var/lib/lunar/menu/integrity.menu b/var/lib/lunar/menu/integrity.menu
deleted file mode 100644
index b94abd6..0000000
--- a/var/lib/lunar/menu/integrity.menu
+++ /dev/null
@@ -1,61 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/integrity #
-# includes menu for lunar fix integrity checking options #
-# #
-# 20020714 #
-# #
-############################################################
-# #
-# Portions Copyrighted Kyle Sallee under GPL #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-integrity_menu() {
- INT_TITLE="Integrity Checking Selection Menu"
- INT_HELP="Please select the tests which lunar fix should execute."
- FIND_HELP="Discover missing binary executables, libraries, and header files"
- LDD_HELP="Discover broken binary executables, and libraries"
- SYM_HELP="Discover misowned symbolic links to files"
- MD5SUM_HELP="Discover modified binary executables, and libraries"
-
- if INT_CHECKS=`$DIALOG --title "$INT_TITLE" \
- --no-cancel \
- --item-help \
- --separate-output \
- --checklist \
- "$INT_HELP" \
- 0 0 0 \
- "FIND_CHECK" "" "$FIND_CHECK" "$FIND_HELP" \
- "MD5SUM_CHECK" "" "$MD5SUM_CHECK" "$MD5SUM_HELP" \
- "LDD_CHECK" "" "$LDD_CHECK" "$LDD_HELP" \
- "SYM_CHECK" "" "$SYM_CHECK" "$SYM_HELP"`
- then
- FIND_CHECK=off
- MD5SUM_CHECK=off
- LDD_CHECK=off
- SYM_CHECK=off
-
- for CHECK in $INT_CHECKS; do
- case $CHECK in
- FIND_CHECK) FIND_CHECK=on ;;
- MD5SUM_CHECK) MD5SUM_CHECK=on ;;
- LDD_CHECK) LDD_CHECK=on ;;
- SYM_CHECK) SYM_CHECK=on ;;
- esac
- done
-
- set_local_config "FIND_CHECK" "$FIND_CHECK"
- set_local_config "LDD_CHECK" "$LDD_CHECK"
- set_local_config "MD5SUM_CHECK" "$MD5SUM_CHECK"
- set_local_config "SYM_CHECK" "$SYM_CHECK"
-
- fi
-}
-
diff --git a/var/lib/lunar/menu/license.menu b/var/lib/lunar/menu/license.menu
deleted file mode 100644
index 01bd3a1..0000000
--- a/var/lib/lunar/menu/license.menu
+++ /dev/null
@@ -1,71 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/license #
-# includes menu for setting the accepted/rejected licenses #
-# #
-# 20051105 #
-# #
-############################################################
-# #
-# Copyrighted Auke Kok 2005 under GPLv2 #
-# #
-############################################################
-
-set_accepted_licenses()
-{
-
- PROMPT="Please select acceptable licenses
-
-Lunar by default only accept osi-approved licenses. You will
-need to tell lunar to explicitly accept or reject licenses if
-you wish to change this behaviour.
-
-You have several ways of doing so:
- o Enter \"all\" in this field to accept every license.
- o Enter \"osi\" to accept any known osi approved license.
- o Or enter any specific license name in here to accept it.
- o Enter licenses in the REJECTED_LICENSES and leave this
- field empty to reject only those licenses.
-
-Currently known osi licenses: gpl gpl2 lgpl gfdl bsd mpl cc apache
-artistic qpl."
-
- ACCEPTED_LICENSES=`$DIALOG --title "Select accepted licenses" \
- --ok-label "Commit" --inputbox \
- "$PROMPT" 0 0 "$ACCEPTED_LICENSES"`
-
- set_local_config ACCEPTED_LICENSES "$ACCEPTED_LICENSES"
-
-}
-
-set_rejected_licenses()
-{
-
- PROMPT="Please select rejected licenses
-
-Lunar by default only accepts osi-approved licenses. You will
-need to tell lunar to explicitly accept or reject licenses if
-you wish to change this behaviour.
-
-You have several ways of doing so:
- o use the ACCEPTED_LICENSES field to accept only specific licenses
- o enter any license name in here to reject it - however \"osi\"
- or \"all\" does not work in this field - you must use the exact
- name.
-
-Remember that if you leave ACCEPTED_LICENSES empty, all licenses will
-be accepted that do not match the REJECTED_LICENSES list."
-
- REJECTED_LICENSES=`$DIALOG --title "Select rejected licenses" \
- --ok-label "Commit" --inputbox \
- "$PROMPT" 0 0 "$REJECTED_LICENSES"`
-
- set_local_config REJECTED_LICENSES "$REJECTED_LICENSES"
-
-}
-
diff --git a/var/lib/lunar/menu/mirrors.menu b/var/lib/lunar/menu/mirrors.menu
deleted file mode 100644
index 9b8df55..0000000
--- a/var/lib/lunar/menu/mirrors.menu
+++ /dev/null
@@ -1,83 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/mirror #
-# includes menu for software mirrors selection in lunar #
-# #
-# 20020712 #
-# #
-############################################################
-# #
-# Portions Copyrighted Kyle Sallee under GPL #
-# Copyrighted Kagan Kongar 2002 under GPLv2 #
-# #
-############################################################
-
-mirror_list() {
- sort -r $MIRRORS/$1 | tr -s "\t" | tr "\t" "\n" | tac
-}
-
-select_mirror() {
- $DIALOG --title "Select Mirror Please" \
- --ok-label "Select" \
- --menu \
- "" \
- 0 80 10 \
- $(mirror_list $1)
-}
-
-mirror_menu() {
- while
- G_HELP="Select mirror for downloading GNU sources."
- K_HELP="Select mirror for downloading KDE sources."
- N_HELP="Select mirror for downloading GNOME sources."
- L_HELP="Select mirror for downloading kernel related sources."
- SF_HELP="Select mirror for downloading SourceForge sources."
- LR_HELP="Select the mirror for a last resort download place."
- X_HELP="Select mirror for downloading XFree86 related sources."
- XORG_HELP="Select mirror for downloading XOrg related sources."
- HELP="Selecting a mirror site can speed your downloads."
-
- COMMAND=`$DIALOG --title "Mirror Menu" \
- --ok-label "Select" \
- --cancel-label "Exit" \
- --item-help \
- --menu "" 0 0 0 \
- "GNOME" "" "$N_HELP" \
- "GNU" "" "$G_HELP" \
- "KDE" "" "$K_HELP" \
- "KERNEL" "" "$L_HELP" \
- "SFORGE" "" "$SF_HELP" \
- "LRESORT" "" "$LR_HELP" \
- "XFREE86" "" "$X_HELP" \
- "XORG" "" "$XORG_HELP"`
-
- do
- case $COMMAND in
- GNOME) MIRROR=" GNOME_URL" ;;
- GNU) MIRROR=" GNU_URL" ;;
- KDE) MIRROR=" KDE_URL" ;;
- KERNEL) MIRROR=" KERNEL_URL" ;;
- XFREE86) MIRROR=" XFREE86_URL" ;;
- XORG) MIRROR=" XORG_URL" ;;
- SFORGE) MIRROR=" SFORGE_URL" ;;
- LRESORT) MIRROR=" LRESORT_URL" ;;
- esac
-
- if MIRROR_URL=$(select_mirror $COMMAND); then
- if [ "$MIRROR_URL" == "Custom" ]; then
- MIRROR_URL=$($DIALOG --inputbox "Please enter the URL." 0 0)
- fi
-
- if [ -n "$MIRROR_URL" ] ; then
- set_local_config "$MIRROR" "$MIRROR_URL" &&
- $DIALOG --msgbox "$MIRROR=$MIRROR_URL saved in $LOCAL_CONFIG" 8 60
- fi
- fi
- done
-}
-
diff --git a/var/lib/lunar/menu/moonbase.menu b/var/lib/lunar/menu/moonbase.menu
deleted file mode 100644
index 6f63c88..0000000
--- a/var/lib/lunar/menu/moonbase.menu
+++ /dev/null
@@ -1,47 +0,0 @@
-############################################################
-# #
-# This code is written for Lunar Linux, see #
-# http://lunar-linux.org #
-# #
-############################################################
-# #
-# $MENUS/moonbase #
-# includes menu for setting the default moonbase branch #
-# #
-# 20120317 #
-# #
-############################################################
-# #
-# Portions of dmodule.menu - Check COPYRIGHT there #
-# Copyright Jean Bruenn <wdp at lunar-linux.org> (GPLv2) #
-# #
-############################################################
-
-set_default_moonbase() {
-
- PROMPT="Please choose the moonbase branch to use.
-
- This setting controls whether the stable or
- unstable branch of lunar linux' moonbase will
- be used.";
-
- MOONBASE_TYPES=$(echo "$MOONBASE_TYPES" | tr " " "\t")
- MOONBASE_TYPES=${MOONBASE_TYPES:-stable}
- MOONBASE_TYPE=${MOONBASE_TYPE:-stable}
- unset SDM
- for MOONBASE in $MOONBASE_TYPES; do
- [ "$MOONBASE" == "$MOONBASE_TYPE" ] && ONOFF="on" || ONOFF="off"
- SDM=$SDM"$MOONBASE:type:$ONOFF:"
- done
-
- SDM=$(echo "$SDM" | tr ":" "\t")
-
- MOONBASE_TYPE=`$DIALOG --title "Default Moonbase Branch" \
- --ok-label "Commit" \
- --radiolist \
- "$PROMPT" \
- 0 0 0 $SDM`
-
- set_local_config "MOONBASE_TYPE" "$MOONBASE_TYPE"
-
-}
diff --git a/var/lib/lunar/plugins/build-zpatches.plugin b/var/lib/lunar/plugins/build-zpatches.plugin
deleted file mode 100644
index dc46ac4..0000000
--- a/var/lib/lunar/plugins/build-zpatches.plugin
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# build-zpatches.plugin - build handling of custom #
-# patches that need to be applied #
-# to a module without editing #
-# DETAILS/BUILD files #
-# #
-#############################################################
-# #
-# Copyright 2007 by Stefan Wold under GPLv2 #
-# #
-#############################################################
-
-
-plugin_zpatches_apply()
-{
- local PATCHDIRS FPATCH PATCH TARCMD GZCMD TMPFILE1 TMPFILE2
- if [ -d $MOONBASE/zlocal/_patches/$MODULE ]; then
- cd $SOURCE_DIRECTORY
- PATCHDIRS+=" $MOONBASE/zlocal/_patches/$MODULE"
- # Check for version based patch dir
- if [ -d $MOONBASE/zlocal/_patches/$MODULE/$VERSION ]; then
- PATCHDIRS+=" $MOONBASE/zlocal/_patches/$MODULE/$VERSION"
- fi
- # Now find all patches and apply them
- # We also sort them so it possible to apply patch order
- # by prefixing a patch with 01, 02, 03 etc
- find $PATCHDIRS -maxdepth 1 -type f | sed 's;[^/]*$;& &;' | sort -t ' ' -k 2 | while read FPATCH PATCH; do
- verbose_msg "Applying custom patch for $MODULE ($PATCH)"
-
- if [[ -n `echo $PATCH | grep '\.tar'` ]] ; then
- TARCMD="tar x -O"
- else
- TARCMD="cat"
- fi
-
- if [[ -n `echo $PATCH | grep '\.bz2$'` ]] ; then
- GZCMD="bzcat"
- elif [[ -n `echo $PATCH | grep '\.gz$'` ]] ; then
- GZCMD="zcat"
- else
- GZCMD="cat"
- fi
-
- TMPFILE1=$(temp_create "zpatch_1")
- TMPFILE2=$(temp_create "zpatch_2")
-
- if $GZCMD $FPATCH > $TMPFILE1 ; then
- # uncompress OK
- if cat $TMPFILE1 | $TARCMD > $TMPFILE2 ; then
- # untar OK
- # Trying -p1 first or else we try -p0
- # An error will be visible if -p1 fail which is normal
- # Only return error if both -p1 and -p0 fail
- patch -p1 -t < $TMPFILE2 || patch -p0 -t < $TMPFILE2
- if [ $? -ne 0 ]; then
- message "${PROBLEM_COLOR}ERROR: Failed to apply ${PATCH} for ${MODULE}${DEFAULT_COLOR}"
- temp_destroy $TMPFILE1
- temp_destroy $TMPFILE2
- return 1
- else
- temp_destroy $TMPFILE1
- temp_destroy $TMPFILE2
- fi
- fi
- fi
- done
- if [ $? != 0 ]; then
- exit 1
- else
- return 2
- fi
- else
- # No patchdir for that module found just continue
- return 2
- fi
-}
-
-plugin_register BUILD_BUILD plugin_zpatches_apply
diff --git a/var/lib/lunar/plugins/check-find.plugin b/var/lib/lunar/plugins/check-find.plugin
deleted file mode 100644
index c451299..0000000
--- a/var/lib/lunar/plugins/check-find.plugin
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# check-find.plugin - plugin that performs file presence #
-# checking of installed modules #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_module_check_find() {
- if [ "$FIND_CHECK" == "off" ] ; then
- return 2
- fi
- debug_msg "plugin_module_check_find ($@)"
-
- MODULE=$1
- VERSION=$(installed_version $MODULE)
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
- FIND_STATUS=2
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" | grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/")
-
- for ITEM in $LOG ; do
- if [ ! -e "$ITEM" ]; then
- (
- export IFS="$IFS_OLD"
- message "${FILE_COLOR}${ITEM}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing.${DEFAULT_COLOR}"
- )
- FIND_STATUS=1
- fi
- done
- else
- (
- export IFS="$IFS_OLD"
- message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
- )
- FIND_STATUS=1
- fi
- return $FIND_STATUS
-}
-
-
-plugin_register MODULE_CHECK plugin_module_check_find
-
-
diff --git a/var/lib/lunar/plugins/check-ldd.plugin b/var/lib/lunar/plugins/check-ldd.plugin
deleted file mode 100644
index 8d4ec77..0000000
--- a/var/lib/lunar/plugins/check-ldd.plugin
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# check-ldd.plugin - plugin that performs ldd checking #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_module_check_ldd() {
- if [ "$LDD_CHECK" == "off" ]; then
- return 2
- fi
- debug_msg "plugin_module_check_ldd ($@)"
-
- MODULE=$1
- VERSION=$(installed_version $MODULE)
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
- LDD_STATUS=2
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- # fast-construct per-module LD path including all /lib/ like directories
- NEW_LD=$(cat $I_LOG | grep "/lib/" | files | sed 's/\(.*\)\/\([^\/]*\)$/\1/g' | uniq | tr '\n' ':')
- LOG=$(cat $I_LOG | grep "/bin/\|/games/\|/lib/\|/sbin/\|/libexec/" | grep -v "/doc/\|/fonts/\|/include/\|/locale/\|/man/\|/modules/\|/var/")
-
- for FILE in $LOG; do
- if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" | grep -q "ELF" && LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep -q "not found" ; then
- (
- export IFS="$IFS_OLD"
- message "${FILE_COLOR}${FILE}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE} ${PROBLEM_COLOR}is broken. ${DEFAULT_COLOR}"
- LD_LIBRARY_PATH=$NEW_LD ldd "$FILE" 2>&1 | grep "not found"
- )
- LDD_STATUS=1
- fi
- done
- fi
- return $LDD_STATUS
-}
-
-
-plugin_register MODULE_CHECK plugin_module_check_ldd
diff --git a/var/lib/lunar/plugins/check-md5sum.plugin b/var/lib/lunar/plugins/check-md5sum.plugin
deleted file mode 100644
index c165631..0000000
--- a/var/lib/lunar/plugins/check-md5sum.plugin
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# check-md5sum.plugin - plugin that performs integrity #
-# checking of installed modules #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_module_check_md5sum() {
- # return CONTINUE if we're disabled
- if [ "$MD5SUM_CHECK" == "off" ]; then
- return 2
- fi
- debug_msg "plugin_module_check_md5sum ($@)"
-
- MODULE=$1
- VERSION=$(installed_version $MODULE)
- MD5_LOG="$MD5SUM_LOGS/$MODULE-$VERSION"
- # by default, do not return OK but CONTINUE
- MD5SUM_STATUS=2
-
- if [ -e "$MD5_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS=$'\t\n'
-
- cat $MD5_LOG | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
- grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/" |
- while read LINE ; do
- if ! echo $LINE | md5sum --check --status ; then
- FILE=$(echo $LINE | awk '{ print $2 }')
- if [ -f "$FILE" ] && [ ! -h "$FILE" ] && file -b "$FILE" |
- egrep -q "executable|shared object|current ar archive|ASCII C?? program" ; then
- message "${FILE_COLOR}$FILE${DEFAULT_COLOR} of ${MODULE_COLOR}$MODULE${PROBLEM_COLOR} has wrong md5sum.${DEFAULT_COLOR}"
- MD5SUM_STATUS=1
- fi
- fi
- done
- else
- message "${MODULE_COLOR}$MODULE${PROBLEM_COLOR} is missing a md5sum log.${DEFAULT_COLOR}"
- fi
- return $MD5SUM_STATUS
-}
-
-
-plugin_register MODULE_CHECK plugin_module_check_md5sum
-
-
diff --git a/var/lib/lunar/plugins/check-symlinks.plugin b/var/lib/lunar/plugins/check-symlinks.plugin
deleted file mode 100644
index ea31314..0000000
--- a/var/lib/lunar/plugins/check-symlinks.plugin
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# check-symlinks.plugin - plugin that performs symlink #
-# checking of installed modules #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_module_check_symlinks() {
- # return CONTINUE if we're disabled
- if [ "$SYM_CHECK" == "off" ]; then
- return 2
- fi
- debug_msg "plugin_module_check_symlinks ($@)"
-
- MODULE=$1
- VERSION=$(installed_version $MODULE)
- I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
-
- if [ -e "$I_LOG" ]; then
- IFS_OLD="$IFS"
- export IFS="
-"
-
- cat $I_LOG | while read ITEM ; do
- if [ -h "$ITEM" ] && [ -f "$ITEM" ] ; then
- TARGET=$( basename $( ls -la "$ITEM" | cut -d '>' -f2 | cut -c 2- ) )
- if ! grep -q "$TARGET" $I_LOG ; then
- (
- export IFS="$IFS_OLD"
- F_TMP=$(temp_create "$MODULE.remove-line")
- cp $I_LOG $F_TMP
- grep -v $ITEM $F_TMP > $I_LOG
- temp_destroy $F_TMP
- message "Symbolic link: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} is owned by ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- message "Target of symbolic link is ${FILE_COLOR}${TARGET}${DEFAULT_COLOR}"
- message "${FILE_COLOR}${TARGET}${DEFAULT_COLOR} is owned by $(grep "^$TARGET$" $INSTALL_LOGS/* | cut -d: -f1)"
- message "Removed: ${SYMLINK_COLOR}${ITEM}${DEFAULT_COLOR} from ${I_LOG}"
- )
- fi
- fi
- done
- fi
- # always return CONTINUE
- return 2
-}
-
-
-plugin_register MODULE_CHECK plugin_module_check_symlinks
-
-
diff --git a/var/lib/lunar/plugins/configd.plugin b/var/lib/lunar/plugins/configd.plugin
deleted file mode 100644
index f7f84c0..0000000
--- a/var/lib/lunar/plugins/configd.plugin
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-######################################################
-# #
-# configd.plugin - handling of /etc/config.d files #
-# #
-######################################################
-# #
-# Copyright 2010 by Stefan Wold under GPLv2 #
-# #
-######################################################
-
-
-plugin_configd_post_build()
-{
- local FILE
-
- debug_msg "plugin_configd_post_build ($@)"
-
- if [ -d $SCRIPT_DIRECTORY/config.d ]; then
- verbose_msg "Handling 'config.d' files"
- invoke_installwatch
-
- [ -d /etc/config.d ] || mkdir -p /etc/config.d
-
- for FILE in $SCRIPT_DIRECTORY/config.d/*; do
- if [ ! -f /etc/config.d/${FILE##*/} ]; then
- verbose_msg "Installing ${FILE##*/} into /etc/config.d"
- /usr/bin/install -g 0 -o 0 -m 0644 $FILE /etc/config.d/
- fi
- done
- devoke_installwatch
- fi
-
- return 2
-}
-
-plugin_register BUILD_POST_BUILD plugin_configd_post_build
diff --git a/var/lib/lunar/plugins/download-file.plugin b/var/lib/lunar/plugins/download-file.plugin
deleted file mode 100644
index 4a7a4d6..0000000
--- a/var/lib/lunar/plugins/download-file.plugin
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# download-file.plugin - plugin that downloads file:// urls #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_source_download_file() {
- # check if we can handle this type of URL:
- if [ ${1:0:7} != "file://" ]; then
- return 2
- fi
- debug_msg "plugin_source_download_file ($@)"
-
- cp "${1:7}$2" $3
-}
-
-
-plugin_register SOURCE_DOWNLOAD plugin_source_download_file
diff --git a/var/lib/lunar/plugins/download-generic.plugin b/var/lib/lunar/plugins/download-generic.plugin
deleted file mode 100644
index 79e7f8c..0000000
--- a/var/lib/lunar/plugins/download-generic.plugin
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-############################################################
-# #
-# download-generic.plugin - download http/ftp urls #
-# #
-############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-############################################################
-
-
-plugin_source_download_generic() {
- # check if we can handle this type of URL:
- if [ ${1:0:7} != "http://" -a ${1:0:8} != "https://" -a ${1:0:6} != "ftp://" ]; then
- return 2
- fi
- debug_msg "plugin_source_download_generic ($@)"
-
- URL=$1
- # add trailing '/'
- if [ "${URL:((${#URL}-1)):1}" != "/" ] ; then
- URL="${URL}/"
- fi
-
- # this is what the download will be stored as initially:
- TMP_FILE=$TMPDIR/$2
-
- if [ "$FTP_ACTIVE" == "off" -o "$FTP_PASSIVE" == "on" ] ; then
- WGET_OPTS+=" --passive-ftp"
- fi
-
- if [ "$CONTINUE" == "off" ] ; then
- erase $TMP_FILE
- else
- WGET_OPTS+=" --continue"
- fi
-
- if [ "$USE_CACHE" == "off" ] ; then
- WGET_OPTS+=" --cache=off"
- else
- WGET_OPTS+=" --cache=on"
- fi
-
- if [ -n "$DOWNLOAD_RATE" ] ; then
- WGET_OPTS+=" --limit-rate=${DOWNLOAD_RATE}"
- fi
-
- if [ ${1:0:8} == "https://" ]; then
- WGET_OPTS+=" --no-check-certificate"
- fi
-
- WGET_OPTS+=" --tries=${NUM_RETRY:-5}"
-
- [ -n "$http_proxy" ] && export http_proxy=$http_proxy
- [ -n "$ftp_proxy" ] && export ftp_proxy=$ftp_proxy
- [ -n "$no_proxy" ] && export no_proxy=$no_proxy
-
- verbose_msg "calling \"wget $WGET_OPTS \"$URL$2\" --output-document $TMP_FILE\""
- if erase $TMP_FILE && wget $WGET_OPTS "$URL$2" --output-document "$TMP_FILE" ; then
- # looks like it worked
- if testpack $TMP_FILE ; then
- if [ "$TMP_FILE" != "$3/$2" ]; then
- install -m644 $TMP_FILE "$3/$2"
- rm $TMP_FILE
- fi
- verbose_msg "download of \"$2\" successful"
- else
- rm -f $TMP_FILE
- return 2
- fi
- else
- # don't report errors against cache misses
- if [ "$URL" != "$LRESORT_URL/" ]; then
- activity_log "lget" "$MODULE" "$VERSION" "failed" "broken URL: \"$URL$2\""
- fi
- return 2
- fi
-}
-
-
-plugin_register SOURCE_DOWNLOAD plugin_source_download_generic
diff --git a/var/lib/lunar/plugins/initd.plugin b/var/lib/lunar/plugins/initd.plugin
deleted file mode 100644
index 0364213..0000000
--- a/var/lib/lunar/plugins/initd.plugin
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# initd.plugin - handling of initd.d files #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_initd_configure()
-{
- local SCRIPTS INITDSCRIPTS INSTALLED_INITDSCRIPTS
- debug_msg "plugin_initd_configure ($@)"
- if ! grep -q INITDSCRIPTS $DEPENDS_CONFIG/$MODULE &&
- [ -d $SCRIPT_DIRECTORY/init.d ]; then
- cd $SCRIPT_DIRECTORY/init.d
-
- SCRIPTS=$(ls -1)
- INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
-
- for INITDSCRIPT in $INITDSCRIPTS; do
- if query "Invoke $INITDSCRIPT via init.d automatically at boot ?" y
- then
- INSTALLED_INIDSCRIPTS=$(echo $INSTALLED_INIDSCRIPTS $INITDSCRIPT)
- else
- if [ -f /etc/init.d/$INITDSCRIPT ]; then
- chkconfig --del $INITDSCRIPT
- ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
- rm -f /etc/rc?.d/???$INITDSCRIPT
- fi
- fi
- done
- cd $SCRIPT_DIRECTORY
-
- set_module_config "INITDSCRIPTS" "$INSTALLED_INIDSCRIPTS"
- fi
- return 2
-}
-
-
-plugin_initd_post_build()
-{
- local SCRIPTS ALL_INITDSCRIPTS CHKCONFIG
- debug_msg "plugin_initd_post_build ($@)"
- [ -d /etc/init.d ] || mkdir -p /etc/init.d
-
- if [ -d $SCRIPT_DIRECTORY/init.d ]; then
- invoke_installwatch
- verbose_msg "handling init.d scripts" | tee -a $C_LOG
- cd $SCRIPT_DIRECTORY/init.d
- SCRIPTS=$(ls -1)
- ALL_INITDSCRIPTS=$(grep -l "# chkconfig: " $SCRIPTS | cut -d/ -f2)
-
- for INITDSCRIPT in $ALL_INITDSCRIPTS; do
- if [ ! -f /etc/init.d/$INITDSCRIPT ] ; then
- /usr/bin/install -g 0 -o 0 -m 700 $SCRIPT_DIRECTORY/init.d/$INITDSCRIPT /etc/init.d/
- fi
- done
- cd $SCRIPT_DIRECTORY
- devoke_installwatch
- fi
-
- for INITDSCRIPT in $INITDSCRIPTS; do
- ls /etc/rc?.d/???$INITDSCRIPT > /dev/null 2>&1 &&
- rm -f /etc/rc?.d/???$INITDSCRIPT
- invoke_installwatch
- chkconfig --add $INITDSCRIPT
- devoke_installwatch
-
- CHKCONFIG=`grep '^# chkconfig:' /etc/init.d/$INITDSCRIPT | cut -d : -f 2-2`
- if `echo $CHKCONFIG | grep -q $(/sbin/runlevel | cut -d ' ' -f 2-2) -`
- then
- if [ "${LUNAR_RESTART_SERVICES:=on}" == "on" ]; then
- ( cd / && /etc/init.d/$INITDSCRIPT stop )
- ( cd / && /etc/init.d/$INITDSCRIPT start )
- fi
- fi
-
- done
- return 2
-}
-
-
-plugin_register BUILD_CONFIGURE plugin_initd_configure
-plugin_register BUILD_POST_BUILD plugin_initd_post_build
diff --git a/var/lib/lunar/plugins/optimize-wrappers.plugin b/var/lib/lunar/plugins/optimize-wrappers.plugin
deleted file mode 100644
index f8e16f3..0000000
--- a/var/lib/lunar/plugins/optimize-wrappers.plugin
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# wrappers linker optimizations plugin
-#
-
-plugin_wrappers_optimize()
-{
- if [[ -z "$USE_WRAPPERS" ]] ; then
- if [ -f /etc/lunar/local/optimizations.WRAPPERS ]; then
- . /etc/lunar/local/optimizations.WRAPPERS
- fi
- fi
-
- if [ "${USE_WRAPPERS:-yes}" == "yes" ]; then
- verbose_msg "Enabled wrapper script usage"
- export PATH=/var/lib/lunar/compilers/:${PATH}
- fi
- return 2
-}
-
-
-plugin_wrappers_optimize_menu()
-{
- # The main code calls this function WITHOUT $1 to find out which
- # compiler optimization plugins exist. It then returns the version
- # number which will be saved in $LUNAR_COMPILER as the user's
- # choice for COMPILERS
- if [ -z "$1" ]; then
- echo "WRAPPERS"
- echo "Compiler wrappers"
- return 2
- elif [ "$1" != "WRAPPERS" ]; then
- # we don't display anything when the user selected a
- # different menu
- return 2
- fi
-
- # load previous optimizations
- if [ -e /etc/lunar/local/optimizations.WRAPPERS ]; then
- . /etc/lunar/local/optimizations.WRAPPERS
- fi
-
- save_optimizations()
- {
- debug_msg "save_optimizations($@)"
- cat > /etc/lunar/local/optimizations.WRAPPERS <<EOF
-USE_WRAPPERS=$USE_WRAPPERS
-EOF
- }
-
- export IFS=$'\t\n'
- TITLE="Lunar CCache Optimizations"
-
- while true; do
- RESULT=`$DIALOG --ok-label "Select" --cancel-label "Close" --menu "Use the Compiler wrapper scripts? This will enable all optimizations for most programs even if the Makefile doesn't support them, and allows for more debugging output." 0 0 0 "USE_WRAPPERS" "Use the compile wrappers [$USE_WRAPPERS]"`
- if [ $? != 0 ]; then
- break
- else
- if [ $USE_WRAPPERS == 'yes' ]; then
- USE_WRAPPERS=no
- else
- USE_WRAPPERS=yes
- fi
- save_optimizations
- fi
- done
-}
-
-
-plugin_register BUILD_BUILD plugin_wrappers_optimize
-plugin_register OPTIMIZE_MENU plugin_wrappers_optimize_menu
diff --git a/var/lib/lunar/plugins/postbuild-generic.plugin b/var/lib/lunar/plugins/postbuild-generic.plugin
deleted file mode 100644
index 06c6eab..0000000
--- a/var/lib/lunar/plugins/postbuild-generic.plugin
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# postbuild-generic.plugin - postbuild handling of non- #
-# module related files #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_services_post_build()
-{
- local IFS LINE
- debug_msg "plugin_services_post_build ($@)"
- if [ -f $SCRIPT_DIRECTORY/services ]; then
- export IFS="$ENTER_IFS"
- while read LINE; do
- grep -q "$LINE" /etc/services || echo "$LINE" >> /etc/services
- done < $SCRIPT_DIRECTORY/services
- fi
- return 2
-}
-
-
-gather_docs()
-{
- # function : gather_docs
- # usage : gather_docs LIST OF FILES
- # purpose : Installs extra documentation that came with the
- # module's source package into the module's
- # document directory (defined as Lunar's base
- # document directory plus the module name).
- debug_msg "gather_docs ($@)"
-
- DOC_DIR=${DOCUMENT_DIRECTORY}/${MODULE}
- if [ -d "$SOURCE_DIRECTORY" ] ; then
- cd $SOURCE_DIRECTORY
- mkdir -p $DOC_DIR
- # For each parameter that is an existing file
- for FILE in ${@}; do
- if [ -e ${FILE} -a -f ${FILE} ] ; then
- # copy it over to the doc directory creating directories as needed
- verbose_msg "Installing extra documentation to: ${DOC_DIR}/${FILE}"
- install -D -m 644 ${FILE} ${DOC_DIR}/${FILE}
- elif [ -d ${FILE} ] ; then
- # copy the directory to the docdir
- verbose_msg "Installing extra documentation to: ${DOC_DIR}/${FILE}"
- cp -a ${FILE} ${DOC_DIR}/
- fi
- done
- # do not return 2 here: this function is called directly and
- # must return true (0) here
- return 0
- fi
- return 2
-}
-
-
-plugin_postbuild_gather_docs()
-{
- # pre-conditions : user must have $GARBAGE="on" to have any
- # of this actually happen.
- debug_msg "plugin_postbuild_gather_docs ($@)"
-
- DOC_DIR=${DOCUMENT_DIRECTORY}/${MODULE}
-
- # This is the list of default extra documentation that is to be
- # installed automatically if the user has $GARBAGE=on. Any other
- # docs are left up to the module writer to get installed.
- DEFAULT_DOCS="README* INSTALL* FAQ* CHAN* doc* DOC* *doc \
- *sample* conf SETUP NEWS Change* manual* Manual*"
-
- if [ -d "$SOURCE_DIRECTORY" ] ; then
- cd $SOURCE_DIRECTORY
-
- # Bail if the user doesn't want to install any extra documentation
- if [ "$GARBAGE" != "on" ] ; then
- return 2
- fi
- invoke_installwatch
- mkdir -p $DOC_DIR
- # No parameters were passed in, install the default docs
- for FILE in ${DEFAULT_DOCS}; do
- # copy all of the default docs (prune Makefiles)
- if [ -s $FILE -a ! -f ${FILE}/Makefile ] ; then
- verbose_msg "Installing default documentation to: ${DOC_DIR}/${FILE}"
- cp -a $FILE $DOC_DIR 2> /dev/null
- fi
- done
- devoke_installwatch
- fi
- return 2
-}
-
-
-plugin_archive_module()
-{
- debug_msg "plugin_archive_module($@)"
- # keep a record of the module scripts used for every install
- if [ ! -e /var/state/lunar/module_history ]; then
- mkdir -p /var/state/lunar/module_history
- fi
- tar -cj --exclude=.svn -C $MOONBASE/$SECTION -f /var/state/lunar/module_history/$MODULE-$VERSION-$(date -u +%Y%m%d).tar.bz2 $MODULE
- return 2
-}
-
-
-plugin_register BUILD_POST_BUILD plugin_services_post_build
-plugin_register BUILD_POST_BUILD plugin_postbuild_gather_docs
-plugin_register BUILD_POST_BUILD plugin_archive_module
diff --git a/var/lib/lunar/plugins/unpack-generic.plugin b/var/lib/lunar/plugins/unpack-generic.plugin
deleted file mode 100644
index b3d55ab..0000000
--- a/var/lib/lunar/plugins/unpack-generic.plugin
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# unpack-generic.plugin - generic plugin that unpacks #
-# sources #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_unpack_generic() {
- case $1 in
- *tar.bz2|*tbz2)
- debug_msg "Unpacking tar.bz2 file \"$1\""
- tar jxf $1 --no-same-owner --no-same-permissions || return 1
- ;;
- *tar.gz|*tgz|*tar.Z)
- debug_msg "Unpacking tar.gz file \"$1\""
- tar zxf $1 --no-same-owner --no-same-permissions || return 1
- ;;
- *.bz2)
- debug_msg "Unpacking bz2 file \"$1\""
- cp $1 . || return 1
- bunzip2 $1 || return 1
- ;;
- *.gz)
- debug_msg "Unpacking gz file \"$1\""
- cp $1 . || return 1
- gunzip $1 || return 1
- ;;
- *.tar)
- debug_msg "Unpacking tar file \"$1\""
- tar xf $1 --no-same-owner --no-same-permissions || return 1
- ;;
- *)
- # fallback: we don't know what to do!
- return 2
- ;;
- esac
- # return success!
- return 0
-}
-
-
-plugin_register SOURCE_UNPACK plugin_unpack_generic
diff --git a/var/lib/lunar/plugins/verify-md5.plugin b/var/lib/lunar/plugins/verify-md5.plugin
deleted file mode 100644
index 5aefe93..0000000
--- a/var/lib/lunar/plugins/verify-md5.plugin
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# verify-md5.plugin - plugin that performs md5check #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_source_verify_md5() {
- # check if we can handle this type of VFY:
- if [ "${2:0:4}" != "md5:" ] ; then
- return 2
- fi
- debug_msg "plugin_source_verify_md5 ($@)"
- TMP_MD5=$(md5sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
- if [ "${2:4}" != "$TMP_MD5" ] ; then
- message "${PROBLEM_COLOR}! md5sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
- verbose_msg "offending md5sum: $TMP_MD5"
- verbose_msg "should be md5sum: ${2:4}"
- return 1
- else
- # always return 'continue' plugin value
- return 2
- fi
-}
-
-
-plugin_register SOURCE_VERIFY plugin_source_verify_md5
diff --git a/var/lib/lunar/plugins/verify-sha1.plugin b/var/lib/lunar/plugins/verify-sha1.plugin
deleted file mode 100644
index a66b14a..0000000
--- a/var/lib/lunar/plugins/verify-sha1.plugin
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# verify-sha1.plugin - plugin that performs sha1check #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# #
-#############################################################
-
-
-plugin_source_verify_sha1() {
- # check if we can handle this type of VFY:
- if [ "${2:0:5}" != "sha1:" ] ; then
- return 2
- fi
- debug_msg "plugin_source_verify_sha1 ($@)"
- TMP_MD5=$(sha1sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
- if [ "${2:5}" != "$TMP_MD5" ] ; then
- message "${PROBLEM_COLOR}! sha1sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
- verbose_msg "offending sha1sum: $TMP_MD5"
- verbose_msg "should be sha1sum: ${2:5}"
- return 1
- else
- # always return 'continue' plugin value
- return 2
- fi
-}
-
-
-plugin_register SOURCE_VERIFY plugin_source_verify_sha1
diff --git a/var/lib/lunar/plugins/verify-sha256.plugin b/var/lib/lunar/plugins/verify-sha256.plugin
deleted file mode 100644
index fcf2316..0000000
--- a/var/lib/lunar/plugins/verify-sha256.plugin
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-#############################################################
-# #
-# verify-sha256.plugin - plugin that performs sha256check #
-# #
-#############################################################
-# #
-# Copyright 2005 by Auke Kok under GPLv2 #
-# Copyright 2009 by Stefan Wold under GPLv2 #
-# #
-#############################################################
-
-
-plugin_source_verify_sha256() {
- # check if we can handle this type of VFY:
- if [ "${2:0:7}" != "sha256:" ] ; then
- return 2
- fi
- debug_msg "plugin_source_verify_sha256 ($@)"
- TMP_SHA=$(sha256sum $SOURCE_CACHE/$1 | cut -d " " -f 1-1)
- if [ "${2:7}" != "$TMP_SHA" ] ; then
- message "${PROBLEM_COLOR}! sha256sum check failed for ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
- verbose_msg "offending sha256sum: $TMP_SHA"
- verbose_msg "should be sha256sum: ${2:7}"
- return 1
- else
- # always return 'continue' plugin value
- return 2
- fi
-}
-
-plugin_register SOURCE_VERIFY plugin_source_verify_sha256
diff --git a/var/lib/lunar/protected b/var/lib/lunar/protected
deleted file mode 100644
index 7c59851..0000000
--- a/var/lib/lunar/protected
+++ /dev/null
@@ -1,134 +0,0 @@
-bin/awk
-bin/basename
-bin/bash
-bin/cat
-bin/chmod
-bin/cp
-bin/cut
-bin/date
-bin/dirname
-bin/file
-bin/grep
-bin/install
-bin/login
-bin/make
-bin/md5sum
-bin/mkdir
-bin/mknod
-bin/mv
-bin/ranlib
-bin/rm
-bin/rmdir
-bin/sed
-bin/sh
-bin/sha1sum
-bin/sleep
-bin/sort
-bin/su
-bin/tail
-bin/tee
-bin/tr
-bin/uname
-^/boot/
-^/boot/grub/menu.1st
-^/etc/aliases
-^/etc/audit
-^/etc/bonobo-activation/
-^/etc/config.d/ospmd.conf
-^/etc/courier/
-^/etc/cups/
-^/etc/dhcpd.conf
-^/etc/exim.conf
-^/etc/exports
-^/etc/fstab
-^/etc/group
-^/etc/group-
-^/etc/grsec/
-^/etc/hostname
-^/etc/httpd/
-^/etc/httpd/
-^/etc/httpsd/
-^/etc/init.d/bootmisc.sh
-^/etc/inittab
-^/etc/ld.so.cache
-^/etc/ld.so.conf
-^/etc/lftp.conf
-^/etc/lilo.conf
-^/etc/localtime
-^/etc/lunar/local/
-^/etc/modules
-^/etc/modules.conf
-^/etc/mtab
-^/etc/named.conf
-^/etc/nsswitch.conf
-^/etc/ntp.conf
-^/etc/passwd
-^/etc/passwd-
-^/etc/postfix/
-^/etc/ppp/
-^/etc/printcap
-^/etc/procmailrc
-^/etc/proftpd.conf
-^/etc/protocols
-^/etc/pureftpd.passwd
-^/etc/pureftpd.pdb
-^/etc/rcS.d/S99bootmisc
-^/etc/resolv.conf
-^/etc/rndc.conf
-^/etc/rndc.key
-^/etc/samba/
-^/etc/security/
-^/etc/services
-^/etc/sgml/catalog
-^/etc/shadow
-^/etc/shadow-
-^/etc/snort
-^/etc/snort.conf
-^/etc/squid/
-^/etc/ssh/
-^/etc/ssl/
-^/etc/ssl/certs/
-^/etc/sudoers
-^/etc/sysctl.conf
-^/etc/syslog.conf
-^/etc/vsftpd.conf
-^/etc/webmin/
-^/etc/X11/
-^/etc/X11/fs/config
-^/etc/X11/XF86Config
-^/etc/X11/XftConfig
-^/etc/X11/XftConfig.gdkxftsaved
-^/etc/X11/xinit/xinitrc
-^/etc/xinetd.conf
-^/etc/xml/catalog
-^/etc/xml/docbook
-^/etc/yp.conf
-/fonts.dir$
-^/lib/ld-linux.so.2
-^/lib/ld-linux-x86-64.so.2
-^/lib/modules/
-/perllocal.pod$
-^/usr/include/bits/syscall.h
-^/usr/include/gnu/stubs.h
-^/usr/lib/installwatch.so
-^/usr/lib/sasl/smtpd.conf
-^/usr/share/httpd/
-^/usr/share/httpsd/
-^/usr/share/info/dir
-^/usr/X11R6/lib/X11/app-defaults
-^/usr/X11R6/lib/X11/xinit/xinitrc
-^/var/lib/lunar/excluded
-^/var/lib/lunar/protected
-^/var/lib/mysql/
-^/var/mailman/Mailman/mm_cfg.py
-^/var/mailman/archives
-^/var/mailman/data
-^/var/mailman/lists
-^/var/mailman/qfiles
-^/var/named/
-^/var/nis/
-^/var/spool/
-^/var/state/
-^/var/state/dhcpd.leases
-^/var/state/dhcpd.leases~
-^/var/yp/
diff --git a/var/lib/lunar/solo b/var/lib/lunar/solo
deleted file mode 100644
index 1200df3..0000000
--- a/var/lib/lunar/solo
+++ /dev/null
@@ -1,8 +0,0 @@
-bash
-binutils
-gcc
-gcc2
-glibc
-lunar
-moonbase
-theedge
diff --git a/var/lib/lunar/sustained b/var/lib/lunar/sustained
deleted file mode 100644
index 92af90b..0000000
--- a/var/lib/lunar/sustained
+++ /dev/null
@@ -1,35 +0,0 @@
-acl
-attr
-bash
-binutils
-bzip2
-coreutils
-cracklib
-dialog
-e2fsprogs
-file
-findutils
-gawk
-gcc
-gettext
-glibc
-grep
-gzip
-installwatch
-less
-lunar
-make
-modutils
-nano
-ncurses
-net-tools
-patch
-readline
-sed
-shadow
-tar
-theedge
-util-linux
-util-linux-crypto
-wget
-zlib
diff --git a/var/lib/lunar/unset.sh b/var/lib/lunar/unset.sh
deleted file mode 100644
index a48b40c..0000000
--- a/var/lib/lunar/unset.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-unset ACTIVITY_LOG
-unset ADDON
-unset ADMIN
-unset ARCHIVE
-unset AUTOFIX
-unset AUTOPRUNE
-unset BLACK
-unset BLUE
-unset BOLD
-unset BOOST_LOCK
-unset BOPT
-unset BUILD
-unset CHECK_COLOR
-unset COLOR
-unset COMPILE_LOGS
-unset CONFIG_CACHE
-unset COPT
-unset CPU
-unset CYAN
-unset DEFAULT
-unset DEFAULT_COLOR
-unset DEPENDS_CONFIG
-unset DEPENDS_STATUS
-unset DEPENDS_STATUS_BACKUP
-unset DIALOGRC
-unset EXCLUDED
-unset EXHAUSTIVE
-unset FILE
-unset FILE_COLOR
-unset FIND_CHECK
-unset FPM
-unset FTP_ACTIVE
-unset FUNCTIONS
-unset GARBAGE
-unset GNOME_URL
-unset GNU_URL
-unset GREEN
-unset INSTALL_CACHE
-unset INSTALL_LOGS
-unset INSTALL_QUEUE
-unset KDE_URL
-unset KERNEL_URL
-unset LDD_CHECK
-unset LDF
-unset LINES
-unset LOCAL_CONFIG
-unset LOCAL_EXCLUDED
-unset LRESORT_URL
-unset LRM_COLOR
-unset LUNAR_MODULE
-unset LUNAR_MODULES
-unset LUNAR_PRIORITY
-unset MAKES
-unset MAX_SOURCES
-unset MD5SUM_CHECK
-unset MD5SUM_LOGS
-unset MENUS
-unset MESSAGE_COLOR
-unset MIRRORS
-unset MODULE_COLOR
-unset MODULE_INDEX
-unset MODULE_STATUS
-unset MODULE_STATUS_BACKUP
-unset MOONBASE
-unset MOONBASE_TYPE
-unset MOONBASE_TYPES
-unset MOONBASE_URL
-unset PATCH_URL
-unset PLATFORM
-unset PRESERVE
-unset PROBLEM_COLOR
-unset PROMPT_DELAY
-unset PROTECTED
-unset PWD
-unset QUERY_COLOR
-unset REAP
-unset RED
-unset REMOVE_QUEUE
-unset RESURRECT_COLOR
-unset SFORGE_URL
-unset SHELL
-unset SOLO
-unset SOUND
-unset SOUND_THEME
-unset SOURCE_CACHE
-unset SPD
-unset SUBROUTINES
-unset SUSTAIN
-unset SUSTAINED
-unset SYM_CHECK
-unset SYMLINK_COLOR
-unset TRACKED
-unset UNIQID
-unset USE_CACHE
-unset VERSION_COLOR
-unset VIEW_REPORTS
-unset VIOLET
-unset VOYEUR
-unset WHITE
-unset XFREE86_URL
-unset XORG_URL
-unset XTRA
-unset YELLOW
diff --git a/var/state/lunar/blacklist.Alpha b/var/state/lunar/blacklist.Alpha
deleted file mode 100644
index ee0350f..0000000
--- a/var/state/lunar/blacklist.Alpha
+++ /dev/null
@@ -1,12 +0,0 @@
-binutils-sparc64
-bin86
-egcs64
-grub
-lilo
-nasm
-silo
-sparc-utils
-uClibc
-uml
-yaboot
-memtest86+
diff --git a/var/state/lunar/blacklist.PowerPC b/var/state/lunar/blacklist.PowerPC
deleted file mode 100644
index 8846277..0000000
--- a/var/state/lunar/blacklist.PowerPC
+++ /dev/null
@@ -1,13 +0,0 @@
-aboot
-binutils-sparc64
-bin86
-egcs64
-e3
-grub
-lilo
-nasm
-silo
-sparc-utils
-uClibc
-uml
-memtest86+
diff --git a/var/state/lunar/blacklist.SPARC b/var/state/lunar/blacklist.SPARC
deleted file mode 100644
index 3228b91..0000000
--- a/var/state/lunar/blacklist.SPARC
+++ /dev/null
@@ -1,9 +0,0 @@
-bin86
-e3
-grub
-lilo
-nasm
-uClibc
-uml
-yaboot
-memtest86+
diff --git a/var/state/lunar/blacklist.x86 b/var/state/lunar/blacklist.x86
deleted file mode 100644
index 25eebe7..0000000
--- a/var/state/lunar/blacklist.x86
+++ /dev/null
@@ -1,6 +0,0 @@
-aboot
-binutils-sparc64
-egcs64
-silo
-sparc-utils
-yaboot
More information about the Lunar-commits
mailing list