# Add a conf.d/ directory.
# Closes: #764043

diff --git a/Makefile b/Makefile
index c7a3226..dfe96fa 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,8 @@ install: all
 	mkdir -p "$(DESTDIR)/etc/needrestart/hook.d"
 	cp hooks/* "$(DESTDIR)/etc/needrestart/hook.d/"
 	cp ex/needrestart.conf "$(DESTDIR)/etc/needrestart/"
+	mkdir -p "$(DESTDIR)/etc/needrestart/conf.d"
+	cp ex/conf.d/* "$(DESTDIR)/etc/needrestart/conf.d/"
 	
 	which apt-get > /dev/null && \
 	    mkdir -p "$(DESTDIR)/etc/apt/apt.conf.d" && cp ex/apt/needrestart-apt_d "$(DESTDIR)/etc/apt/apt.conf.d/99needrestart" && \
diff --git a/ex/conf.d/README.needrestart b/ex/conf.d/README.needrestart
new file mode 100644
index 0000000..5a1649c
--- /dev/null
+++ b/ex/conf.d/README.needrestart
@@ -0,0 +1,5 @@
+Files ending with .conf and located in the /etc/needrestart/conf.d
+directory are parsed by needrestart's default configuration file.
+
+Files are parsed in order (using Perl's sort sub) and override or
+modify any previously set config option.
diff --git a/ex/needrestart.conf b/ex/needrestart.conf
index c34fa1e..2b6a790 100644
--- a/ex/needrestart.conf
+++ b/ex/needrestart.conf
@@ -87,5 +87,11 @@ $nrconf{blacklist_rc} = [
 # Disable hints on pending kernel upgrades.
 #$nrconf{kernelhints} = 0
 
-# REQUIRED
-1;
+# Read additional config snippets.
+if(-d q(/etc/needrestart/conf.d)) {
+      foreach my $fn (sort </etc/needrestart/conf.d/*.conf>) {
+	      print STDERR "$LOGPREF eval $fn\n" if($nrconf{verbose});
+	      eval do { local(@ARGV, $/) = $fn; <>};
+	      die "Error parsing $fn: $@" if($@);
+      }
+}
-- 
2.1.1

