[Piuparts-commits] [piuparts] 02/06: divert /sbin/sync and link /bin/true there instead

Holger Levsen holger at moszumanska.debian.org
Mon Feb 10 11:14:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 3e8b7a6de438fd755c4aaaa62c3a4ffe071e785b
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Nov 24 02:18:43 2013 +0100

    divert /sbin/sync and link /bin/true there instead
    
    sync within the throwaway chroots is useless but affects the host
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 custom-scripts/scripts/post_setup_force-unsafe-io | 6 ++++++
 debian/changelog                                  | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/custom-scripts/scripts/post_setup_force-unsafe-io b/custom-scripts/scripts/post_setup_force-unsafe-io
index b2ac53e..558dc72 100755
--- a/custom-scripts/scripts/post_setup_force-unsafe-io
+++ b/custom-scripts/scripts/post_setup_force-unsafe-io
@@ -9,3 +9,9 @@ then
 		echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/piuparts-force-unsafe-io
 	fi
 fi
+
+if [ ! -h /bin/sync ]
+then
+	dpkg-divert --rename /bin/sync
+	ln -sv true /bin/sync
+fi
diff --git a/debian/changelog b/debian/changelog
index c824f15..c8c3724 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,8 @@ piuparts (0.57) UNRELEASED; urgency=low
     - Mark essential-required as obsolete and hide it.
   * scripts/post_{setup,distupgrade}_force-unsafe-io: New custom script to
     automatically enable dpkg --force-unsafe-io once that is supported.
+    Also divert /bin/sync and replace it with a link to /bin/true. Syncing a
+    throwaway chroot is useless, but affects on the host's performance.
   * Add more piuparts exceptions.
   * Handle lib32nss-mdns like ia32-libs[-gtk].
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list