Hi dupek
Let's assume that your commands are the right ones for your card.
You can do it in 2 ways. One way is to copy your commands to a script file, let's name it dupek.sh:
Code:
#! /bin/sh
modprobe rtl8187
iwconfig wlan1 rate 5.5M fixed
iwconfig wlan1 frag 2346
iwconfig wlan1 rts 2347
iwconfig wlan1 txpower 30
name it (dupek.sh),save it to, let's say /root/Desktop
make it executable
Code:
chmod 755 /root/Desktop/dupek.sh
and run it:
If you want those commands to be runned on boot you can make something like this:
Code:
#! /bin/sh
# /etc/init.d/dupek.sh
case "$1" in
start)
echo "Starting my commands"
modprobe rtl8187
iwconfig wlan1 rate 5.5M fixed
iwconfig wlan1 frag 2346
iwconfig wlan1 rts 2347
iwconfig wlan1 txpower 30
;;
stop)
echo "Stopping my commands"
modprobe -r rtl8187
sleep 2
modprobe rtl8187
;;
*)
echo "Usage: /etc/init.d/dupek {start|stop}"
exit 1
;;
esac
exit 0
save it to /etc/init.d/dupek.sh
make it executable:
Code:
chmod 755 /etc/init.d/dupek.sh
if you want to run it execute:
Code:
/etc/init.d/dupek start
to stop it:
Code:
/etc/init.d/dupek stop
please have in mind that the commands that are runned in stop sequence are:
Code:
modprobe -r rtl8187
sleep 2
modprobe rtl8187
remove cards "driver", wait 2 sec, enable cards "driver" which I presume will reset your command in the start sequence.
now if you want to make it run on boot, you need to add the appropriate symbolic links to cause the script to be executed when the system goes down, or comes up.
execute:
Code:
update-rc.d dupek.sh defaults
if you decide to stop it from running on boot:
Code:
update-rc.d -f dupek.sh remove
learn the basics and have fun!