diff --git a/security/shadow/HISTORY b/security/shadow/HISTORY
index dcf3afc..af6dab9 100644
--- a/security/shadow/HISTORY
+++ b/security/shadow/HISTORY
@@ -1,3 +1,9 @@
+2015-02-21 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: SECURITY_PATCH++; quoting paths
+ * DEPENDS: dropped tabs
+ * BUILD: moved all pre-configuration actions to PRE_BUILD;
readability++
+ * PRE_BUILD: use secure default values actually
+
2012-06-30 Ladislav Hagara <hgr AT vabo.cz>
* DETAILS: 4.1.5.1
* PRE_BUILD, copydir.c.patch: patch removed
diff --git a/security/shadow/PRE_BUILD b/security/shadow/PRE_BUILD
new file mode 100755
index 0000000..a9768a1
--- /dev/null
+++ b/security/shadow/PRE_BUILD
@@ -0,0 +1,34 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+# Do not install default pam configuration files
+sedit 's|pam.d||' etc/Makefile.in &&
+
+# patch login.defs.linux so that spurious messages don't show up during login
+if is_depends_enabled $SPELL linux-pam; then
+ sedit '
+s|^CHFN_AUTH|#\0|g
+s|^CRACKLIB_DICTPATH|#\0|g
+s|^ENV_HZ|#\0|g
+s|^ENVIRON_FILE|#\0|g
+s|^ENV_PATH|#\0|g
+s|^ENV_SUPATH|#\0|g
+s|^FAILLOG_ENAB|#\0|g
+s|^FTMP_FILE|#\0|g
+s|^LASTLOG_ENAB|#\0|g
+s|^MAIL_CHECK_ENAB|#\0|g
+s|^MOTD_FILE|#\0|g
+s|^NOLOGINS_FILE|#\0|g
+s|^OBSCURE_CHECKS_ENAB|#\0|g
+s|^PASS_ALWAYS_WARN|#\0|g
+s|^PASS_CHANGE_TRIES|#\0|g
+s|^PASS_MIN_LEN|#\0|g
+s|^PORTTIME_CHECKS_ENAB|#\0|g
+s|^QUOTAS_ENAB|#\0|g
+s|^SU_WHEEL_ONLY|#\0|g
+' etc/login.defs
+else
+ sedit '
+s|^#ENCRYPT_METHOD.*|ENCRYPT_METHOD SHA512|
+' etc/login.defs
+fi
diff --git a/utils/sysstat/HISTORY b/utils/sysstat/HISTORY
index b0002f4..d84cb27 100644
--- a/utils/sysstat/HISTORY
+++ b/utils/sysstat/HISTORY
@@ -1,3 +1,6 @@
+2015-02-21 Vlad Glagolev <stealth AT sourcemage.org>
+ * INSTALL: corrected syntax errors; verbosity++
+
2013-06-13 Eric Sandall <sandalle AT sourcemage.org>
* DETAILS: PATCHLEVEL++
* CONFIGURE: Query about installing cron jobs.
diff --git a/utils/sysstat/INSTALL b/utils/sysstat/INSTALL
index 14b2547..ee71de0 100755
--- a/utils/sysstat/INSTALL
+++ b/utils/sysstat/INSTALL
@@ -1,16 +1,17 @@
default_install &&
if [[ "x${SYSSTAT_CRON}" == "xy" ]]; then
- if ! -d "${INSTALL_ROOT}"/etc/cron.hourly; then
- install -d -m 0755 "${INSTALL_ROOT}"/etc/cron.hourly
+ if [[ ! -d "${INSTALL_ROOT}"/etc/cron.hourly ]]; then
+ install -d -vm 0755 "${INSTALL_ROOT}"/etc/cron.hourly
fi &&
- if ! -d "${INSTALL_ROOT}"/etc/cron.daily; then
- install -d -m 0755 "${INSTALL_ROOT}"/etc/cron.daily
+ if [[ ! -d "${INSTALL_ROOT}"/etc/cron.daily ]]; then
+ install -d -vm 0755 "${INSTALL_ROOT}"/etc/cron.daily
fi &&