You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the configure script uses the --with-default-config-file=[FILE] option and FILE points to a file in a specific sub-directory, the PATH to the file is created and installed. Easier to explain with an example. See below.
To Reproduce
Run the configure script with the --with-default-config-file option and point to a file in an absolute or relative path (I did relative). I'm also using --prefix for testing purposes.
mkdir /tmp/root/
./configure --prefix=/tmp/root/ --with-default-config-file=./doc/samples/keepalived.conf.sample
make
make install
Now, since our prefix is '/tmp/root/', the config file will be installed to '/tmp/root/etc/keepalived/./doc/samples/keepalived.conf.sample'. This is not at all what I expected. It seems that this configure option is a bit too literal. The way it works now it seems that you're only truly getting a default config file if you use "keepalived.conf" as the FILE.
Expected behavior
My expectation was that the path/file passed to --with-default-config-file would be installed to "$PREFIX/etc/keepalived/keepalived.conf" -- that is the default config file location. Instead, it created the exact path/file as specified.
If you specify --with-default-config-file=./doc/samples/keepalived.conf.sample with doc/samples as part of the path, then I would expect that doc/samples would appear somewhere in the path to the default config file.
--with-default-config-file specifies the default path that the keepalived executable will use to open its config file if no -f option is specified to keepalived when keepalived is executed. To be "helpful" keepalived installs a default config file to that path with .sample appended, to give the user a head start in creating a working configuration file.
I would be very happy to create another configure option to specify the source location for a config file to be copied to the default config file path (possibly with .sample appended [comments appreciated]) which would achieve what I think you are expecting to happen.
Describe the bug
When the configure script uses the --with-default-config-file=[FILE] option and FILE points to a file in a specific sub-directory, the PATH to the file is created and installed. Easier to explain with an example. See below.
To Reproduce
Run the configure script with the --with-default-config-file option and point to a file in an absolute or relative path (I did relative). I'm also using --prefix for testing purposes.
Now, since our prefix is '/tmp/root/', the config file will be installed to '/tmp/root/etc/keepalived/./doc/samples/keepalived.conf.sample'. This is not at all what I expected. It seems that this configure option is a bit too literal. The way it works now it seems that you're only truly getting a default config file if you use "keepalived.conf" as the FILE.
Expected behavior
My expectation was that the path/file passed to --with-default-config-file would be installed to "$PREFIX/etc/keepalived/keepalived.conf" -- that is the default config file location. Instead, it created the exact path/file as specified.
Keepalived version
Additional context
Here is the full path:
I think it should be:
We could use something like 'basename' to strip the PATH, then the file should just be 'keepalived.conf'.
The text was updated successfully, but these errors were encountered: