/[vps]/baselayout-vserver/branches/baselayout-1_12/sbin/env-update.sh
Gentoo

Contents of /baselayout-vserver/branches/baselayout-1_12/sbin/env-update.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (show annotations) (download) (as text)
Thu Mar 9 10:07:19 2006 UTC (12 years, 3 months ago) by phreak
File MIME type: text/x-sh
File size: 699 byte(s)
Merging r1939
1 #!/bin/bash
2 # Copyright 1999-2004 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 source /sbin/functions.sh || exit 1
6
7 if [[ ${EUID} != "0" ]] ; then
8 eerror "$0: must be root."
9 exit 1
10 fi
11
12 usage() {
13 echo "usage: env-update.sh
14
15 note:
16 This utility generates /etc/profile.env and /etc/csh.env
17 from the contents of /etc/env.d/
18 "
19 exit 1
20 }
21
22 export SVCDIR="${svcdir}"
23
24 # Only update if files have actually changed
25 if [[ $1 == "-u" ]] ; then
26 is_older_than "${svcdir}/envcache" /etc/env.d && exit 0
27 shift
28 fi
29
30 if [[ $# != "0" ]] ; then
31 usage
32 else
33 /bin/gawk \
34 -f /lib/rcscripts/awk/functions.awk \
35 -f /lib/rcscripts/awk/genenviron.awk
36 fi
37
38 # vim:ts=4

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20