# genkernel fails

## driftwood

Hi,

I am trying to compile a kernel using genkernel. Genkernel fails with the following error:

```

/usr/bin/genkernel: line 37: /gen_funcs.sh: No such file or directory

Could not read /gen_funcs.sh

```

The error is caused by the --config flag. After some investigation I found the problem, but I don't know the cause.

In the genkernel script the following line is intended to populate some variable required by the script.

```

# Pull in our configuration

source ${CMD_GK_CONFIG:-/etc/genkernel.conf} || small_die "Could not read /etc/genkernel.conf"

```

The variable that indicates where the required scripts are located, 

```
GK_SHARE
```

 is not populated even though it is defined in 

```
/etc/genkernel.conf
```

 so the above call should actually be 

```
/usr/share/genkernel/gen_funcs.sh
```

Any idea why it would not be populating the variables?

```
source
```

 does function correctly and I am using genkernel 3.4.10-r1

----------

## limn

You don't show how you are calling genkernel, but this could occur if you have supplied a --config option that does not define GK_SHARE. E.g.

```
$ touch /tmp/test

$ genkernel --config=/tmp/test

/usr/bin/genkernel: line 37: /gen_funcs.sh: No such file or directory

Could not read /gen_funcs.sh

```

or if  CMD_GK_CONF is set similar

```
$ CMD_GK_CONFIG=/tmp/test genkernel 

/usr/bin/genkernel: line 37: /gen_funcs.sh: No such file or directory

Could not read /gen_funcs.sh

```

----------

## driftwood

Ahhh... I mixed up the --config option with --kernel-config which is the one I was looking for.

Thanks for your help.

----------

