hi all,
here is my /etc/rc.d/rc.local file, nothing special:
#!/bin/sh
#
#/etc/rc.d/rc.local: Local system initialization script.
#
# =====================================================================================================================
# ---- WRITTEN BY: "HackerzMaster":--------------
# =====================================================================================================================
#
# Checking the network, and starting DHCP:
#
if [ -x /sbin/dhcpcd ]; then
dhcpcd ath0
if [ $? -eq 0 ] ; then
echo -e "starting ath0 interface... \t\t\t\t\t\t\t\t\t\t\t\c"
echo "done"
else echo -e "starting ath0 interface... \t\t\t\t\t\t\t\t\t\t\t\c"
echo 'network is down '
fi
fi
# Checking if the gateway is connected (online):
#
ping -c 1 -w 5 linksys 1> /dev/null 2>&1
if [ $? -eq 0 ] ; then
ping -c 1 -w 10 google.com 1> /dev/null 2>&1
echo '<you are online>'
/home/hani/scripts/getath0.sh 2> /dev/null
else echo '<you are offline>'
fi
# Turn numlock on:
for tty in /dev/tty[1-6]; do
/usr/bin/setleds -D +num < $tty
done
# Setting time to Universal Time Coordinate (UTC), setting system time to hardware clock:
echo "Setting time to Universal Time Coordinate (UTC)" ;
ntpdate asia.pool.ntp.org > /dev/null 2>&1
hwclock --utc --systohc
# Start hci0 bluetooth interface, scanning neighborhood for devices:
echo starting bluetooth...
hciconfig hci0 up 2> /dev/null
if [ $? -eq 0 ] ; then
hcitool scan
else echo '<no bluetooth adapter found>'
fi
# Starting firewall:
echo restarting firewall
/linux/firewall-jay-1.0.5/files/fw-jay restart > /dev/nul 2>&1
# Setting the ip_foward variable, useful for some progs
ip_forward=/proc/sys/net/ipv4/ip_forward
# Displaying my TODO list
cat /home/hackerzmaster/TODO
# F.Y.I getath0.sh:
# #!/bin/bash
# echo your IP-Address is `/sbin/ifconfig ath0 | awk '/inet/ { print $2 }' | awk -F ":" '{ print # $2 }'`
# E.O.F
#=======================================================================================================================
#=======================================================================================================================
Ok, so what do you think? curious to see your files
peace,