/[baselayout]/branches/rc-scripts-1_6/sbin/env-update.sh
Gentoo

Contents of /branches/rc-scripts-1_6/sbin/env-update.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 756 - (show annotations) (download) (as text)
Mon Dec 6 15:46:18 2004 UTC (14 years ago) by (unknown author)
File MIME type: text/x-sh
File size: 709 byte(s)
This commit was manufactured by cvs2svn to create branch
'rc-scripts-1_6'.
1 #!/bin/bash
2 # Copyright 1999-2004 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
6 source /etc/init.d/functions.sh || exit 1
7
8 if [ "${EUID}" -ne 0 ]
9 then
10 eerror "$0: must be root."
11 exit 1
12 fi
13
14 usage() {
15 echo "usage: env-update.sh
16
17 note:
18 This utility generates /etc/profile.env and /etc/csh.env
19 from the contents of /etc/env.d/
20 "
21 exit 1
22 }
23
24 export SVCDIR="${svcdir}"
25
26 # Only update if files have actually changed
27 if [ "$1" == "-u" ]
28 then
29 is_older_than "${svcdir}/envcache" /etc/env.d && exit 0
30 shift
31 fi
32
33 if [ "$#" -ne 0 ]
34 then
35 usage
36 else
37 /bin/gawk \
38 -f /lib/rcscripts/awk/functions.awk \
39 -f /lib/rcscripts/awk/genenviron.awk
40 fi
41
42
43 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20