SHA256
1
0
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:
Petr Uzel 2010-11-04 15:09:00 +00:00 committed by Git OBS Bridge
parent cd92f7e967
commit 46ac71e05c
3 changed files with 29 additions and 21 deletions

View File

@ -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 Wed Oct 13 21:28:56 UTC 2010 - chris@computersalat.de

View File

@ -83,19 +83,19 @@ autoreconf -fi
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/atftpd %{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/atftpd
%{__ln_s} -f ../../etc/init.d/atftpd %{buildroot}%{_sbindir}/rcatftpd %{__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:2} %{buildroot}/var/adm/fillup-templates/sysconfig.atftpd
%{__install} -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} %{__install} -D -m 0644 %{S:3} %{buildroot}/etc/logrotate.d/%{name}
%{__install} -Dd -m 0750 $RPM_BUILD_ROOT/var/log/atftpd %{__install} -d -m 0750 %{buildroot}/srv/tftpboot
%{__install} -d -m 0750 %{buildroot}/var/log/atftpd
%pre %pre
# This group/user is shared with tftp, so please # This group/user is shared with tftp, so please
# keep this in sync with tftp.spec # keep this in sync with tftp.spec
if [ -z "$(%{_bindir}/getent group tftp 2>/dev/null)" ]; then # add group
%{_sbindir}/groupadd -r tftp 2>/dev/null %{_sbindir}/groupadd -r tftp 2>/dev/null || :
fi # add user
if [ -z "$(%{_bindir}/getent passwd tftp 2>/dev/null)" ]; then %{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \ -r -s /bin/false tftp 2>/dev/null || :
-r -s /bin/false tftp 2>/dev/null # fix sysconfig to get new defaults on Update
fi
if [ -f /etc/sysconfig/atftpd ]; then if [ -f /etc/sysconfig/atftpd ]; then
%{__sed} -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" /etc/sysconfig/atftpd %{__sed} -i -e "s@^\(ATFTPD_OPTIONS=\"--daemon \"\)@#\1@" /etc/sysconfig/atftpd
%{__sed} -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" /etc/sysconfig/atftpd %{__sed} -i -e "s@^\(ATFTPD_DIRECTORY=\"/tftpboot\"\)@#\1@" /etc/sysconfig/atftpd
@ -105,11 +105,6 @@ fi
%stop_on_removal atftpd %stop_on_removal atftpd
%post %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} %{fillup_only -n atftpd}
%postun %postun
@ -132,6 +127,7 @@ fi
%{_mandir}/man1/atftp.1.gz %{_mandir}/man1/atftp.1.gz
%{_mandir}/man8/atftpd.8.gz %{_mandir}/man8/atftpd.8.gz
%{_mandir}/man8/in.tftpd.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 %changelog

View File

@ -1,18 +1,18 @@
## Path: Network/FTP/Atftpd ## Path: Network/FTP/Atftpd
## Description: ATFTP Configuration ## Description: ATFTP Configuration
## Type: string ## Type: string
## Default: "" ## Default: "tftp"
# #
# daemon user (tftp) # daemon user (tftp)
# #
ATFTPD_USER="" ATFTPD_USER="tftp"
## Type: string ## Type: string
## Default: "" ## Default: "tftp"
# #
# daemon user (tftp) # daemon user (tftp)
# #
ATFTPD_GROUP="" ATFTPD_GROUP="tftp"
## Type: string ## Type: string
## Default: "" ## Default: ""
@ -32,7 +32,7 @@ ATFTPD_OPTIONS=""
# #
# Use inetd instead of daemon # Use inetd instead of daemon
# #
ATFTPD_USE_INETD="" ATFTPD_USE_INETD="no"
## Type: string ## Type: string
## Default: "/srv/tftpboot" ## Default: "/srv/tftpboot"
@ -42,7 +42,7 @@ ATFTPD_USE_INETD=""
# TFTP directory must be a world readable/writable directory. # TFTP directory must be a world readable/writable directory.
# By default /srv/tftpboot is assumed. # By default /srv/tftpboot is assumed.
# #
ATFTPD_DIRECTORY="" ATFTPD_DIRECTORY="/srv/tftpboot"
## Type: string ## Type: string
## Default: "" ## Default: ""