forked from pool/atftp
Accepting request 51679 from home:computersalat:branches:network
Looks fine. Thanks OBS-URL: https://build.opensuse.org/request/show/51679 OBS-URL: https://build.opensuse.org/package/show/network/atftp?expand=0&rev=6
This commit is contained in:
parent
cd92f7e967
commit
46ac71e05c
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 29 23:18:57 UTC 2010 - chris@computersalat.de
|
||||
|
||||
- cleanup spec
|
||||
o RPM_BUILD_ROOT vs buildroot
|
||||
- fix pre
|
||||
o no check before addding group/user (darix)
|
||||
- fix files
|
||||
o provide /srv/tftpboot
|
||||
- modify sysconfig
|
||||
o provide defaults (darix)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 13 21:28:56 UTC 2010 - chris@computersalat.de
|
||||
|
||||
|
26
atftp.spec
26
atftp.spec
@ -83,19 +83,19 @@ autoreconf -fi
|
||||
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/atftpd
|
||||
%{__ln_s} -f ../../etc/init.d/atftpd %{buildroot}%{_sbindir}/rcatftpd
|
||||
%{__install} -D -m 0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.atftpd
|
||||
%{__install} -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
|
||||
%{__install} -Dd -m 0750 $RPM_BUILD_ROOT/var/log/atftpd
|
||||
%{__install} -D -m 0644 %{S:3} %{buildroot}/etc/logrotate.d/%{name}
|
||||
%{__install} -d -m 0750 %{buildroot}/srv/tftpboot
|
||||
%{__install} -d -m 0750 %{buildroot}/var/log/atftpd
|
||||
|
||||
%pre
|
||||
# This group/user is shared with tftp, so please
|
||||
# keep this in sync with tftp.spec
|
||||
if [ -z "$(%{_bindir}/getent group tftp 2>/dev/null)" ]; then
|
||||
%{_sbindir}/groupadd -r tftp 2>/dev/null
|
||||
fi
|
||||
if [ -z "$(%{_bindir}/getent passwd tftp 2>/dev/null)" ]; then
|
||||
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
|
||||
-r -s /bin/false tftp 2>/dev/null
|
||||
fi
|
||||
# add group
|
||||
%{_sbindir}/groupadd -r tftp 2>/dev/null || :
|
||||
# add user
|
||||
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
|
||||
-r -s /bin/false tftp 2>/dev/null || :
|
||||
# fix sysconfig to get new defaults on Update
|
||||
if [ -f /etc/sysconfig/atftpd ]; then
|
||||
%{__sed} -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" /etc/sysconfig/atftpd
|
||||
%{__sed} -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" /etc/sysconfig/atftpd
|
||||
@ -105,11 +105,6 @@ fi
|
||||
%stop_on_removal atftpd
|
||||
|
||||
%post
|
||||
# /srv/tftpboot is used by tftp as well
|
||||
# hence added via post :)
|
||||
if [ ! -d /srv/tftpboot ]; then
|
||||
%{__install} -d -m0750 -o root -g tftp /srv/tftpboot
|
||||
fi
|
||||
%{fillup_only -n atftpd}
|
||||
|
||||
%postun
|
||||
@ -132,6 +127,7 @@ fi
|
||||
%{_mandir}/man1/atftp.1.gz
|
||||
%{_mandir}/man8/atftpd.8.gz
|
||||
%{_mandir}/man8/in.tftpd.8.gz
|
||||
%dir %attr(-,tftp,root) /var/log/atftpd/
|
||||
%dir %attr(0750,root,tftp) /srv/tftpboot
|
||||
%dir %attr(0750,tftp,root) /var/log/atftpd/
|
||||
|
||||
%changelog
|
||||
|
@ -1,18 +1,18 @@
|
||||
## Path: Network/FTP/Atftpd
|
||||
## Description: ATFTP Configuration
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## Default: "tftp"
|
||||
#
|
||||
# daemon user (tftp)
|
||||
#
|
||||
ATFTPD_USER=""
|
||||
ATFTPD_USER="tftp"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## Default: "tftp"
|
||||
#
|
||||
# daemon user (tftp)
|
||||
#
|
||||
ATFTPD_GROUP=""
|
||||
ATFTPD_GROUP="tftp"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
@ -32,7 +32,7 @@ ATFTPD_OPTIONS=""
|
||||
#
|
||||
# Use inetd instead of daemon
|
||||
#
|
||||
ATFTPD_USE_INETD=""
|
||||
ATFTPD_USE_INETD="no"
|
||||
|
||||
## Type: string
|
||||
## Default: "/srv/tftpboot"
|
||||
@ -42,7 +42,7 @@ ATFTPD_USE_INETD=""
|
||||
# TFTP directory must be a world readable/writable directory.
|
||||
# By default /srv/tftpboot is assumed.
|
||||
#
|
||||
ATFTPD_DIRECTORY=""
|
||||
ATFTPD_DIRECTORY="/srv/tftpboot"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
|
Loading…
Reference in New Issue
Block a user