updated services code to support new module building enviroment
This commit is contained in:
parent
4c68fccd87
commit
9c56fbaf6a
10 changed files with 3599 additions and 30 deletions
5
.gitattributes
vendored
5
.gitattributes
vendored
|
@ -2,8 +2,12 @@
|
|||
/ChangeLog -text
|
||||
/INSTALL -text
|
||||
/Makefile.in -text
|
||||
/README.services -text
|
||||
/ReadMe -text
|
||||
/configure -text
|
||||
/configure.in -text
|
||||
/hash.c -text
|
||||
/install-sh -text
|
||||
lang/Makefile -text
|
||||
lang/en_us -text svneol=unset#unset
|
||||
lang/en_us.l -text
|
||||
|
@ -14,6 +18,7 @@ lang/language.h -text
|
|||
/language.h -text
|
||||
/makemask.todo -text
|
||||
/match.c -text
|
||||
/modconfig.h.in -text
|
||||
/new.c -text
|
||||
/nickserv.c -text
|
||||
/options.h -text
|
||||
|
|
66
Makefile.in
66
Makefile.in
|
@ -1,34 +1,46 @@
|
|||
INCLUDES = -I../..
|
||||
|
||||
SOURCES= match.c hash.c servicescore.c nickserv.c languages.c
|
||||
OBJECTS= match.o hash.o servicescore.o nickserv.o languages.h
|
||||
TARGET= services.so
|
||||
|
||||
#Neostats Module Makefile!
|
||||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@ -fPIC $(INCLUDES)
|
||||
LINKER=ld
|
||||
CFLAGS=@CFLAGS@
|
||||
LDFLAGS= -rdynamic @LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
DIRECTORY=@DIRINST@/dl/
|
||||
INCLUDES=-I@DIRINST@/include/ -I.
|
||||
|
||||
all: $(OBJECTS) languages
|
||||
$(LINKER) -shared -o $(TARGET) $(LIBS) $(OBJECTS)
|
||||
/bin/cp $(TARGET) ../
|
||||
SOURCES= match.c hash.c servicescore.c nickserv.c language.c
|
||||
OBJECTS= match.o hash.o servicescore.o nickserv.o
|
||||
TARGET= services.so
|
||||
DOCS=README.services
|
||||
|
||||
|
||||
|
||||
all: module
|
||||
|
||||
language.h: lang/language.h
|
||||
cp -p lang/language.h .
|
||||
|
||||
lang/language.h: lang/Makefile lang/index
|
||||
(cd lang ; $(MAKE) language.h)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(INCLUDES) $<
|
||||
|
||||
module: $(OBJECTS) language.h
|
||||
$(CC) -nostdlib -shared -o $(TARGET) $(LDFLAGS) $(OBJECTS)
|
||||
|
||||
clean:
|
||||
/bin/rm -rf ../$(TARGET) Makefile
|
||||
/bin/rm -rf *.o *.lo *.so
|
||||
(cd lang ; $(MAKE clean > /dev/null)
|
||||
/bin/rm -rf $(TARGET) *.o
|
||||
(cd lang ; $(MAKE) clean)
|
||||
|
||||
languages:
|
||||
(cd lang ; $(MAKE) CFLAGS="$(CFLAGS)")
|
||||
install: module
|
||||
$(INSTALL) -m 644 $(TARGET) $(DIRECTORY)
|
||||
$(INSTALL) -m 644 $(DOCS) @DIRINST@/docs/
|
||||
|
||||
$(OBJECTS): Makefile
|
||||
|
||||
match.o:
|
||||
hash.o: services.h
|
||||
servicescore.o: hash.c match.c services.h
|
||||
languages.o: lanuages.c languages.h services.h
|
||||
nickserv.o: servicescore.c hash.c match.c services.h
|
||||
|
||||
language.h: lang/language.h
|
||||
cp -p lang/language.h .
|
||||
|
||||
lang/language.h: lang/Makefile lang/index
|
||||
(cd lang ; $(MAKE) language.h)
|
||||
match.o: match.c
|
||||
hash.o: hash.c
|
||||
servicescore.o: hash.c match.c language.c nickserv.c
|
||||
nickserv.o: match.c hash.c servicescore.c
|
||||
langauges.o: servicescore.c nickserv.c
|
||||
|
|
176
README.services
Normal file
176
README.services
Normal file
|
@ -0,0 +1,176 @@
|
|||
Services for NeoStats Version 0.1
|
||||
---------------------------------
|
||||
|
||||
Well, I finally got pissed of with some of the services out there, and I
|
||||
recently played around with Magick-II.
|
||||
I like some of the features that Magick-II has, but it is a Big Huge Ugly
|
||||
muther of a monster (I'm not kidding, to Compile Magic and the required
|
||||
Libaries took well over 5 hours on a Sparc64 Box!)
|
||||
|
||||
Unfortuantly, while I can see that Multithreading in Services is a good
|
||||
idea, making it work effectively is really hard. When you have to deal with
|
||||
Locking and so on, it can be a real pain.
|
||||
|
||||
The Magick-II services, as far as I can tell, have a BIG issue with
|
||||
locking... constantly I was getting Unknown User and Unknown Channel
|
||||
messages... the threads were just not working fast enough... (yeah, I know
|
||||
its beta software, but I honestly think that there is a flaw in Magick-II
|
||||
base coding, and to fix the problems would require a lot of Re-work)
|
||||
|
||||
So, thats what prompted me to write Services for Neostats... I plan to
|
||||
incorporate as many of the features of Magick-II, and other services that I
|
||||
like into these services... and make it useable.. something that doesn't
|
||||
take 5 hours to compile (Currently, NeoStats with Services only takes around
|
||||
15Sec's to Compile, Beat that Magick!!!!)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
So here are some of the features I have planned:
|
||||
------------------------------------------------------------------------------
|
||||
1. All the Usual NickServ, ChanServ, MemoServ, Operserv features.
|
||||
2. CommServ, in Magick-II is a nice idea, I'm going to include it as a
|
||||
optional Module that can be loaded if you want it. See Below for CommServ
|
||||
Features
|
||||
3. Optionally Replace NeoStats Permission systems with either a database
|
||||
(Where Opers have to be defined to have access, or if CommServ is used, by
|
||||
Committe - Eg, Members of Opers Committe have access to these functions)
|
||||
4. BotServ. Most Likely, BotServ will talk EggDrop Protocol, so in fact, the
|
||||
Bots available in BotServ are Eggdrop Bots that are controlled by
|
||||
Services. This would allow users to have more features that what is in
|
||||
BotServ in existing Services. This will be after a 1.0 Release.
|
||||
5. FileServ. A DCC FileService for the Network, where Network Administrators
|
||||
can setup file serving applications, so they can share files. and example
|
||||
might be to serve mIRC scripts designed for the network.
|
||||
6. No Config File. All settings will be done Online. On Un-Configured
|
||||
Networks, initial configuration would be done via OperServ.
|
||||
7. Language Support.
|
||||
|
||||
The Features of each of the Services will be (and the Order they will be
|
||||
developed and Milestones for that Release):
|
||||
|
||||
0.1 release will be just the Base Services Core. Things I need for All
|
||||
Services. Not really usable by anyone. Includes:
|
||||
* Berkeley DB Storage for all Services - Very reliable, and widely
|
||||
Supported
|
||||
* Minor Changes to the NeoStats Core (Will be submitted to Shmad for
|
||||
Future versions of Neostats, hopefully he will accept them, otherwise
|
||||
I will distribute a Patch System for Neostats to run with Services)
|
||||
|
||||
NickServ.(for 0.2 Release - Most features, not all, as some will require
|
||||
other services, eg, Picture Storage requires FileServ)
|
||||
* All the standard NickServ features, such as identify, drop, register
|
||||
* Private (To Hide last online information)
|
||||
* Secure (To disable identification even if host matchess access list)
|
||||
* Kill (to either kill a user that has not identified in a specific time,
|
||||
or to change their nick - The Network will define what it does)
|
||||
* NickName Expiry (To expire un-used nicks)
|
||||
* SendPass (Allows opers to send password automatically to the registered
|
||||
email address of a nick)
|
||||
* SetPass (Allow Opers to reset passwords)
|
||||
* GetPass (Allow Opers to retrive passwords)
|
||||
* Info, URL, Email, ICQ, AIM fields that can be set by the user
|
||||
* Oper Comments (Allow Operators to set comments about a Nick, that only
|
||||
other opers can see)
|
||||
* Forbid (Don't allow users to register certian Nicks
|
||||
* Suspend (Temporarly suspend access to a Nickname)
|
||||
* Drop (Drop a Nickname Registration by Opers)
|
||||
* Configurable Logging, with some PHP scripts to search log files for
|
||||
events - Ideal when sorting out Nickname Disputes etc etc etc
|
||||
* Picture Storage - As long as FileServ is active (see below) allow users
|
||||
to DCC send pictures that can be associated with their nickname
|
||||
registration, and other users can download it. File size limits can be
|
||||
set by the Opers (Subject to FileServ Development)
|
||||
* Ability to replace Current NeoStats Permissions with NickServ
|
||||
registrations. Eg, can specify levels for nicks, regardless of O line
|
||||
flags, and the opers can use it.
|
||||
* Vhost Support. If a user has identified to nickserv, then their vhost
|
||||
is set to what they have stored with nickserv. 2 ways that this can
|
||||
work:
|
||||
* they request a oper to set it, they can not unset it or delete it
|
||||
without opers help
|
||||
* They can set it themselves, delete it, or change it.
|
||||
|
||||
MemoServ (For 0.3 Release. Most Services available)
|
||||
* Standard Features such as Send/read/erase
|
||||
* Long Memos. Ability to write more than 1 line memo's and send to
|
||||
someone
|
||||
* File Attachments (Subject to FileServ Development)
|
||||
* Ability to set Memo's to be forwarded via Email (maybe even ICQ/AIM?)
|
||||
|
||||
CommServ (For 0.4 Release, Again Most Services, some will require other
|
||||
Services to enable)
|
||||
* Committee MemberShip. ie, you can define a Committee Opers, and add
|
||||
registered Nicks to that Committee.
|
||||
* Group Memo's. You can send a Memo to a Committee, and all users of that
|
||||
Committee get it
|
||||
* Voting Systems. Allow Committee's to Vote on issues.
|
||||
* Not Restricted to Opers
|
||||
* Can replace Current NeoStats Permission systems (based on O line flags)
|
||||
with Committe Membership. E.G. you can say Opers have access to these
|
||||
commands, Service Admins can do this plus opers... (Think of the Levels
|
||||
command in most chanserv's)
|
||||
* FileServ Integration, so you can share files between members in a
|
||||
Committee
|
||||
|
||||
OperServ (For 0.5 Release)
|
||||
* Almost all Common OperServ commands found today.
|
||||
* Akill Management
|
||||
* Clone Protection
|
||||
* Nickname Flood Protection
|
||||
* Kill
|
||||
* All Commands would be issued via the current NeoStats Bot. (ie, instead
|
||||
of having NeoStats, and OperServ, just one Bot, NeoStats (or what ever
|
||||
you want to call it)
|
||||
* Interface to search Log Files for Events.
|
||||
* Services Configuration Interface. Upto here, all versions will have all
|
||||
settings compiled in, and unable to change, after this is done, you will
|
||||
be able to change settings via OperServ instead of editing a config file.
|
||||
|
||||
FileServ (For 0.6 Release)
|
||||
* Ability to have a FileServer
|
||||
* Integrated with NickServ, CommServ, MemoServ
|
||||
* Bandwidth Limiting (So it doesn't consume all your bandwidth and Lag
|
||||
your Services.
|
||||
* Queuing. So you Can Say only so many File Transfers can happen at one
|
||||
time
|
||||
* A public File area, where Opers can upload certian files
|
||||
* Automatic Deletion of files associated with Expired Nicks/Committee's
|
||||
* Quota Support
|
||||
|
||||
Channels Support (0.7 Release)
|
||||
* As NeoStats in its Current form doesn't have any channel support (as of
|
||||
2.0.12, I'll be working on Channel Support for NeoStats for this release.
|
||||
No new Service Features (if Shmad works on Channel support and gets it
|
||||
running before i get here, then this will just end up a maintence
|
||||
release.)
|
||||
|
||||
ChanServ (0.8 Release)
|
||||
* Normal Channel Services
|
||||
* Integration with FileServ, to share files between Channel Members
|
||||
* Op/De-op, modes, access lists, level definitions etc
|
||||
|
||||
Release 0.9 will Focus on Stability, and fixing any bugs
|
||||
Release 1.0 should be fully Functioning Services
|
||||
|
||||
After Release 1.0, I'm not sure how the development will proceed. I plan to
|
||||
Integrate a BotServ into these services as well, but exact details are not
|
||||
yet Concrete. I've being toying with the idea of implementing support for
|
||||
Eggdrops BotNet, with Userfile sharing (based on NickServ, ChanServ), as I
|
||||
think a eggdrop bot integrated with services would be a lot better than a
|
||||
Static Bot, that can't be extended.
|
||||
But I'm also thinking about BotServ with a TCL Scripting engine.
|
||||
|
||||
I think a TCL engine would be cool, but a lot harder to implement
|
||||
Other things I'm thinking about after a 1.0 release:
|
||||
Backup Services with Automatic Replication
|
||||
Ability to run different *Serv's on different hosts, and all share
|
||||
information (eg, might be better to have fileserv on a different machine)
|
||||
Any other features that I think are cool... or anything that you suggest to
|
||||
me that I think is cool as well.
|
||||
|
||||
Also, Language settings would be cool as well.. but I'm still not 100% sure
|
||||
on how to do that effectivly.
|
||||
|
||||
Anyways, thats my Rant for the moment... Read the INSTALL guide on how to
|
||||
get it all up and running.
|
||||
|
||||
if you want more info, then email me at fish@irc-chat.org
|
45
configure.in
Normal file
45
configure.in
Normal file
|
@ -0,0 +1,45 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(README.services)
|
||||
AC_CONFIG_HEADER(modconfig.h)
|
||||
PACKAGE=Module
|
||||
VERSION=1.0
|
||||
DIRINST=~/NeoStats/
|
||||
AC_PREFIX_DEFAULT(~/NeoStats/)
|
||||
CFLAGS="$CFLAGS -O2 -Wall"
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_MSG_CHECKING(Location of NeoStats...)
|
||||
AC_ARG_WITH(neostats,
|
||||
[ --with-neostats=DIR Location of NeoStats installation],
|
||||
[DIRINST=$withval])
|
||||
AC_MSG_RESULT($DIRINST)
|
||||
|
||||
|
||||
AC_CHECK_FILE($DIRINST/include/dl.h,
|
||||
[INCLUDEDIR="$DIRINST/include/"],
|
||||
[AC_MSG_ERROR(Can't find existing NeoStats Installation please supply with --with-neostats option)])
|
||||
|
||||
AC_SUBST(DIRINST)
|
||||
AC_OUTPUT(Makefile)
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| Important Instructions |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| To compile your module, please type 'make' |)"
|
||||
echo "(| If make completes without errors, then you |)"
|
||||
echo "(| Must 'make install', but please be sure that NeoStats |)"
|
||||
echo "(| Is not currently running with a module of the same name |)"
|
||||
echo "(| Running, otherwise Make install will not work |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(| For Support please visit: |)"
|
||||
echo "(| IRC: /server irc.irc-chat.net |)"
|
||||
echo "(| /server irc.neostats.net |)"
|
||||
echo "(| #neostats channel |)"
|
||||
echo "(| WWW: http://www.neostats.net/cgi-bin/forum.cgi |)"
|
||||
echo "(| http://www.sf.net/projects/neostats/ |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
||||
echo "(|This Module was written by: |)"
|
||||
echo "(| name (email@adress.com) |)"
|
||||
echo "(*----------------------------------------------------------*)"
|
2
hash.c
2
hash.c
|
@ -5,7 +5,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: hash.c,v 1.1 2002/02/27 12:21:27 fishwaldo Exp $
|
||||
** $Id: hash.c,v 1.2 2002/03/28 08:58:16 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
251
install-sh
Executable file
251
install-sh
Executable file
|
@ -0,0 +1,251 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
0
modconfig.h.in
Normal file
0
modconfig.h.in
Normal file
|
@ -5,7 +5,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: options.h,v 1.1 2002/02/27 12:21:28 fishwaldo Exp $
|
||||
** $Id: options.h,v 1.2 2002/03/28 08:58:16 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
** Based from GeoStats 1.1.0 by Johnathan George net@lite.net
|
||||
*
|
||||
** NetStats CVS Identification
|
||||
** $Id: services.h,v 1.1 2002/02/27 12:21:29 fishwaldo Exp $
|
||||
** $Id: services.h,v 1.2 2002/03/28 08:58:16 fishwaldo Exp $
|
||||
*/
|
||||
|
||||
#ifndef M_SERVICES
|
||||
|
|
Reference in a new issue