diff --git a/TODO b/TODO index 68962e56..b9584894 100644 --- a/TODO +++ b/TODO @@ -28,7 +28,6 @@ $Id$ * Smaller changes: - Simplify FSMs with _enter() functions. - - Rename "sysconfig" file to "sysconfig/ethercat". - Dynamic creation of EoE handlers. - Output intermediate results during lsec. - State change FSM: Follow spontaneous state changes. diff --git a/configure.ac b/configure.ac index c6478de3..5c4e0e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,8 @@ AC_CONFIG_FILES([ master/Makefile devices/Makefile script/Makefile + script/init.d/Makefile + script/sysconfig/Makefile include/Makefile examples/Makefile examples/mini/Makefile diff --git a/script/Makefile.am b/script/Makefile.am index 76c9ada0..f494a248 100644 --- a/script/Makefile.am +++ b/script/Makefile.am @@ -35,19 +35,10 @@ # #------------------------------------------------------------------------------ -initdir = $(sysconfdir)/init.d -sysdir = $(sysconfdir)/sysconfig +SUBDIRS = init.d sysconfig bin_SCRIPTS = lsec -init_SCRIPTS = ethercat -sys_DATA = sysconfig -EXTRA_DIST = lsec.pl ethercat.sh sysconfig - -lsec: lsec.pl - cp $(srcdir)/lsec.pl lsec - -ethercat: ethercat.sh - cp $(srcdir)/ethercat.sh ethercat +EXTRA_DIST = lsec #------------------------------------------------------------------------------ diff --git a/script/install.sh b/script/init.d/Makefile.am old mode 100755 new mode 100644 similarity index 51% rename from script/install.sh rename to script/init.d/Makefile.am index b996326a..a98c43cb --- a/script/install.sh +++ b/script/init.d/Makefile.am @@ -1,9 +1,5 @@ -#!/bin/sh - #------------------------------------------------------------------------------ # -# EtherCAT install script -# # $Id$ # # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH @@ -35,67 +31,10 @@ # #------------------------------------------------------------------------------ -# Fetch parameters +initdir = $(sysconfdir)/init.d -if [ $# -ne 1 ]; then - echo "This script is called by \"make\". Run \"make install\" instead." - exit 1 -fi +init_SCRIPTS = ethercat -KERNEL=$1 - -if [ ! -d /lib/modules/$KERNEL ]; then - echo "Kernel \"$KERNEL\" does not exist in /lib/modules!" - exit 1 -fi - -echo "EtherCAT installer - Kernel: $KERNEL" - -#------------------------------------------------------------------------------ - -# Update module dependencies - -echo " Building module dependencies" -/sbin/depmod - -#------------------------------------------------------------------------------ - -# Create configuration file - -CONFIGFILE=/etc/sysconfig/ethercat - -if [ -s $CONFIGFILE ]; then - echo " Note: Using existing configuration file." -else - echo " Creating $CONFIGFILE" - cp script/sysconfig $CONFIGFILE || exit 1 - echo " Note: Please edit DEVICE_INDEX in $CONFIGFILE!" -fi - -#------------------------------------------------------------------------------ - -# Install rc script - -echo " Installing startup script" -cp script/ethercat.sh /etc/init.d/ethercat || exit 1 -chmod +x /etc/init.d/ethercat || exit 1 -if [ ! -L /usr/sbin/rcethercat ]; then - ln -s /etc/init.d/ethercat /usr/sbin/rcethercat || exit 1 -fi - -#------------------------------------------------------------------------------ - -# Install tools - -echo " Installing tools" -cp script/lsec.pl /usr/local/bin/lsec || exit 1 -chmod +x /usr/local/bin/lsec || exit 1 - -#------------------------------------------------------------------------------ - -# Finish - -echo "Done" -exit 0 +EXTRA_DIST = ethercat #------------------------------------------------------------------------------ diff --git a/script/ethercat.sh b/script/init.d/ethercat similarity index 100% rename from script/ethercat.sh rename to script/init.d/ethercat diff --git a/script/lsec.pl b/script/lsec similarity index 100% rename from script/lsec.pl rename to script/lsec diff --git a/script/sysconfig/Makefile.am b/script/sysconfig/Makefile.am new file mode 100644 index 00000000..70ca9631 --- /dev/null +++ b/script/sysconfig/Makefile.am @@ -0,0 +1,40 @@ +#------------------------------------------------------------------------------ +# +# $Id$ +# +# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH +# +# This file is part of the IgH EtherCAT Master. +# +# The IgH EtherCAT Master is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The IgH EtherCAT Master is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the IgH EtherCAT Master; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# The right to use EtherCAT Technology is granted and comes free of +# charge under condition of compatibility of product made by +# Licensee. People intending to distribute/sell products based on the +# code, have to sign an agreement to guarantee that products using +# software based on IgH EtherCAT master stay compatible with the actual +# EtherCAT specification (which are released themselves as an open +# standard) as the (only) precondition to have the right to use EtherCAT +# Technology, IP and trade marks. +# +#------------------------------------------------------------------------------ + +sysdir = $(sysconfdir)/sysconfig + +sys_DATA = ethercat + +EXTRA_DIST = ethercat + +#------------------------------------------------------------------------------ diff --git a/script/sysconfig-file b/script/sysconfig/ethercat similarity index 100% rename from script/sysconfig-file rename to script/sysconfig/ethercat