From af72ab84ed79e081e501c69ac33e9aa45cd29fb5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 31 Aug 2011 11:43:03 +0200 Subject: [PATCH] [scripts] force removal of entropy pid file from system image --- scripts/image_generic_inner_chroot_script_after.sh | 4 ++++ scripts/inner_chroot_script.sh | 3 +++ scripts/remaster_generic_inner_chroot_script.sh | 4 ++++ scripts/remaster_generic_inner_chroot_script_after.sh | 3 +++ scripts/remaster_post_common.sh | 4 ++++ scripts/tar_generic_inner_chroot_script_after.sh | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/scripts/image_generic_inner_chroot_script_after.sh b/scripts/image_generic_inner_chroot_script_after.sh index 1523faa..f73d5dc 100755 --- a/scripts/image_generic_inner_chroot_script_after.sh +++ b/scripts/image_generic_inner_chroot_script_after.sh @@ -86,3 +86,7 @@ umount /proc # remove hw hash rm -f /etc/entropy/.hw.hash +# remove entropy pid file +rm -f /var/run/entropy/entropy.lock + +exit 0 diff --git a/scripts/inner_chroot_script.sh b/scripts/inner_chroot_script.sh index 9c9bfaf..9c4e743 100755 --- a/scripts/inner_chroot_script.sh +++ b/scripts/inner_chroot_script.sh @@ -117,4 +117,7 @@ rm -rf /var/lib/entropy/tmp # remove entropy hwhash rm -f /etc/entropy/.hw.hash +# remove entropy pid file +rm -f /var/run/entropy/entropy.lock + exit 0 diff --git a/scripts/remaster_generic_inner_chroot_script.sh b/scripts/remaster_generic_inner_chroot_script.sh index 9014b84..9c3ede0 100755 --- a/scripts/remaster_generic_inner_chroot_script.sh +++ b/scripts/remaster_generic_inner_chroot_script.sh @@ -1,4 +1,8 @@ #!/bin/sh + +# make sure there is no stale pid file around that prevents entropy from running +rm -f /var/run/entropy/entropy.lock + export FORCE_EAPI=2 equo update if [ "${?}" != "0" ]; then diff --git a/scripts/remaster_generic_inner_chroot_script_after.sh b/scripts/remaster_generic_inner_chroot_script_after.sh index d9a60e0..3e1dbb4 100755 --- a/scripts/remaster_generic_inner_chroot_script_after.sh +++ b/scripts/remaster_generic_inner_chroot_script_after.sh @@ -342,4 +342,7 @@ emaint --fix world rm -rf /var/lib/entropy/*cache* +# remove entropy pid file +rm -f /var/run/entropy/entropy.lock + exit 0 diff --git a/scripts/remaster_post_common.sh b/scripts/remaster_post_common.sh index 5a2e3ab..c987d24 100755 --- a/scripts/remaster_post_common.sh +++ b/scripts/remaster_post_common.sh @@ -10,3 +10,7 @@ fi # remove entropy hwash rm -f "${CHROOT_DIR}"/etc/entropy/.hw.hash +# remove entropy pid file +rm -f "${CHROOT_DIR}"/var/run/entropy/entropy.lock + +exit 0 diff --git a/scripts/tar_generic_inner_chroot_script_after.sh b/scripts/tar_generic_inner_chroot_script_after.sh index a68a766..7593d7d 100755 --- a/scripts/tar_generic_inner_chroot_script_after.sh +++ b/scripts/tar_generic_inner_chroot_script_after.sh @@ -7,3 +7,7 @@ equo query list installed -qv > /etc/sabayon-pkglist # remove hw hash rm -f /etc/entropy/.hw.hash +# remove entropy pid file +rm -f /var/run/entropy/entropy.lock + +exit 0