Also
echo remove ipw3945; /sbin/ipw3945d --kill ; \
Main Topics
Browse All TopicsI am trying to setup an automation script to load a wireless driver using the following command:
I put the following commands in /etc/modprobe.d/iwp3945
echo install ipw3945 /sbin/modprobe --ignore-install ipw3945 ; \
sleep 0.5 ; /sbin/ipw3945d --quiet >> /etc/modules.d/ipw3945
echo remove ipw3945 /sbin/ipw3945d --kill ; \
/sbin/modprobe -r --ignore-remove ipw3945 >> /etc/modules.d/ipw3945
modprobe returns the following warning: ignoring bad line starting with echo. What is the correct syntax to get this script to work?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Ignore my last comment, it refers to a different file. I did copy the initialization file to the wrong directory. The correct directory is modules.d but the script still does not work.
/etc/modules.d/ipw3945:
echo install ipw3945 /sbin/modprobe --ignore-install ipw3945 ; \
sleep 0.5 ; /sbin/ipw3945d --quiet >> /etc/modules.d/ipw3945
echo remove ipw3945 /sbin/ipw3945d --kill ; \
/sbin/modprobe -r --ignore-remove ipw3945 >> /etc/modules.d/ipw3945
# modprobe ipw3945 <-- This command should load the module but it does not.
# ps -C ipw3945d <-- This command does not show the process
It still does not work. But after doing a dostounix format I don't get the warning.
Instead of using modprobe to load the module I put an initialization script in /etc/init.d. The script loads the module but this prevents the network manager from starting.
#!/bin/sh
#
# ipw3945d: Intel Pro Wireless 3945ABG Wireless Daemon
#
# chkconfig: 2345 90 10
# description: Activates/Deactivates eth1 wireless interface (ipw3945)
#
# processname: ipw3945d
# pidfile: /var/run/ipw3945d/ipw3945d
#
prefix=/usr
exec_prefix=/usr
sbindir=/sbin
IPW3945D_BIN=${sbindir}/ip
# Sanity checks
[ -x $IPW3945D_BIN ] || exit 1
# Source function library.
. /etc/rc.d/init.d/functions
# so we can rearrange this easily
processname=ipw3945d
servicename=ipw3945d
pidfile=/var/run/ipw3945d.
RETVAL=0
start()
{
echo -n $"Starting Intel Pro Wireless 3945ABG daemon: "
daemon --check $servicename $processname --pid-file=$pidfile
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicen
}
stop()
{
echo -n $"Stopping Intel Pro Wireless 3945ABG daemon: "
killproc -p $pidfile $servicename
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/$servicen
rm -f $pidfile
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p $pidfile $processname
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$servicen
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart
;;
esac
exit $RETVAL
#! /bin/bash
#
# network Bring up/down networking
#
# chkconfig: 2345 10 90
# description: Activates/Deactivates all network interfaces configured to \
# start at boot time.
#
### BEGIN INIT INFO
# Provides: $network
# Should-Start: iptables ip6tables
### END INIT INFO
# chkconfig: 2345 10 90 <-- Network interface
# chkconfig: 2345 90 10 <-- Wireless daemon
Business Accounts
Answer for Membership
by: duncan_roePosted on 2007-11-21 at 03:15:33ID: 20326731
Looks like you're missing a semicolon:
echo install ipw3945; /sbin/modprobe --ignore-install ipw3945 ; \