nfd: New package
diff --git a/nfd/debian/nfd.preinst b/nfd/debian/nfd.preinst
new file mode 100644
index 0000000..37f4d91
--- /dev/null
+++ b/nfd/debian/nfd.preinst
@@ -0,0 +1,61 @@
+#!/bin/sh
+# preinst script for nfd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+        # Now we have to ensure the following state:
+        # /etc/passwd: ndn:x:YYY:ZZZ:NDN User:/nonexistent:/bin/false
+        # /etc/group:  ndn:x:ZZZ:
+        #
+        # Sadly there could any state be present on the system so we have to
+        # modify everything carefully i.e. not doing a chown before creating
+        # the user etc...
+
+        # creating ndn group if he isn't already there
+        if ! getent group ndn >/dev/null; then
+                # Adding system group: ndn.
+                addgroup --system ndn >/dev/null
+        fi
+
+        # creating ndn user if he isn't already there
+        if ! getent passwd ndn >/dev/null; then
+                # Adding system user: ndn.
+                adduser \
+                  --system \
+                  --disabled-login \
+                  --ingroup ndn \
+                  --home /nonexistent \
+                  --gecos "NDN User" \
+                  --shell /bin/false \
+                  ndn  >/dev/null
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
\ No newline at end of file