Index: general/genlib/libpaper.xml
===================================================================
--- general/genlib/libpaper.xml (revision cf694de054236a4832c69aa4337bd5f8c1220a21)
+++ general/genlib/libpaper.xml (revision ff7c7bf83ef61682c3aec53a3c7f4d25514e63a6)
@@ -97,6 +97,56 @@
make install &&
-mkdir -v /etc/libpaper.d
-
+mkdir -v /etc/libpaper.d &&
+cat > /usr/bin/run-parts << "EOF"
+#!/bin/sh
+# run-parts: Runs all the scripts found in a directory.
+# from Slackware, by Patrick J. Volkerding with ideas borrowed
+# from the Red Hat and Debian versions of this utility.
+
+# keep going when something fails
+set +e
+
+if [ $# -lt 1 ]; then
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+if [ ! -d $1 ]; then
+ echo "Not a directory: $1"
+ echo "Usage: run-parts <directory>"
+ exit 1
+fi
+
+# There are several types of files that we would like to
+# ignore automatically, as they are likely to be backups
+# of other scripts:
+IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
+
+# Main loop:
+for SCRIPT in $1/* ; do
+ # If this is not a regular file, skip it:
+ if [ ! -f $SCRIPT ]; then
+ continue
+ fi
+ # Determine if this file should be skipped by suffix:
+ SKIP=false
+ for SUFFIX in $IGNORE_SUFFIXES ; do
+ if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
+ SKIP=true
+ break
+ fi
+ done
+ if [ "$SKIP" = "true" ]; then
+ continue
+ fi
+ # If we've made it this far, then run the script if it's executable:
+ if [ -x $SCRIPT ]; then
+ $SCRIPT || echo "$SCRIPT failed."
+ fi
+done
+
+exit 0
+EOF
+chmod -v -m755 /usr/bin/run-parts
@@ -112,4 +162,10 @@
into this directory.
+ cat > /usr/bin/run-parts << "EOF" :
+ paperconfig is a script which will invoke
+ run-parts if
+ /etc/libpaper.d exists. No other BLFS
+ package installs this, so we create it here.
+
@@ -123,5 +179,5 @@
system paper size. Issue the following command as the
root user to set this to
- 'A4' (libpaper expects the lowercase form). You may wish
+ 'A4' (libpaper prefers the lowercase form). You may wish
to use a different size, such as letter.
@@ -144,5 +200,5 @@
- paperconf, paperconfig
+ paperconf, paperconfig, run-parts
@@ -180,4 +236,14 @@
+
+ run-parts
+
+ run all the scripts found in a directory.
+
+ run-parts
+
+
+
+
libpaper.so
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml (revision cf694de054236a4832c69aa4337bd5f8c1220a21)
+++ introduction/welcome/changelog.xml (revision ff7c7bf83ef61682c3aec53a3c7f4d25514e63a6)
@@ -48,4 +48,8 @@
September 3rd, 2014
+
+ [ken] - add run-parts script (from Slackware) to the
+ libpaper page - thanks to akhiezer for his help.
+
[fernando] - LXDM-0.5.0 fixes: typo and some rewriting. Fix