Add /usr/bin to exception list, to make sure we keep the /usr mount around.
[util-vserver.git] / sysv / Makefile-files
1 ## $Id$  -*- makefile -*-
2
3 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
4 ##  
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
9 ##  
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##  
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##  
19
20 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT +=   \
21                         $(sysv_src_SCRPTS) \
22                         $(sysv_gen_SCRPTS)
23
24 sysv_src_SCRPTS =       sysv/rebootmgr \
25                         sysv/vprocunhide \
26                         sysv/vservers-default \
27                         sysv/vservers-legacy \
28                         sysv/util-vserver
29 sysv_gen_SCRPTS =       sysv/v_gated \
30                         sysv/v_httpd \
31                         sysv/v_named \
32                         sysv/v_portmap \
33                         sysv/v_sendmail \
34                         sysv/v_smb \
35                         sysv/v_sshd \
36                         sysv/v_xinetd
37 sysv_conf_DTA =         sysv/vservers.conf
38
39 EXTRA_DIST +=           sysv/v_gated.subst \
40                         sysv/v_httpd.subst \
41                         sysv/v_named.subst \
42                         sysv/v_portmap.subst \
43                         sysv/v_sendmail.subst \
44                         sysv/v_smb.subst \
45                         sysv/v_sshd.subst \
46                         sysv/v_xinetd.subst \
47                         $(sysv_src_SCRPTS) \
48                         $(sysv_conf_DTA)
49
50 if HAVE_SYSV_INIT
51 sysconf_DATA +=         $(sysv_conf_DTA)
52 initrd_SCRIPTS +=       $(sysv_src_SCRPTS) \
53                         $(sysv_gen_SCRPTS)
54 endif
55
56 CLEANFILES +=           $(sysv_gen_SCRPTS)
57
58 sysv_SUBSTRULE =        s!/usr/lib/util-vserver!$(pkglibdir)!g; \
59                         s!^USR_SBIN=/usr/sbin$$!USR_SBIN=$(sbindir)!g; \
60                         s!^DEFAULT_VSERVERDIR=/vservers$$!DEFAULT_VSERVERDIR=$(vserverdir)!g
61
62 sysv/%:                 sysv/%.subst
63                         @mkdir -p $$(dirname '$@')
64                         sed -e '$(sysv_SUBSTRULE)' '$<' >'$@.tmp'
65                         @rm -f '$@'
66                         @if cmp -s '$<' '$@.tmp'; then \
67                                 cp -p '$<' '$@'; \
68                         else \
69                                 mv -f '$@.tmp' '$@'; \
70                         fi
71                         @rm -f '$@.tmp'
72                         @chmod a-w '$@'