Results 1 to 6 of 6

Thread: share your /etc/rc.d/rc.local file!

Threaded View

  1. #1

    share your /etc/rc.d/rc.local file!

    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,
    Last edited by HackerzMaster; April 4th, 2007 at 11:50 AM.
    The second step on the way to become a hacker is to run GNU/Linux. (first step is to buy a computer)
    My old skewl http://www.skoz.nl/spelevaert/

Similar Threads

  1. Writing to file in c++
    By Tedob1 in forum Other Tutorials Forum
    Replies: 4
    Last Post: October 15th, 2004, 06:31 AM
  2. Basic unix file and process commands
    By gizmofreak in forum Other Tutorials Forum
    Replies: 1
    Last Post: December 23rd, 2003, 05:51 AM
  3. Camouflage v1.2.1 The programme
    By Gbin@ryR in forum AntiOnline's General Chit Chat
    Replies: 8
    Last Post: February 28th, 2002, 05:52 PM
  4. Newbie Questions Answered - Chapter 4
    By uraloony in forum The Security Tutorials Forum
    Replies: 3
    Last Post: December 19th, 2001, 02:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •