Hello community, here is the log from the commit of package smpppd for openSUSE:Factory checked in at Thu May 12 11:08:49 CEST 2011.
-------- --- smpppd/smpppd.changes 2010-08-04 11:04:29.000000000 +0200 +++ /mounts/work_src_done/STABLE/smpppd/smpppd.changes 2011-05-11 15:53:04.000000000 +0200 @@ -1,0 +2,7 @@ +Wed May 11 13:52:45 UTC 2011 - [email protected] + +- daemonize later to catch errors +- mkdir socket dir +- init script cleanup + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- smpppd-1.60.46.tar.bz2 New: ---- smpppd-1.60.50.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smpppd.spec ++++++ --- /var/tmp/diff_new_pack.RvMb9j/_old 2011-05-12 11:03:26.000000000 +0200 +++ /var/tmp/diff_new_pack.RvMb9j/_new 2011-05-12 11:03:26.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package smpppd (Version 1.60.46) +# spec file for package smpppd # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,13 +32,14 @@ Group: Productivity/Networking/PPP Summary: SuSE Meta PPP Daemon Requires: ppp /usr/bin/killall -Version: 1.60.46 +Version: 1.60.50 Release: 1 Source0: smpppd-%version.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq Recommends: wvdial Recommends: pptp +Url: https://gitorious.org/opensuse/smpppd %description The SuSE Meta PPP Daemon is the back-end for kinternet. It is required @@ -114,7 +115,7 @@ %endif %attr (700, root, root) %dir /var/lib/smpppd %attr (750, root, dialout) %dir /var/log/smpppd -%attr (755, root, root) %dir /var/run/smpppd +%ghost %attr (755, root, root) %dir /var/run/smpppd %{_mandir}/man?/* %doc %_defaultdocdir/smpppd ++++++ smpppd-1.60.46.tar.bz2 -> smpppd-1.60.50.tar.bz2 ++++++ ++++ 2027 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/smpppd-1.60.46/misc/rc.smpppd new/smpppd-1.60.50/misc/rc.smpppd --- old/smpppd-1.60.46/misc/rc.smpppd 2009-10-28 10:30:58.000000000 +0100 +++ new/smpppd-1.60.50/misc/rc.smpppd 2011-05-11 15:55:10.000000000 +0200 @@ -1,5 +1,6 @@ #! /bin/sh # Copyright (c) 1995-2002 SuSE Linux AG Nuernberg, Germany. +# Copyright (c) 2011 SUSE Linux Products GmbH Nuernberg, Germany. # # Author: Arvin Schnell <[email protected]> # @@ -15,112 +16,47 @@ # Should-Stop: isdn $named slpd # Default-Start: 2 3 5 # Default-Stop: 0 1 6 -# Description: Start the smpppd for internet dial-up connections. +# Short-Description: SUSE Meta PPP Daemon +# Description: A daemon for managing ppp links ### END INIT INFO SMPPPD_BIN=/usr/sbin/smpppd -test -x $SMPPPD_BIN || exit 5 -# 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 . /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. - case "$1" in start) - echo -n "Starting SMPPPD" - ## Start daemon with startproc(8). If this fails - ## the echo return value is set appropriate. - - # NOTE: startproc return 0, even if service is - # already running to match LSB spec. - startproc $SMPPPD_BIN - - # Remember status and be verbose + echo -n "Starting smpppd ... " + start_daemon $SMPPPD_BIN rc_status -v ;; stop) - echo -n "Shutting down SMPPPD" - ## Stop daemon with killproc(8) and if this fails - ## set echo the echo return value. - + echo -n "Shutting down smpppd ... " killproc -TERM $SMPPPD_BIN - - # Remember status and be verbose rc_status -v ;; try-restart) - ## Stop the service and if this succeeds (i.e. the - ## service was running before), start it again. - ## Note: try-restart is not (yet) part of LSB (as of 0.7.5) $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) - ## Signal the daemon to reload its config. Most daemons - ## do this on signal 1 (SIGHUP). - ## If it does not support it, restart. - echo -n "Reload service SMPPPD" killproc -HUP $SMPPPD_BIN rc_status -v ;; reload) - ## Like force-reload, but if daemon does not support - ## signalling, do nothing (!) - - # If it supports signalling: echo -n "Reload service SMPPPD" killproc -HUP $SMPPPD_BIN rc_status -v ;; status) echo -n "Checking for SMPPPD: " - ## Check status with checkproc(8), if process is running - ## checkproc will return with exit status 0. - - # Status has a 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 $SMPPPD_BIN rc_status -v ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/smpppd-1.60.46/smpppd/defines.h new/smpppd-1.60.50/smpppd/defines.h --- old/smpppd-1.60.46/smpppd/defines.h 2010-03-03 17:10:49.000000000 +0100 +++ new/smpppd-1.60.50/smpppd/defines.h 2011-05-11 15:27:27.000000000 +0200 @@ -55,8 +55,9 @@ #define MAX_ACCOUNTING 2 -#define BACKEND_SOCKET "/var/run/smpppd/" -#define FRONTEND_SOCKET "/var/run/smpppd/control" +#define SOCKET_DIR "/var/run/smpppd" +#define BACKEND_SOCKET SOCKET_DIR "/" +#define FRONTEND_SOCKET SOCKET_DIR "/control" #define FRONTEND_PORT 3185 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/smpppd-1.60.46/smpppd/lists.cc new/smpppd-1.60.50/smpppd/lists.cc --- old/smpppd-1.60.46/smpppd/lists.cc 2009-10-28 10:30:58.000000000 +0100 +++ new/smpppd-1.60.50/smpppd/lists.cc 2011-05-11 15:45:52.000000000 +0200 @@ -26,10 +26,11 @@ entries.clear (); glob_t globbuf; - - if (glob (IFCFG_PATH "ifcfg-{modem,ippp,dsl}*", GLOB_MARK | - GLOB_NOSORT | GLOB_BRACE, 0, &globbuf) != 0) { - fprintf (stderr, "error, glob failed: %m\n"); + int globret = glob (IFCFG_PATH "ifcfg-{modem,ippp,dsl}*", + GLOB_MARK | GLOB_NOSORT | GLOB_BRACE, 0, &globbuf); + if (globret != 0) { + if (globret != GLOB_NOMATCH) + fprintf (stderr, "error, glob failed: %m\n"); return; } @@ -112,10 +113,11 @@ entries.clear (); glob_t globbuf; - - if (glob (PROVIDERS_PATH "*", GLOB_MARK | GLOB_NOSORT, 0, - &globbuf) != 0) { - fprintf (stderr, "error, glob failed: %m\n"); + int globret = glob (PROVIDERS_PATH "*", + GLOB_MARK | GLOB_NOSORT, 0, &globbuf); + if (globret != 0) { + if (globret = GLOB_NOMATCH) + fprintf (stderr, "error, glob failed: %m\n"); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/smpppd-1.60.46/smpppd/smpppd.cc new/smpppd-1.60.50/smpppd/smpppd.cc --- old/smpppd-1.60.46/smpppd/smpppd.cc 2010-08-04 09:43:23.000000000 +0200 +++ new/smpppd-1.60.50/smpppd/smpppd.cc 2011-05-11 15:38:43.000000000 +0200 @@ -1031,6 +1031,11 @@ openlog ("smpppd", LOG_PID, LOG_DAEMON); syslog (LOG_INFO, "smpppd version " VERSION " started"); + if (::mkdir(SOCKET_DIR, 0755) == -1 && errno != EEXIST) { + perror ("mkdir " SOCKET_DIR " failed"); + exit (EXIT_FAILURE); + } + /* create the sockets in the local namespace. */ sockfd1 = make_local_socket (FRONTEND_SOCKET, 0666); @@ -1049,10 +1054,6 @@ mylog.addf (true, "SuSE Meta pppd (smpppd), Version " VERSION " on %s.%s", utsn.nodename, utsn.domainname); - /* detach. */ - if (detach) - daemon (0, 0); - /* register at slp daemon. */ if (myconfig.open_inet_socket && myconfig.slp_register) { string tmp = string (utsn.nodename) + "." + string (utsn.domainname); @@ -1070,6 +1071,12 @@ restate_fd = install_dnotify (SYSCONFIG_STATUS_PATH); relog_fd = install_dnotify (SYSCONFIG_LOG_PATH); + /* detach. */ + if (detach && daemon (0, 0) == -1) { + perror("failed to daemonize"); + exit(EXIT_FAILURE); + } + /* loop forever. */ loop (); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
