From 2230835b694fef8f6f63992b373d06e6025917ce Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:50 +0200 Subject: Adding live-helper 1.0~a6-1. --- helpers/lh_chroot_hosts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'helpers/lh_chroot_hosts') diff --git a/helpers/lh_chroot_hosts b/helpers/lh_chroot_hosts index 52784d5cb..4262f60dd 100755 --- a/helpers/lh_chroot_hosts +++ b/helpers/lh_chroot_hosts @@ -36,17 +36,17 @@ Breakpoint "chroot_hosts: Init" # Requiring stage file Require_stagefile .stage/bootstrap -# Checking lock file -Check_lockfile .lock - -# Creating lock file -Create_lockfile .lock - case "${1}" in install) # Checking stage file Check_stagefile .stage/chroot_hosts + # Checking lock file + Check_lockfile .lock + + # Creating lock file + Create_lockfile .lock + if [ -f chroot/etc/hosts ] then # Save hosts file @@ -64,6 +64,12 @@ case "${1}" in ;; remove) + # Checking lock file + Check_lockfile .lock + + # Creating lock file + Create_lockfile .lock + if [ -f chroot/etc/hosts.orig ] then # Restore hosts file -- cgit v1.2.3