View | Details | Raw Unified | Return to bug 265963 | Differences between
and this patch

Collapse All | Expand All

(-)b/sysutils/nut-devel/Makefile (-1 / +2 lines)
Lines 1-6 Link Here
1
PORTNAME=	nut
1
PORTNAME=	nut
2
PORTVERSION=	${NUT_COMMIT_DATE}
2
PORTVERSION=	${NUT_COMMIT_DATE}
3
PORTREVISION=	1
3
PORTREVISION=	2
4
CATEGORIES=	sysutils
4
CATEGORIES=	sysutils
5
PKGNAMESUFFIX=	-devel
5
PKGNAMESUFFIX=	-devel
6
# MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
6
# MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
Lines 164-169 post-install: Link Here
164
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
164
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
165
	${INSTALL_DATA} ${PATCHDIR}/nut.syslog ${STAGEDIR}${EXAMPLESDIR}/syslog.sample
165
	${INSTALL_DATA} ${PATCHDIR}/nut.syslog ${STAGEDIR}${EXAMPLESDIR}/syslog.sample
166
	${INSTALL_DATA} ${PATCHDIR}/nut.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample
166
	${INSTALL_DATA} ${PATCHDIR}/nut.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample
167
	${INSTALL_DATA} ${PATCHDIR}/nut_upslog.sample ${STAGEDIR}${EXAMPLESDIR}/nut_upslog.sample
167
	${MKDIR} ${STAGEDIR}/var/log/nut
168
	${MKDIR} ${STAGEDIR}/var/log/nut
168
169
169
.include <bsd.port.post.mk>
170
.include <bsd.port.post.mk>
(-)b/sysutils/nut-devel/files/nut_upslog.sample (+52 lines)
Added Link Here
1
#!/bin/sh
2
3
# Authored by vvd@unislabs.com.
4
5
# PROVIDE: nut_upslog
6
# REQUIRE: NETWORKING nut
7
# BEFORE: LOGIN
8
# KEYWORD: shutdown
9
10
. /etc/rc.subr
11
12
case $0 in
13
/etc/rc*)
14
	# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
15
	# so get the name of the script from $_file
16
	name=$_file
17
	;;
18
*)
19
	name=$0
20
	;;
21
esac
22
23
name=${name##*/}
24
rcvar=${name}_enable
25
26
load_rc_config "${name}"
27
28
# Define these nut_upslog* variables in one of these files:
29
#       /etc/rc.conf
30
#       /etc/rc.conf.local
31
#       /etc/rc.conf.d/nut_upslog
32
#
33
# If you want to log several different UPSes:
34
# ln -s nut_upslog /usr/local/etc/rc.d/NAME
35
# then set variables NAME_enable, NAME_ups, NAME_pidbase, NAME_logfile and etc.
36
#
37
# DO NOT CHANGE THESE DEFAULT VALUES HERE
38
#
39
eval "${rcvar}=\${${rcvar}:-'NO'}"
40
eval "_prefix=\${${name}_prefix:-'/usr/local'}"
41
eval "_logfile=\${${name}_logfile:-'/var/log/nut/ups.log'}"
42
eval "_interval=\${${name}_interval:-'300'}"
43
eval "_ups=\${${name}_ups:-'myups@localhost'}"
44
eval "_pidbase=\${${name}_pidbase:-'upslog'}"
45
eval "_format=\${${name}_format:+-f \${${name}_format}}"
46
eval "${name}_flags=\${${name}_flags:-'-s ${_ups} -l ${_logfile} -i ${_interval} -p ${_pidbase} ${_format}'}"
47
48
required_dirs="%%STATEDIR%%"
49
pidfile="%%STATEDIR%%/${_pidbase}.pid"
50
command="${_prefix}/bin/upslog"
51
52
run_rc_command "$1"
(-)b/sysutils/nut-devel/pkg-plist (+1 lines)
Lines 18-23 Link Here
18
@sample %%ETCDIR%%/upsmon.conf.sample
18
@sample %%ETCDIR%%/upsmon.conf.sample
19
@sample %%ETCDIR%%/upssched.conf.sample
19
@sample %%ETCDIR%%/upssched.conf.sample
20
@sample %%EXAMPLESDIR%%/newsyslog.sample etc/newsyslog.conf.d/nut.conf
20
@sample %%EXAMPLESDIR%%/newsyslog.sample etc/newsyslog.conf.d/nut.conf
21
@sample %%EXAMPLESDIR%%/nut_upslog.sample
21
@sample %%EXAMPLESDIR%%/syslog.sample etc/syslog.d/nut
22
@sample %%EXAMPLESDIR%%/syslog.sample etc/syslog.d/nut
22
%%USB%%etc/devd/nut-usb.conf
23
%%USB%%etc/devd/nut-usb.conf
23
bin/nut-scanner
24
bin/nut-scanner
(-)b/sysutils/nut/Makefile (-1 / +2 lines)
Lines 1-6 Link Here
1
PORTNAME=	nut
1
PORTNAME=	nut
2
PORTVERSION=	2.8.0
2
PORTVERSION=	2.8.0
3
PORTREVISION=	7
3
PORTREVISION=	8
4
CATEGORIES=	sysutils
4
CATEGORIES=	sysutils
5
MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
5
MASTER_SITES=	http://www.networkupstools.org/source/${PORTVERSION:R}/
6
6
Lines 142-147 post-install: Link Here
142
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
142
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
143
	${INSTALL_DATA} ${PATCHDIR}/nut.syslog ${STAGEDIR}${EXAMPLESDIR}/syslog.sample
143
	${INSTALL_DATA} ${PATCHDIR}/nut.syslog ${STAGEDIR}${EXAMPLESDIR}/syslog.sample
144
	${INSTALL_DATA} ${PATCHDIR}/nut.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample
144
	${INSTALL_DATA} ${PATCHDIR}/nut.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample
145
	${INSTALL_DATA} ${PATCHDIR}/nut_upslog.sample ${STAGEDIR}${EXAMPLESDIR}/nut_upslog.sample
145
	${MKDIR} ${STAGEDIR}/var/log/nut
146
	${MKDIR} ${STAGEDIR}/var/log/nut
146
	@${RM} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init/nut
147
	@${RM} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init/nut
147
	@${RMDIR} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init
148
	@${RMDIR} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init
(-)b/sysutils/nut/files/nut_upslog.sample (+52 lines)
Added Link Here
1
#!/bin/sh
2
3
# Authored by vvd@unislabs.com.
4
5
# PROVIDE: nut_upslog
6
# REQUIRE: NETWORKING nut
7
# BEFORE: LOGIN
8
# KEYWORD: shutdown
9
10
. /etc/rc.subr
11
12
case $0 in
13
/etc/rc*)
14
	# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
15
	# so get the name of the script from $_file
16
	name=$_file
17
	;;
18
*)
19
	name=$0
20
	;;
21
esac
22
23
name=${name##*/}
24
rcvar=${name}_enable
25
26
load_rc_config "${name}"
27
28
# Define these nut_upslog* variables in one of these files:
29
#       /etc/rc.conf
30
#       /etc/rc.conf.local
31
#       /etc/rc.conf.d/nut_upslog
32
#
33
# If you want to log several different UPSes:
34
# ln -s nut_upslog /usr/local/etc/rc.d/NAME
35
# then set variables NAME_enable, NAME_ups, NAME_pidbase, NAME_logfile and etc.
36
#
37
# DO NOT CHANGE THESE DEFAULT VALUES HERE
38
#
39
eval "${rcvar}=\${${rcvar}:-'NO'}"
40
eval "_prefix=\${${name}_prefix:-'/usr/local'}"
41
eval "_logfile=\${${name}_logfile:-'/var/log/nut/ups.log'}"
42
eval "_interval=\${${name}_interval:-'300'}"
43
eval "_ups=\${${name}_ups:-'myups@localhost'}"
44
eval "_pidbase=\${${name}_pidbase:-'upslog'}"
45
eval "_format=\${${name}_format:+-f \${${name}_format}}"
46
eval "${name}_flags=\${${name}_flags:-'-s ${_ups} -l ${_logfile} -i ${_interval} -p ${_pidbase} ${_format}'}"
47
48
required_dirs="%%STATEDIR%%"
49
pidfile="%%STATEDIR%%/${_pidbase}.pid"
50
command="${_prefix}/bin/upslog"
51
52
run_rc_command "$1"
(-)b/sysutils/nut/pkg-plist (-1 / +1 lines)
Lines 18-23 Link Here
18
@sample %%ETCDIR%%/upsmon.conf.sample
18
@sample %%ETCDIR%%/upsmon.conf.sample
19
@sample %%ETCDIR%%/upssched.conf.sample
19
@sample %%ETCDIR%%/upssched.conf.sample
20
@sample %%EXAMPLESDIR%%/newsyslog.sample etc/newsyslog.conf.d/nut.conf
20
@sample %%EXAMPLESDIR%%/newsyslog.sample etc/newsyslog.conf.d/nut.conf
21
@sample %%EXAMPLESDIR%%/nut_upslog.sample
21
@sample %%EXAMPLESDIR%%/syslog.sample etc/syslog.d/nut
22
@sample %%EXAMPLESDIR%%/syslog.sample etc/syslog.d/nut
22
%%USB%%etc/devd/nut-usb.conf
23
%%USB%%etc/devd/nut-usb.conf
23
bin/nut-scanner
24
bin/nut-scanner
24
- 

Return to bug 265963