From 889489c8ce3339ca3b6cab45ec58e73cca40a51a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 10 Nov 2007 15:40:53 +0100 Subject: Using shell redirection to truncate rather than additional commands/forks/files, thanks to Justin Pryzby . --- helpers/lh_chroot_hosts | 2 +- helpers/lh_chroot_resolv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'helpers') diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts index 848038369..6a91831ed 100755 --- a/helpers/lh_chroot_hosts +++ b/helpers/lh_chroot_hosts @@ -89,7 +89,7 @@ EOF else # Blank out hosts file, don't remove in case # its a symlink, as in the case of exposedroot mode - cat /dev/null > chroot/etc/hosts + Truncate chroot/etc/hosts fi # Removing stage file diff --git a/helpers/lh_chroot_resolv b/helpers/lh_chroot_resolv index eeeead226..bc53c6847 100755 --- a/helpers/lh_chroot_resolv +++ b/helpers/lh_chroot_resolv @@ -80,7 +80,7 @@ case "${1}" in mv chroot/etc/resolv.conf.orig chroot/etc/resolv.conf else # Truncating resolv file - cat < /dev/null > chroot/etc/resolv.conf + Truncate chroot/etc/resolv.conf fi # Removing stage file -- cgit v1.2.3