Jump to content

cillian

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by cillian

  1. Hi thesugarat, no problems with anything network I have noticed, never had any issues doing it this way on other Linux based sys, Hi newbi3 having it in a separate script fits in my trouble shooting process, hadn't thought about rc.local if I'm honest. :) I like having blocks that do a certain thing so I can disable if I think their causing trouble, this way its a one liner to disable rather then an edit of a larger file. In other sys I would tend to have quite a few custom scripts run at boot and require them to process in a certain order to function properly, I suppose that's the habit part. On that note chriswhat whats the command/s being run from the dip switch? Is it something like ifconfig wlan0 down; ifconfig wlan1 down; macchanger -A wlan0; macchanger -A wlan1; ifconfig wlan0 up; ifconfig wlan1 up I can't seem to find where they run in the boot order, though I must admit I haven't looked very hard, so maybe that's the issue. From the samples I've seen they seem to be executed quite late in the boot process. Why not associate a script with a dip switch, I have not played with the dip switches but would that not ensure a graceful interface reset with changes? It also means you can add ts lines to write out to a file and see what's happening... [sorry will have to try it myself later as work calls]
  2. Hey Anode, The following will do the job [although chriswhat's DIP switch/infusiion suggestion is interesting, must play around with those sometime soon] This comes from a similar script I use in kali with a few mods. create /etc/init.d/randhostnamemac #!/bin/bash ### BEGIN INIT INFO # Provides: randhostnamemac # Randomises hostname and MAC # placed in /etc/init.d. ### END INIT INFO #create hosts.old if not there if [ ! -a /etc/hosts.old ]; then cp /etc/hosts /etc/hosts.old fi #assign the variable newhn a random value as defined below newhn=$(cat /dev/urandom | tr -dc 'A-Za-z' | head -c8) #update hostname and hosts with new value echo $newhn > /etc/hostname echo "127.0.1.1 $newhn" > /etc/hosts cat /etc/hosts.old >> /etc/hosts #update uci uci set system.@system[0].hostname=$newhn uci commit system echo $(uci get system.@system[0].hostname) > /proc/sys/kernel/hostname #randomise MAC for wlan0 and wlan1 ifconfig wlan0 down ifconfig wlan1 down macchanger -A wlan0 macchanger -A wlan1 ifconfig wlan0 up ifconfig wlan1 up exit Then simply set it up to run on boot chmod +x /etc/init.d/randhostnamemac ln -s /etc/init.d/newhostname /etc/rc.d/S27randhostnamemac S27 will put it running after the network starts @ S20 Tested on a MK5 and seems fine .
×
×
  • Create New...