change how we disable motd-updating
authorAdam Glasgall <adam@crossproduct.net>
Sat, 20 Apr 2013 20:27:08 +0000 (16:27 -0400)
committerAdam Glasgall <adam@crossproduct.net>
Sat, 20 Apr 2013 20:27:08 +0000 (16:27 -0400)
debian/changelog
debian/rules
debian/transform_bootmisc.sh.invirt [deleted file]
debian/transform_login.invirt [new file with mode: 0755]
debian/transform_sshd.invirt

index 4527da6..63bb1f7 100644 (file)
@@ -1,3 +1,10 @@
+invirt-console (0.2.16~glasgall2) precise; urgency=low
+
+  * Disable MOTD updating by transforming pam config to run pam_motd with
+    noupdate.
+
+ -- Adam Glasgall <glasgall@mit.edu>  Sat, 20 Apr 2013 16:25:24 -0400
+
 invirt-console (0.2.16~glasgall1) precise; urgency=low
 
   * No-change rebuild for Precise
index 5117948..e971499 100755 (executable)
@@ -2,10 +2,10 @@
 
 DEB_DIVERT_EXTENSION = .invirt
 DEB_TRANSFORM_FILES_invirt-console-server += \
-       /etc/init.d/bootmisc.sh.invirt \
        /etc/nsswitch.conf.invirt \
        /etc/nscd.conf.invirt \
        /etc/pam.d/sshd.invirt \
+       /etc/pam.d/login.invirt \
        /etc/ssh/sshd_config.invirt.invirt
 
 DEB_UNDIVERT_FILES_invirt-console-server += \
diff --git a/debian/transform_bootmisc.sh.invirt b/debian/transform_bootmisc.sh.invirt
deleted file mode 100755 (executable)
index b6a4b6d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-patch -p0 -o /dev/fd/4 3<&0 4>&1 1>/dev/null <<EOF
-
-# Yes, I there's no context. But the lines being replaced are less
-# likely to change than the lines around them
-
---- Ignored
-+++ /dev/fd/3
-@@ -42,3 +42,2 @@
--      # Update motd
--      uname -snrvm > /var/run/motd
--      [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
-+      # Do not update motd
-+      cp /etc/motd /var/run/motd
diff --git a/debian/transform_login.invirt b/debian/transform_login.invirt
new file mode 100755 (executable)
index 0000000..00d4a43
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec sed -e 's/pam_motd.so/pam_motd.so noupdate/g'
index 951a589..9813498 100755 (executable)
@@ -8,4 +8,4 @@ echo 'auth    [success=1 ignore=ignore default=ignore module_unknown=die]   pam_
 echo "# print the \"your account doesn't exist\" error:"
 echo 'auth    [success=die ignore=reset default=die module_unknown=die]     pam_echo.so file=/etc/issue.net.no_user'
 echo
-exec cat
+exec sed -e 's/pam_motd.so/pam_motd.so noupdate/g'