1 |
On Tue, 2003-05-13 at 05:28, YAMAKURA Makoto wrote: |
2 |
> Hi, |
3 |
> |
4 |
> From: Martin Schlemmer <azarah@g.o> |
5 |
> Subject: [gentoo-dev] baselayout-1.8.6.7 |
6 |
> Date: 12 May 2003 02:00:34 +0200 |
7 |
> |
8 |
> > - Updated the dependency system to try and touch files less. |
9 |
> > For example, dependencies are calculated in runscript.sh |
10 |
> > now without the symlink method, but rather with env variables. |
11 |
> > Also, all helper scripts should be sourced only once for |
12 |
> > any series of services started, or during a runlevel change. |
13 |
> |
14 |
> I have trouble with pcmcia/net.eth0 dependency. "deptree" script |
15 |
> defines functions such as "depinfo_net.eth0", but bash doesn't allow |
16 |
> those names, so "get_dep_info" in rc-services.sh gets failed. |
17 |
> |
18 |
|
19 |
If you look at bash's manual page, they define a variable as: |
20 |
|
21 |
------------------------------------------------------- |
22 |
A parameter is an entity that stores values. It can be a name, a num- |
23 |
ber, or one of the special characters listed below under Special Param- |
24 |
eters. For the shell's purposes, a variable is a parameter denoted by |
25 |
a name. A variable has a value and zero or more attributes. |
26 |
-------------------------------------------------------- |
27 |
|
28 |
Let on the 'a variable is a parameter denoted by a name'. |
29 |
|
30 |
This is for a function: |
31 |
|
32 |
-------------------------------------------------------- |
33 |
[ function ] name () { list; } |
34 |
This defines a function named name. The body of the function is |
35 |
the list of commands between { and }. |
36 |
-------------------------------------------------------- |
37 |
|
38 |
And if you then check what they define 'name' as: |
39 |
|
40 |
-------------------------------------------------------- |
41 |
name A word consisting only of alphanumeric characters and under- |
42 |
scores, and beginning with an alphabetic character or an under- |
43 |
score. Also referred to as an identifier. |
44 |
-------------------------------------------------------- |
45 |
|
46 |
Means that it is totally legal to call a variable/function: |
47 |
|
48 |
get_foo_bar |
49 |
|
50 |
|
51 |
Regards, |
52 |
|
53 |
-- |
54 |
|
55 |
Martin Schlemmer |
56 |
Gentoo Linux Developer, Desktop/System Team Developer |
57 |
Cape Town, South Africa |