On Wed, 10 Jan 2007 13:10:49 +0100
Tim Dijkstra <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I just noticed that the new version of the Makefile installs resume
> in /usr/sbin (or whatever you configured $(DESTDIR)$(SUSPEND_DIR) to be).
> Is there any reason to do that? It's not that you would be calling it by
> hand on a normal running system...
> 
> Of course you need the binary on initrd or initramfs. On debian it is
> installed under /usr/lib/uswsusp/resume, to signal the fact that it
> is a binary not to be used 'by hand'.

OK, I updated the Makefile a bit so the directory where resume gets
installed is configurable.
BTW, resume was also missing as an dependency of the install target.

OK to commit?



Index: Makefile
===================================================================
RCS file: /cvsroot/suspend/suspend/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- Makefile    14 Nov 2006 14:20:47 -0000      1.44
+++ Makefile    10 Jan 2007 12:21:19 -0000
@@ -23,6 +23,7 @@
 endif
 
 SUSPEND_DIR=/usr/local/sbin
+RESUME_DIR=/usr/local/lib/suspend
 CONFIG_DIR=/etc
 RESUME_DEVICE=<path_to_resume_device_file>
 BOOT_DIR=/boot
@@ -131,25 +132,25 @@
        install --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)
        if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install 
--mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else 
install -D --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); 
fi
 
-install: $(S2DISK) $(S2BOTH) suspend-keygen swap-offset conf/$(CONFIGFILE) 
$(SNAPSHOT)
+install: $(S2DISK) $(S2BOTH) resume suspend-keygen swap-offset 
conf/$(CONFIGFILE) $(SNAPSHOT)
        install -D --mode=755 suspend-keygen 
$(DESTDIR)$(SUSPEND_DIR)/suspend-keygen
        install --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)
        install --mode=755 $(S2BOTH) $(DESTDIR)$(SUSPEND_DIR)
        if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install 
--mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else 
install -D --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); 
fi
        install --mode=755 s2ram $(DESTDIR)$(SUSPEND_DIR)
-       install --mode=755 resume $(DESTDIR)$(SUSPEND_DIR)
+       install --mode=755 resume $(DESTDIR)$(RESUME_DIR)
        install --mode=755 swap-offset $(DESTDIR)$(SUSPEND_DIR)
 else
 install-s2disk: $(S2DISK) swap-offset conf/$(CONFIGFILE) $(SNAPSHOT)
        install -D --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)/$(S2DISK)
        if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install 
--mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else 
install -D --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); 
fi
 
-install: $(S2DISK) $(S2BOTH) swap-offset conf/$(CONFIGFILE) $(SNAPSHOT)
+install: $(S2DISK) $(S2BOTH) resume swap-offset conf/$(CONFIGFILE) $(SNAPSHOT)
        install -D --mode=755 $(S2DISK) $(DESTDIR)$(SUSPEND_DIR)/$(S2DISK)
        install --mode=755 $(S2BOTH) $(DESTDIR)$(SUSPEND_DIR)
        if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then install 
--mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new; else 
install -D --mode=644 conf/$(CONFIGFILE) $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); 
fi
        install --mode=755 s2ram $(DESTDIR)$(SUSPEND_DIR)
-       install --mode=755 resume $(DESTDIR)$(SUSPEND_DIR)
+       install --mode=755 resume $(DESTDIR)$(RESUME_DIR)
        install --mode=755 swap-offset $(DESTDIR)$(SUSPEND_DIR)
 endif
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to