chiark / gitweb /
clean up for distribution
authorlennart <lennart@bf9bc1cc-28ce-0310-abfb-9041aa761afb>
Sat, 19 Nov 2005 19:05:05 +0000 (19:05 +0000)
committerlennart <lennart@bf9bc1cc-28ce-0310-abfb-9041aa761afb>
Sat, 19 Nov 2005 19:05:05 +0000 (19:05 +0000)
git-svn-id: svn+ssh://rootserver/home/lennart/svn/private/projects/nss-myhostname@85 bf9bc1cc-28ce-0310-abfb-9041aa761afb

Makefile
README [new file with mode: 0644]
nss-myhostname.c

index 6b129dfc9b78f3c1b590efbd7387def0c35c1e42..9a528a17e99b15fc93c44eea09f2ea4e5bab606a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
+# $Id$
+
 CFLAGS=-Wall -pipe -W -O2 -Wextra -Wno-unused-parameter
 CFLAGS=-Wall -pipe -W -O2 -Wextra -Wno-unused-parameter
+VERSION=0.1
 
 libnss_myhostname.so.2: nss-myhostname.o
        $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,$@ $^
 
 libnss_myhostname.so.2: nss-myhostname.o
        $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,$@ $^
@@ -10,4 +13,13 @@ install:
 clean:
        rm -f *.o *~ libnss_myhostname.so.2
 
 clean:
        rm -f *.o *~ libnss_myhostname.so.2
 
-.PHONY: clean  
+nss-myhostname.tar.gz:
+       rm -rf "nss-myhostname-$(VERSION)"
+       mkdir "nss-myhostname-$(VERSION)"
+       cp Makefile README *.c "nss-myhostname-$(VERSION)"/
+       tar czf "nss-myhostname-$(VERSION).tar.gz" "nss-myhostname-$(VERSION)"/
+       rm -rf "nss-myhostname-$(VERSION)"
+
+tar: nss-myhostname.tar.gz
+
+.PHONY: clean install tar
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..205118d
--- /dev/null
+++ b/README
@@ -0,0 +1,17 @@
+nss-myhostname is a GNU libc NSS module that statically translates the
+local host name to the IP address 127.0.0.2 (which is on the loopback
+device) and vice versa.
+
+This is useful to make sure that the local host name is always
+resolvable. Some programs (such as sudo) require this functionality. 
+
+Especially on embedded systems it may not be desirable to modify
+/etc/hosts to match the current host name. 
+
+It is a good idea to put this module as last resort in
+/etc/nsswitch.conf, to make sure that other name service take
+precedence.
+
+-- Lennart Poettering, lennart [at] poettering [dot] de
+
+$Id$
index 22eddd8f2a8f78e80857b8d62fd407ad5c73d015..b8a81ef55859eda5e4e8f29ed61a61218baaa9e6 100644 (file)
@@ -1,3 +1,5 @@
+/* $Id$ */
+
 /*
  * This file is part of nss-myhostname.
  *
 /*
  * This file is part of nss-myhostname.
  *