diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2001-09-01 18:57:08 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2001-09-01 18:57:08 +0000 |
commit | df5a274627d50f17a9f6d26b83d8e78ab014d7b4 (patch) | |
tree | 383f9254270129c6616505e1b0163b3dbac3c2e2 /devel/p4/files | |
parent | ec1ecd4eb4a495a9e092f620fba2b495af914fe8 (diff) |
- Update to version 01.1
- Support the alpha platform (although it is still at version 99.1)
- Install p4ftpd
- Create a non-privileged user and run p4d as the user
- Dig directories and make the port plug-and-play
- Change the configuration file's name to perforce.conf
- Do not unconditionally remove perforce.conf on deinstall
- Make almost all parameters (including directory layouts and
user/group names) configurable via make variables
- Make the startup script support "restart"
- Take over the maintainership
Approved by: Samuel Tardieu <sam@inf.enst.fr> (ex. MAINTAINER)
Notes
Notes:
svn path=/head/; revision=47290
Diffstat (limited to 'devel/p4/files')
-rw-r--r-- | devel/p4/files/perforce | 18 | ||||
-rw-r--r-- | devel/p4/files/perforce.conf.in | 40 | ||||
-rw-r--r-- | devel/p4/files/perforce.sh.in | 40 |
3 files changed, 72 insertions, 26 deletions
diff --git a/devel/p4/files/perforce b/devel/p4/files/perforce deleted file mode 100644 index e8572a008b80..000000000000 --- a/devel/p4/files/perforce +++ /dev/null @@ -1,18 +0,0 @@ -# -# Perforce FreeBSD configuration file -# - -# -# Perforce ROOT -# -PERFORCE_ROOT="/usr/p4root" - -# -# Perforce options (see man p4d) -# -PERFORCE_OPTIONS="-d -v server=1 -L /var/log/perforce" - -# -# Uncomment this line to have the server started automatically -# -#PERFORCE_START=yes diff --git a/devel/p4/files/perforce.conf.in b/devel/p4/files/perforce.conf.in new file mode 100644 index 000000000000..a98aa38b842b --- /dev/null +++ b/devel/p4/files/perforce.conf.in @@ -0,0 +1,40 @@ +# +# Perforce FreeBSD configuration file +# +# +# $FreeBSD$ + +# +# Perforce ROOT +# +PERFORCE_ROOT="@PERFORCE_ROOT@" + +# +# Perforce user (it is recommended to run p4d as a non-root user) +# +PERFORCE_USER="@PERFORCE_USER@" + +# +# p4d port (default: 1666) +# +PERFORCE_PORT="@PERFORCE_PORT@" + +# +# p4d options (see man p4d) +# +PERFORCE_OPTIONS="-d -p $PERFORCE_PORT -v server=1 -L @PERFORCE_LOGS@/p4d.log" + +# +# Uncomment this line to have the server started automatically +# +#PERFORCE_START=yes + +# +# p4ftpd options (see p4ftpd -h) +# +PERFORCE_FTPD_OPTIONS="-d -p $PERFORCE_PORT -v server=1 -L @PERFORCE_LOGS@/p4ftpd.log" + +# +# Uncomment this line to have the server started automatically +# +#PERFORCE_FTPD_START=yes diff --git a/devel/p4/files/perforce.sh.in b/devel/p4/files/perforce.sh.in index 33398a7a8691..38cdb146e00e 100644 --- a/devel/p4/files/perforce.sh.in +++ b/devel/p4/files/perforce.sh.in @@ -1,14 +1,38 @@ #!/bin/sh +# +# $FreeBSD$ + +p4d=@PREFIX@/sbin/p4d +p4ftpd=@PREFIX@/sbin/p4ftpd + case $1 in - start) - [ -f @PREFIX@/etc/perforce ] && . @PREFIX@/etc/perforce - if [ x$PERFORCE_START = xyes ]; then - echo -n ' perforce' - p4d -r $PERFORCE_ROOT $PERFORCE_OPTIONS +start) + [ -f @PREFIX@/etc/perforce.conf ] && . @PREFIX@/etc/perforce.conf + if [ -x $p4d -a x$PERFORCE_START = xyes ]; then + echo -n ' p4d' + su -fm $PERFORCE_USER -c "$p4d -r $PERFORCE_ROOT $PERFORCE_OPTIONS" fi + if [ -x $p4ftpd -a x$PERFORCE_FTPD_START = xyes ]; then + echo -n ' p4ftpd' + $p4ftpd $PERFORCE_FTPD_OPTIONS + fi + ;; +stop) + [ -f @PREFIX@/etc/perforce.conf ] && . @PREFIX@/etc/perforce.conf + if [ -x $p4ftpd ]; then + killall -u 0 p4ftpd >/dev/null 2>&1 && echo -n ' p4ftpd' + fi + if [ -x $p4d ]; then + killall -u $PERFORCE_USER p4d >/dev/null 2>&1 && echo -n ' p4d' + fi + ;; +restart) + $0 stop + sleep 1 + $0 start ;; - stop) - killall p4d && echo -n ' perforce' +*) + echo "usage: $0 {start|stop|restart}" + exit 64 ;; - *) ;; esac |