Re: /etc/init.d hardcoded

Sascha Silbe <[email protected]> Mon, 14 Apr 2008 20:15:26 +0200
Newsgroups gmane.comp.lib.libchipcard.devel
Message-ID <[email protected]>
On Sun, Jan 06, 2008 at 02:46:45PM +0100, Sascha Silbe wrote:

> Please either add an option for changing the path (so non-root 
> installs can use a different path) or make installation of the init 
> script optional (it's of no use in those cases anyway). But just 
> hardcoding the path will cause non-root installations to break (i.e. 
> abort).
I've now patched libchipcard3-3.0.4 to make this path configurable. 
Unfornately, I cannot test it, since recreating the auto* output files 
fails:

sascha.silbe@polly:~/src/libchipcard3-3.0.4$ autoreconf
configure.ac:127: error: possibly undefined macro: AC_ENABLE_STATIC
        If this token and others are legitimate, please use 
m4_pattern_allow.
        See the Autoconf documentation.
configure.ac:128: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:137: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:138: error: possibly undefined macro: AC_LIBTOOL_RC
configure.ac:139: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1


This is on Ubuntu gutsy (7.10).

CU Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Libchipcard-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libchipcard-devel
libchipcard3-3.0.4-init.d-fix.patch (text/x-diff, 1.3 KB)
diff -ur libchipcard3-3.0.4/configure.ac libchipcard3-3.0.4-init.d-fix/configure.ac
--- libchipcard3-3.0.4/configure.ac	2007-11-08 21:23:16.000000000 +0100
+++ libchipcard3-3.0.4-init.d-fix/configure.ac	2008-04-14 20:03:09.000000000 +0200
@@ -109,6 +109,15 @@
 AC_MSG_RESULT($prefix)
 AC_SUBST(prefix)
 
+# /etc/init.d cannot be written by ordinary users, but Martin wants to have this as default even
+# for prefix != /usr (e.g. /usr/local), so we need an option to override it
+AC_MSG_CHECKING(for init script directory)
+AC_ARG_WITH([init_script_dir], 
+  [AS_HELP_STRING([--with-init-script-dir],
+    [directory to use instead of /etc/init.d (esp. for non-root installs) @<:@default=/etc/init.d@:>@])]
+  [],
+  [with_init_script_dir=/etc/init.d])
+AC_SUBST([init_script_dir], with_init_script_dir)
 
 
 ###-------------------------------------------------------------------------
diff -ur libchipcard3-3.0.4/etc/Makefile.am libchipcard3-3.0.4-init.d-fix/etc/Makefile.am
--- libchipcard3-3.0.4/etc/Makefile.am	2007-05-16 16:39:45.000000000 +0200
+++ libchipcard3-3.0.4-init.d-fix/etc/Makefile.am	2008-04-14 19:35:06.000000000 +0200
@@ -11,7 +11,7 @@
  chipcardd3.conf.default
 
 
-initscriptdir=/etc/init.d
+initscriptdir=@init_script_dir@
 initscript_DATA=chipcardd3
 
 EXTRA_DIST=$(clientconf_DATA) $(serverconf_DATA) $(initscript_DATA)
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIA58+ebr7S6V0daMRAgDPAJ0VBa/EQDZpp0SoO3bDEv2Z6B5iTQCePbLU
xaa5GfAH6fgMZOfKo0FbXUo=
=5SfV
-----END PGP SIGNATURE-----