Hiyas,

here is a pathc with following changes:

    - create logfile and used directories on install
    - do not remove used directories, but clean them

This patch makes sure that /var/run/pm-utils{,/storage} are created on make 
install and also an empty logfile. Also it changes pm-utils not to 
remove /var/run/pm-utils/storage but only everything within it. The creation 
of the logfile is needed to make it get the correct selinux context and I 
guess the directories will also need to get some special context.

Regards,
Till
 pm/Makefile.am |    2 ++
 pm/functions   |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/pm/Makefile.am b/pm/Makefile.am
index a063dbb..1723021 100644
--- a/pm/Makefile.am
+++ b/pm/Makefile.am
@@ -11,6 +11,8 @@ EXTRA_DIST =			\
 
 install-exec-local:
 	-mkdir $(DESTDIR)$(sysconfdir)/pm/config.d
+	-mkdir -p $(DESTDIR)$(localstatedir)/run/pm-utils/storage
+	-install -D -m 0600 /dev/null $(DESTDIR)$(localstatedir)/log/pm-suspend.log
 
 clean-local :
 	rm -f *~
diff --git a/pm/functions b/pm/functions
index 05409fe..2ae533a 100755
--- a/pm/functions
+++ b/pm/functions
@@ -86,7 +86,7 @@ take_suspend_lock()
 
 remove_suspend_lock()
 {
-	rm -rf "${STORAGEDIR}"
+	rm -rf -- "${STORAGEDIR}/*"
 	chvt 1
 	chvt $VT
 	release_lock "${LOCK}"

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to