Hello community,
here is the log from the commit of package atftp for openSUSE:Factory checked in at 2013-11-15 16:55:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/atftp (Old)
and /work/SRC/openSUSE:Factory/.atftp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "atftp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/atftp/atftp.changes 2013-02-14 20:33:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.atftp.new/atftp.changes 2013-11-15 16:55:56.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Nov 12 20:41:45 UTC 2013 - chris@computersalat.de
+
+- rebase patches (p0)
+- rename atftpd.init.d to atftpd.init
+- fix spec
+ * remove ghost /var/run/atftp (created by init)
+
+-------------------------------------------------------------------
Old:
----
atftpd.init.d
New:
----
atftpd.init
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ atftp.spec ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -28,7 +28,7 @@
Release: 0
Url: ftp://ftp.mamalinux.com/pub/atftp/
Source: %{name}-%{pkg_version}.tar.bz2
-Source1: atftpd.init.d
+Source1: atftpd.init
Source2: atftpd.sysconfig
Source3: atftpd.logrotate
Source4: atftp.fw
@@ -81,11 +81,11 @@
%patch6
%patch7
%patch8
-%patch9 -p1
-%patch10 -p0
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%patch9
+%patch10
+%patch12
+%patch13
+%patch14
%build
autoreconf -fi
@@ -144,6 +144,6 @@
%config %{_fwdefdir}/atftp
%dir %attr(0750,tftp,tftp) /srv/tftpboot
%dir %attr(0750,tftp,tftp) /var/log/atftpd/
-%ghost %dir /var/run/atftpd
+#ghost %dir /var/run/atftpd
%changelog
++++++ atftp-0.7-ack_heuristic.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,7 +1,7 @@
-Index: atftp-0.7/tftpd_file.c
+Index: tftpd_file.c
===================================================================
---- atftp-0.7.orig/tftpd_file.c 2013-02-06 16:15:50.178332917 +0100
-+++ atftp-0.7/tftpd_file.c 2013-02-06 16:16:49.608140471 +0100
+--- tftpd_file.c.orig
++++ tftpd_file.c
@@ -402,7 +402,6 @@ int tftpd_send_file(struct thread_data *
int timeout_state = state;
int result;
++++++ atftp-0.7-default_dir_man.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,7 +1,7 @@
-Index: atftp-0.7/atftpd.8
+Index: atftpd.8
===================================================================
---- atftp-0.7.orig/atftpd.8 2012-11-16 11:50:17.618281568 +0100
-+++ atftp-0.7/atftpd.8 2013-01-03 14:27:00.913280412 +0100
+--- atftpd.8.orig
++++ atftpd.8
@@ -210,7 +210,7 @@ Show summary of options.
.B path
This is the root directory used by the TFTP server. All requested
++++++ atftp-0.7-default_user_man.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,7 +1,7 @@
-Index: atftp-0.7/atftpd.8
+Index: atftpd.8
===================================================================
---- atftp-0.7.orig/atftpd.8 2012-11-16 11:46:18.798067178 +0100
-+++ atftp-0.7/atftpd.8 2012-11-16 11:50:17.618281568 +0100
+--- atftpd.8.orig
++++ atftpd.8
@@ -80,10 +80,10 @@ acknowledging the 'multicast' request by
.TP
++++++ atftp-0.7-server_receive_race.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,8 +1,8 @@
Index: tftpd_file.c
===================================================================
---- tftpd_file.c.orig 2012-08-06 10:26:36.356745154 +0200
-+++ tftpd_file.c 2012-08-06 11:27:59.265571512 +0200
-@@ -113,7 +113,7 @@ int tftpd_receive_file(struct thread_dat
+--- tftpd_file.c.orig
++++ tftpd_file.c
+@@ -114,7 +114,7 @@ int tftpd_receive_file(struct thread_dat
struct sockaddr_in *sa = &data->client_info->client;
struct sockaddr_in from;
struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer;
@@ -11,7 +11,7 @@
char filename[MAXLEN];
char string[MAXLEN];
int timeout = data->timeout;
-@@ -143,18 +143,6 @@ int tftpd_receive_file(struct thread_dat
+@@ -144,18 +144,6 @@ int tftpd_receive_file(struct thread_dat
return ERR;
}
@@ -30,7 +30,7 @@
/* tsize option */
if (((result = opt_get_tsize(data->tftp_options)) > -1) && !convert)
{
-@@ -171,7 +159,6 @@ int tftpd_receive_file(struct thread_dat
+@@ -172,7 +160,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR ", EOPTNEG,
tftp_errmsg[EOPTNEG]);
@@ -38,7 +38,7 @@
return ERR;
}
timeout = result;
-@@ -188,7 +175,6 @@ int tftpd_receive_file(struct thread_dat
+@@ -189,7 +176,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR ", EOPTNEG,
tftp_errmsg[EOPTNEG]);
@@ -46,7 +46,7 @@
return ERR;
}
-@@ -198,7 +184,6 @@ int tftpd_receive_file(struct thread_dat
+@@ -199,7 +185,6 @@ int tftpd_receive_file(struct thread_dat
if (data->data_buffer == NULL)
{
logger(LOG_ERR, "memory allocation failure");
@@ -54,7 +54,7 @@
return ERR;
}
tftphdr = (struct tftphdr *)data->data_buffer;
-@@ -209,7 +194,6 @@ int tftpd_receive_file(struct thread_dat
+@@ -210,7 +195,6 @@ int tftpd_receive_file(struct thread_dat
if (data->trace)
logger(LOG_DEBUG, "sent ERROR ", ENOSPACE,
tftp_errmsg[ENOSPACE]);
@@ -62,7 +62,7 @@
return ERR;
}
opt_set_blksize(result, data->tftp_options);
-@@ -342,6 +326,20 @@ int tftpd_receive_file(struct thread_dat
+@@ -343,6 +327,20 @@ int tftpd_receive_file(struct thread_dat
}
break;
case S_DATA_RECEIVED:
@@ -83,7 +83,7 @@
/* We need to seek to the right place in the file */
block_number = ntohs(tftphdr->th_block);
if (data->trace)
-@@ -369,13 +367,13 @@ int tftpd_receive_file(struct thread_dat
+@@ -370,13 +368,13 @@ int tftpd_receive_file(struct thread_dat
state = S_SEND_ACK;
break;
case S_END:
++++++ atftp-0.7-sorcerers_apprentice.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,6 +1,7 @@
-diff -u atftp-0.7/tftp_file.c atftp-0.7/tftp_file.c
---- atftp-0.7/tftp_file.c 2012-03-27 11:39:59.441167084 +0200
-+++ atftp-0.7/tftp_file.c 2012-09-11 13:55:28.422295562 +0200
+Index: tftp_file.c
+===================================================================
+--- tftp_file.c.orig
++++ tftp_file.c
@@ -49,6 +49,7 @@
#define NB_BLOCK 2048
@@ -9,7 +10,7 @@
/*
* Find a hole in the file bitmap.
-@@ -605,6 +606,7 @@
+@@ -605,6 +606,7 @@ int tftp_send_file(struct client_data *d
int timeout_state = state; /* what state should we go on when timeout */
int result;
long block_number = 0;
@@ -17,7 +18,7 @@
long last_block = -1;
int data_size; /* size of data received */
int sockfd = data->sockfd; /* just to simplify calls */
-@@ -765,6 +767,20 @@
+@@ -765,6 +767,20 @@ int tftp_send_file(struct client_data *d
connected = 1;
}
block_number = ntohs(tftphdr->th_block);
@@ -38,9 +39,10 @@
if (data->trace)
fprintf(stderr, "received ACK \n",
block_number);
-diff -u atftp-0.7/tftpd_file.c atftp-0.7/tftpd_file.c
---- atftp-0.7/tftpd_file.c 2012-03-30 14:02:04.335089843 +0200
-+++ atftp-0.7/tftpd_file.c 2012-09-11 13:55:28.422295562 +0200
+Index: tftpd_file.c
+===================================================================
+--- tftpd_file.c.orig
++++ tftpd_file.c
@@ -55,6 +55,7 @@
extern char directory[MAXLEN];
/* read only except for the main thread */
@@ -49,7 +51,7 @@
#ifdef HAVE_PCRE
extern tftpd_pcre_self_t *pcre_top;
-@@ -403,6 +404,7 @@
+@@ -403,6 +404,7 @@ int tftpd_send_file(struct thread_data *
int timeout_state = state;
int result;
long block_number = 0;
@@ -57,7 +59,7 @@
long last_block = -1;
int block_loops = 0;
int data_size;
-@@ -785,6 +787,10 @@
+@@ -785,6 +787,10 @@ int tftpd_send_file(struct thread_data *
inet_ntoa(client_info->client.sin_addr),
ntohs(client_info->client.sin_port));
sa = &client_info->client;
@@ -68,7 +70,8 @@
state = S_SEND_OACK;
break;
}
-@@ -858,5 +864,31 @@
+@@ -859,6 +865,32 @@ int tftpd_send_file(struct thread_data *
+ {
logger(LOG_DEBUG, "received ACK ", block_number);
}
+
@@ -100,7 +103,7 @@
if (ntohs(tftphdr->th_block) == 65535)
{
block_loops++;
-@@ -958,6 +990,8 @@
+@@ -958,6 +990,8 @@ int tftpd_send_file(struct thread_data *
/* nedd to send an oack to that client */
state = S_SEND_OACK;
fseek(fp, 0, SEEK_SET);
@@ -109,10 +112,10 @@
}
else
{
-only in patch2:
-unchanged:
---- atftp-0.7.orig/tftpd.c 2012-09-11 13:55:28.303292010 +0200
-+++ atftp-0.7/tftpd.c 2012-09-11 13:58:20.701437613 +0200
+Index: tftpd.c
+===================================================================
+--- tftpd.c.orig
++++ tftpd.c
@@ -62,6 +62,7 @@ int retry_timeout = S_TIMEOUT;
int tftpd_daemon = 0; /* By default we are started by inetd */
@@ -147,10 +150,10 @@
" --user : default is nobody\n"
" --group <group> : default is nogroup\n"
" --port <port> : port on which atftp listen\n"
-only in patch2:
-unchanged:
---- atftp-0.7.orig/tftp.c 2012-09-11 13:55:28.255290577 +0200
-+++ atftp-0.7/tftp.c 2012-09-11 14:01:13.437593304 +0200
+Index: tftp.c
+===================================================================
+--- tftp.c.orig
++++ tftp.c
@@ -57,6 +57,7 @@
/* defined as extern in tftp_file.c and mtftp_file.c, set by the signal
handler */
@@ -185,10 +188,10 @@
" --verbose : set verbose mode on\n"
" --trace : set trace mode on\n"
#if DEBUG
-only in patch2:
-unchanged:
---- atftp-0.7.orig/atftpd.8 2004-03-06 21:41:40.000000000 +0100
-+++ atftp-0.7/atftpd.8 2012-09-11 13:55:28.423295591 +0200
+Index: atftpd.8
+===================================================================
+--- atftpd.8.orig
++++ atftpd.8
@@ -180,6 +180,14 @@ implication. Be aware that this option v
option has effect only for non-multicast transfer.
@@ -204,10 +207,10 @@
.B \-\-mcast\-switch\-client
This option allow the server to proceed with the next multicast client
as soon as the current client timeout. When the current master client
-only in patch2:
-unchanged:
---- atftp-0.7.orig/atftp.1 2004-03-06 21:41:40.000000000 +0100
-+++ atftp-0.7/atftp.1 2012-09-11 13:55:28.423295591 +0200
+Index: atftp.1
+===================================================================
+--- atftp.1.orig
++++ atftp.1
@@ -77,6 +77,14 @@ to configure client side port to use.
See atftpd's man page.
++++++ atftp-0.7_bug-213384_OPT_NUMBER.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -6,8 +6,8 @@
Index: options.h
===================================================================
---- options.h.orig 2001-07-07 01:35:18.000000000 +0200
-+++ options.h 2007-01-22 18:27:05.238498611 +0100
+--- options.h.orig
++++ options.h
@@ -27,7 +27,7 @@ struct tftp_opt {
int enabled; /* enabled for use by server or client */
};
@@ -19,8 +19,8 @@
int opt_parse_options(char *data, int data_size, struct tftp_opt *options);
Index: tftp_def.c
===================================================================
---- tftp_def.c.orig 2004-03-06 21:41:41.000000000 +0100
-+++ tftp_def.c 2007-01-22 18:27:05.254499542 +0100
+--- tftp_def.c.orig
++++ tftp_def.c
@@ -30,7 +30,7 @@
*/
@@ -32,8 +32,8 @@
{ "tsize", "0", 0, 1 }, /* RFC1350 options. See RFC2347, */
Index: tftp_def.h
===================================================================
---- tftp_def.h.orig 2004-03-06 21:41:41.000000000 +0100
-+++ tftp_def.h 2007-01-22 18:27:05.274500706 +0100
+--- tftp_def.h.orig
++++ tftp_def.h
@@ -40,7 +40,7 @@
#define OPT_TIMEOUT 3
#define OPT_BLKSIZE 4
++++++ atftp-CLK_TCK.diff ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,6 +1,8 @@
---- stats.c
+Index: stats.c
+===================================================================
+--- stats.c.orig
+++ stats.c
-@@ -142,6 +142,10 @@
+@@ -142,6 +142,10 @@ void stats_thread_usage_locked(void)
pthread_mutex_unlock(&s_stats.mutex);
}
++++++ atftpd-0.7_circumvent_tftp_size_restrictions.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -10,8 +10,8 @@
Index: tftp_def.h
===================================================================
---- tftp_def.h.orig 2008-09-12 16:30:56.092292872 +0200
-+++ tftp_def.h 2008-09-12 16:30:56.160294265 +0200
+--- tftp_def.h.orig
++++ tftp_def.h
@@ -32,6 +32,7 @@
#define TIMEOUT 5 /* Client timeout */
#define S_TIMEOUT 5 /* Server timout. */
@@ -22,8 +22,8 @@
#define OPT_FILENAME 0
Index: tftp_file.c
===================================================================
---- tftp_file.c.orig 2008-09-12 16:30:55.907808154 +0200
-+++ tftp_file.c 2008-09-12 16:31:46.663791666 +0200
+--- tftp_file.c.orig
++++ tftp_file.c
@@ -604,8 +604,8 @@ int tftp_send_file(struct client_data *d
int state = S_SEND_REQ; /* current state in the state machine */
int timeout_state = state; /* what state should we go on when timeout */
@@ -66,8 +66,8 @@
{
Index: tftp_io.c
===================================================================
---- tftp_io.c.orig 2008-09-12 16:30:56.048295391 +0200
-+++ tftp_io.c 2008-09-12 16:30:56.200292051 +0200
+--- tftp_io.c.orig
++++ tftp_io.c
@@ -334,8 +334,8 @@ int tftp_get_packet(int sock1, int sock2
/*
* Read from file and do netascii conversion if needed
@@ -81,8 +81,8 @@
int c;
Index: tftp_io.h
===================================================================
---- tftp_io.h.orig 2004-03-06 21:41:41.000000000 +0100
-+++ tftp_io.h 2008-09-12 16:30:56.240291211 +0200
+--- tftp_io.h.orig
++++ tftp_io.h
@@ -52,8 +52,8 @@ int tftp_send_data(int socket, struct so
int tftp_get_packet(int sock1, int sock2, int *sock, struct sockaddr_in *sa,
struct sockaddr_in *from, struct sockaddr_in *to,
@@ -96,8 +96,8 @@
#endif
Index: tftpd_file.c
===================================================================
---- tftpd_file.c.orig 2004-03-06 21:41:41.000000000 +0100
-+++ tftpd_file.c 2008-09-12 16:30:56.268005211 +0200
+--- tftpd_file.c.orig
++++ tftpd_file.c
@@ -402,8 +402,9 @@ int tftpd_send_file(struct thread_data *
int state = S_BEGIN;
int timeout_state = state;
++++++ atftpd-0.7_unprotected_assignments_crash.patch ++++++
--- /var/tmp/diff_new_pack.HPMZIW/_old 2013-11-15 16:55:57.000000000 +0100
+++ /var/tmp/diff_new_pack.HPMZIW/_new 2013-11-15 16:55:57.000000000 +0100
@@ -1,7 +1,7 @@
Index: tftpd_list.c
===================================================================
---- tftpd_list.c.orig 2007-09-18 18:14:46.182187192 +0200
-+++ tftpd_list.c 2007-09-18 18:19:50.072480431 +0200
+--- tftpd_list.c.orig
++++ tftpd_list.c
@@ -49,11 +49,11 @@ pthread_mutex_t thread_list_mutex = PTHR
*/
int tftpd_list_add(struct thread_data *new)
@@ -115,8 +115,8 @@
{
Index: tftpd_mcast.c
===================================================================
---- tftpd_mcast.c.orig 2004-03-06 21:41:41.000000000 +0100
-+++ tftpd_mcast.c 2007-09-18 18:16:54.705925936 +0200
+--- tftpd_mcast.c.orig
++++ tftpd_mcast.c
@@ -51,9 +51,11 @@ struct tid *tid_list = NULL;
*/
int tftpd_mcast_get_tid(char **addr, short *port)
++++++ atftpd.init ++++++
#! /bin/sh
# Copyright (c) 2002,2003 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Anas Nashif
#
# /etc/init.d/atftpd
# and its symbolic link
# /usr/sbin/rcatftpd
#
### BEGIN INIT INFO
# Provides: atftpd
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: launch atftpd server
# Description: launch Advanced TFTP Server
### END INIT INFO
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num><num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
ATFTP_BIN="/usr/sbin/atftpd"
if [ ! -x $ATFTP_BIN ]; then
echo -n "Advanced Trivial FTP server, $ATFTP_BIN is not installed."
# Tell the user this has skipped
rc_status -s
exit 5
fi
ATFTP_LOG_FILE="/var/log/atftpd/atftp.log"
ATFTP_LOG_DIR="$(dirname ${ATFTP_LOG_FILE})"
ATFTP_PID_DIR="/var/run/atftpd"
# check for sysconfig file
[ -f /etc/sysconfig/atftpd ] && . /etc/sysconfig/atftpd
# Set default in case of missing sysconfig file
ATFTP_USR=${ATFTPD_USER:="tftp"}
ATFTP_GRP=${ATFTPD_GROUP:="tftp"}
ATFTP_OPTS=${ATFTPD_OPTIONS:=""}
ATFTP_USE_INETD=${ATFTPD_USE_INETD:="no"}
ATFTP_DIR=${ATFTPD_DIRECTORY:="/srv/tftpboot"}
ATFTP_BIND=${ATFTP_BIND_ADDRESSES:=""}
# start as daemon with some default opts
ATFTP_DEF_OPTS="--daemon --user $ATFTP_USR --group $ATFTP_GRP --logfile $ATFTP_LOG_FILE"
# create logfile and PID directory if they don't exist
create_logfile_and_piddir(){
# /var/run is mounted as tmpfs on openSUSE >= 11.4
[ ! -d "$ATFTP_PID_DIR" ] && /usr/bin/install -o ${ATFTP_USR} -g ${ATFTP_GRP} -d "$ATFTP_PID_DIR";
# must exist otherwise atftp will log to syslog
[ ! -f "$ATFTP_PID_DIR" ] && /usr/bin/install -m 0644 -o ${ATFTP_USR} -g ${ATFTP_GRP} /dev/null "$ATFTP_LOG_FILE"
}
if [ "$ATFTP_USE_INETD" = "yes" ]; then
echo "ATFTP is set to start via inetd"
exit 0;
fi
case "$1" in
start)
create_logfile_and_piddir
if [ -n "$ATFTP_BIND" ]; then
for IP in $ATFTP_BIND; do
echo -n "Starting Advanced Trivial FTP server on $IP: "
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
startproc -p "${ATFTP_PID_DIR}/$IP.pid" -f $ATFTP_BIN --pidfile "${ATFTP_PID_DIR}/$IP.pid" $ATFTP_DEF_OPTS $ATFTP_OPTS $ATFTP_DIR --bind-address $IP
# Remember status and be verbose
rc_status -v
done
else
echo -n "Starting Advanced Trivial FTP server: "
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
startproc $ATFTP_BIN --pidfile "${ATFTP_PID_DIR}/pid" $ATFTP_DEF_OPTS $ATFTP_OPTS $ATFTP_DIR
# Remember status and be verbose
rc_status -v
fi
;;
stop)
echo -n "Stopping Advanced Trivial FTP server: "
killproc -TERM $ATFTP_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
#echo -n "Reloading Advanced Trivial FTP server: "
## if it supports it:
#/sbin/killproc -HUP $ATFTP_BIN
#touch /var/run/FOO.pid
# Remember status and be verbose
#rc_status -v
## Otherwise:
$0 try-restart
#rc_status
;;
reload)
echo -n "Reloading Advanced Trivial FTP server: "
## Like force-reload, but if daemon does not support
## signaling, do nothing (!)
# If it supports signaling:
#/sbin/killproc -HUP $ATFTP_BIN
#touch /var/run/FOO.pid
# Remember status and be verbose
#rc_status -v
## Otherwise if it does not support reload:
rc_failed 5
# Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for Advanced Trivial FTP server: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
checkproc $ATFTP_BIN
# Remember status and be verbose
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org