mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-17 16:51:44 +08:00
Fix #206: allow to customize utilities from configure
`ethercatctl` calls some utilites actually hardcoded in the script. Provide a way to customize them from configure. The default values are choosen to be backward compatible with the old behavior, but more sensible values would be preferred, e.g.: OPTION ACTUAL DEFAULT PREFERRED DEFAULT kmod-dir /sbin $sbindir ip-cmd /bin/ip $sbindir/ip In a major future release this can be changed.
This commit is contained in:
@@ -68,6 +68,8 @@ endif
|
||||
# Any precious variable used inside script_templates should appear here
|
||||
expand_script = $(SED) \
|
||||
-e 's,[@]VERSION[@],$(VERSION),g' \
|
||||
-e 's,[@]ipcmd[@],$(ipcmd),g' \
|
||||
-e 's,[@]kmoddir[@],$(kmoddir),g' \
|
||||
-e 's,[@]bindir[@],$(bindir),g' \
|
||||
-e 's,[@]sbindir[@],$(sbindir),g' \
|
||||
-e 's,[@]sysconfdir[@],$(sysconfdir),g'
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
LSMOD=/sbin/lsmod
|
||||
MODPROBE=/sbin/modprobe
|
||||
RMMOD=/sbin/rmmod
|
||||
MODINFO=/sbin/modinfo
|
||||
IP=/bin/ip
|
||||
LSMOD="@kmoddir@/lsmod"
|
||||
MODPROBE="@kmoddir@/modprobe"
|
||||
RMMOD="@kmoddir@/rmmod"
|
||||
MODINFO="@kmoddir@/modinfo"
|
||||
IP="@ipcmd@"
|
||||
|
||||
ETHERCAT=@bindir@/ethercat
|
||||
ETHERCAT="@bindir@/ethercat"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -39,7 +39,7 @@ if [ "$1" = "-c" ]; then
|
||||
ETHERCAT_CONFIG="$2"
|
||||
COMMAND="$3"
|
||||
else
|
||||
ETHERCAT_CONFIG=@sysconfdir@/ethercat.conf
|
||||
ETHERCAT_CONFIG="@sysconfdir@/ethercat.conf"
|
||||
COMMAND="$1"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user