~ubuntu-branches/debian/squeeze/ntp/squeeze

« back to all changes in this revision

Viewing changes to ntpd/cmd_args.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-05-24 11:09:51 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524110951-1o7gh469ygochf4n
Tags: 1:4.2.6.p1+dfsg-1
* New upstream version
  - They no longer ship arlib, adjust dfsg.patch.
  - Drop kfreebsd.patch, applied upstream
  - Update patches for upstream changes.
* Remove the obsolete config files:

  for ntp:
  - /etc/logcheck/ignore.d.server/ntp, removed in 1:4.2.6+dfsg-1
  - /etc/dhcp3/dhclient-enter-hooks.d/ntp, replaced by exit hooks in
    1:4.2.4p4+dfsg-3
  - /etc/network/if-up.d/ntp, removed in 1:4.2.4p0+dfsg-1

  for ntpdate:
  - /etc/dhcp3/dhclient-enter-hooks.d/ntpdate, replaced by exit hooks in
    1:4.2.4p4+dfsg-3

  Use dpkg 1.15.7.2's dpkg-maintscript-helper.  This needs
  a Pre-Depends to work, else it's never going to be removed.
  (Closes: #569530)
* Add "Depends: ${misc:Depends}" to ntp-doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 */
17
17
extern char const *progname;
18
18
extern const char *specific_interface;
19
 
extern short default_ai_family;
20
19
 
21
20
#ifdef HAVE_NETINFO
22
21
extern int      check_netinfo;
41
40
         */
42
41
        errflg = 0;
43
42
 
44
 
        if (HAVE_OPT( IPV4 ))
45
 
                default_ai_family = AF_INET;
46
 
        else if (HAVE_OPT( IPV6 ))
47
 
                default_ai_family = AF_INET6;
 
43
        if (ipv4_works && ipv6_works) {
 
44
                if (HAVE_OPT( IPV4 ))
 
45
                        ipv6_works = 0;
 
46
                else if (HAVE_OPT( IPV6 ))
 
47
                        ipv4_works = 0;
 
48
        } else if (!ipv4_works && !ipv6_works) {
 
49
                msyslog(LOG_ERR, "Neither IPv4 nor IPv6 networking detected, fatal.");
 
50
                exit(1);
 
51
        } else if (HAVE_OPT( IPV4 ) && !ipv4_works)
 
52
                msyslog(LOG_WARNING, "-4/--ipv4 ignored, IPv4 networking not found.");
 
53
        else if (HAVE_OPT( IPV6 ) && !ipv6_works)
 
54
                msyslog(LOG_WARNING, "-6/--ipv6 ignored, IPv6 networking not found.");
48
55
 
49
56
        if (HAVE_OPT( AUTHREQ ))
50
57
                proto_config(PROTO_AUTHENTICATE, 1, 0., NULL);