Bryan O'Sullivan avatar Bryan O'Sullivan committed 9b7bc56

Reconstruct Mercurial 1.2.9 from an old snapshot.

Yes, I lost the original repo.

Comments (0)

Files changed (6)

 	-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
 
 netplugd: config.o netlink.o lib.o if_info.o main.o
-	$(CC) -o $@ $^
+	$(CC) $(LDFLAGS) -o $@ $^
 
 install:
 	install -d $(install_opts) -m 755 $(bindir) $(etcdir) $(scriptdir) \
 hg_root := $(shell hg root)
 tar_root := netplug-$(version)
 tar_file := $(hg_root)/$(tar_root).tar.bz2
-files := $(shell hg locate '')
+files := $(shell hg manifest)
 
 tarball: $(tar_file)
 
 $(tar_file): $(files)
-	hg archive -X '.hg*' -t tbz2 $(tar_file)
-
-.FORCE: rpm
-
-rpm: $(tar_file)
-	mkdir -p rpm/{BUILD,RPMS/{i386,x86_64},SOURCES,SPECS,SRPMS}
-	rpmbuild --define '_topdir $(shell pwd)/rpm' -ta $(tar_file)
-	mv rpm/*/*.rpm rpm
-	mv rpm/*/*/*.rpm rpm
-	rm -rf rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
-
-fedora: $(tar_file)
-	rpmbuild --define 'release 0.fdr.1' -ta $(tar_file)
+	mkdir -p $(hg_root)/$(tar_root)
+	echo $(files) | tr ' ' '\n' | \
+	  xargs -i cp -a --parents {} $(hg_root)/$(tar_root)
+	tar -C $(hg_root) -c -f - $(tar_root) | bzip2 -9 > $(tar_file)
+	rm -rf $(hg_root)/$(tar_root)
 
 clean:
 	-rm -f netplugd *.o *.tar.bz2
+Changes from 1.2.8 to 1.2.9
+
+* Numerous minor, but long-delayed, documentation and build changes.
+
+* Removed balky code from RPM spec file that attempted to modify
+  network interface configurations.
+
+Changes from 1.2.7 to 1.2.8
+
+* Fixed longstanding bug in writing out pid file.
+
+* Synced with downstream changes from Fedora Core 3.
 fix bugs, add documentation, and so on, are all welcome, as are
 suggestions for improvements.
 
-If you use the Mercurial distributed SCM, you can generate patches
-against http://hg.serpentine.com/netplug/netplug which is the main
-netplug repository.  Otherwise, "diff -u" style patches are fine.
+If you use BitKeeper, you can generate patches against
+http://laptop.bkbits.net/netplug which is the main netplug
+repository.  Otherwise, "diff -u" style patches are fine.
 
 
 Contact
 
 #include "netplug.h"
 
-/* Support old kernels without wireless */
-#ifndef IFLA_WIRELESS
-#define IFLA_WIRELESS (IFLA_MASTER + 1)
-#endif /* IFLA_WIRELESS */
 
 int use_syslog;
 static char *pid_file;
 
     parse_rtattrs(attrs, IFLA_MAX, IFLA_RTA(info), len);
 
-    /* Ignore wireless messages */
-    if (attrs[IFLA_WIRELESS] != NULL
-		    && hdr->nlmsg_type == RTM_NEWLINK
-		    && info->ifi_change == 0) {
-	    do_log(LOG_DEBUG, "Ignoring wireless netlink message");
-	    return 0;
-    }	    
-
     if (attrs[IFLA_IFNAME] == NULL) {
         do_log(LOG_ERR, "No interface name");
         return -1;
     char *name = RTA_DATA(attrs[IFLA_IFNAME]);
 
     if (!if_match(name)) {
-        do_log(LOG_DEBUG, "%s: ignoring event", name);
+        do_log(LOG_INFO, "%s: ignoring event", name);
         return 0;
     }
 

man/man8/netplugd.8

 .\"
 .It Fl c Ar config_file
 Specify the name of a file from which to read patterns that describe
-the interfaces to manage.  The config file format is one pattern per
-line, with white space, empty lines, and comments starting with a
-.Li #
-character ignored.  You can provide this option multiple times to read
+the interfaces to manage.  You can provide this option multiple times to read
 from more than one file.  If you do not provide this option at all,
 .Nm
 will attempt to read from a default config file.  If you do not want
 .Bl -tag -width Ds
 .It Pa /etc/netplug/netplugd.conf
 Default config file to read, if none is specified on the command line.
+The config file format is one pattern per line, with white space,
+empty lines, and comments starting with a
+.Li #
+character ignored.  Patterns are standard shell-style glob patterns,
+e.g. "eth[0-9]".
 .\"
 .It Pa /etc/netplug.d/netplug
 The "policy" program (typically a shell script) that
-%define version 1.2.8
+%define version 1.2.9
 %define release 1
 %define sysconfig %{_sysconfdir}/sysconfig/network-scripts
 
 /sbin/netplugd
 %{_mandir}/man*/*
 
-%doc COPYING ChangeLog README TODO
+%doc COPYING ChangeLog NEWS README TODO
 
 %post
 /sbin/chkconfig --add netplugd
 
-for cfg in %{sysconfig}/ifcfg-eth*; do
-    if echo "$cfg" | grep -q pre-netplug; then
-	continue
-    fi
-    if [ -f "$cfg.pre-netplug" ]; then
-	continue
-    fi
-    sed -e 's/^ONBOOT=yes/ONBOOT=no/' "$cfg" > "$cfg.new.$$"
-    if cmp -s "$cfg" "$cfg.new.$$"; then
-	true
-    else
-	cp "$cfg" "$cfg.pre-netplug"
-	cp "$cfg.new.$$" "$cfg"
-	ifname=`echo "$cfg" | sed 's!^.*/ifcfg-\(.*\)$!\1!'`
-	echo "Updated $ifname to be managed by netplug"
-    fi
-    rm "$cfg.new.$$"
-done
-
 %preun
 /sbin/chkconfig --del netplugd
 
-%postun
-for precfg in %{sysconfig}/*.pre-netplug; do
-    if [ ! -f "$precfg" ]; then
-	continue
-    fi
-    cfg=`echo "$precfg" | sed -e 's!\.pre-netplug$!!'`
-    sed -e 's/^ONBOOT=no/ONBOOT=yes/' "$cfg" > "$cfg.new.$$"
-    if cmp -s "$cfg" "$cfg.new.$$"; then
-	true
-    else
-	cp "$cfg.new.$$" "$cfg"
-        ifname=`echo "$cfg" | sed -e 's!^.*/ifcfg-\(.*\)$!\1!'`
-	echo "Restored $ifname to be brought up at boot time"
-    fi
-    rm "$cfg.new.$$" "$cfg.pre-netplug"
-done
-
 %changelog
 * Tue Aug 26 2003 Bryan O'Sullivan <bos@serpentine.com> - 
 - Initial build.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.