I needed the ability to run a bash script after inserting a USB flash drive into a debian box. This can quite easily be achieved using UDEV rules.
Cooking and heating stuff
Being prepared or overreacting?
NAS space getting low
Add Wireless To The Raspberry Pi
I had bit of a nightmare getting wireless to work properly so I put together this howto hoping it will help others. This was done on a raspberry pi running raspbian (wheezy).
sudo apt-get install wireless-tools wpasupplicantget your psk using the following command where yourssid is your SSID’s name ie HOME and where passphrase is your wireless password ie PASSWORD123 wpa_passphrase yourssid yourpassphrase
Using my examples above this should output the following
network={
ssid="HOME"
#psk="PASSWORD123"
psk=57d9fbb3d0e8eed3bd17d76a61805e2c4b73a81d1686debeaf44559d8bc15800 }
From this copy the psk string then
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1network={
ssid=”HOME”scan_ssid=1
psk=57d9fbb3d0e8eed3bd17d76a61805e2c4b73a81d1686debeaf44559d8bc15800
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
sudo nano /etc/network/interfaces and add the following (obviously adjust it to your network setup ie static etc), save and exitauto loiface lo inet loopbackiface eth0 inet dhcpallow-hotplug wlan0iface wlan0 inet dhcppre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -Bsudo nano /etc/default/ifplugd and add the following # This file may be changed either manually or by running dpkg-reconfigure.## N.B.: dpkg-reconfigure deletes everything from this file except for# the assignments to variables INTERFACES, HOTPLUG_INTERFACES, ARGS and# SUSPEND_ACTION. When run it uses the current values of those variables# as their default values, thus preserving the administrator's changes.## This file is sourced by both the init script /etc/init.d/ifplugd and# the udev script /lib/udev/ifplugd.agent to give default values.# The init script starts ifplugd for all interfaces listed in# INTERFACES, and the udev script starts ifplugd for all interfaces# listed in HOTPLUG_INTERFACES. The special value all starts one# ifplugd for all interfaces being present.INTERFACES=""HOTPLUG_INTERFACES="wlan0 eth0"ARGS="-q -f -u0 -d10 -w -I"SUSPEND_ACTION="stop"Save and exit then reboot and hopefully your wireless interface will be bought up and connect successfully.
Cam
Pogoplug
Thecus Woes
Debian on Thecus N2100 NAS
Linksys WRT54G Hacking Part 4 – Changing The Firmware
When my linksys arrived it was already running a non stock firmware Tomato Version 1.27vpn3.6.4b664ba6 now as a previous user of dd-wrt I decided I would go back to that. First off it's a bad idea to go from one non stock f/w to another, stock to non stock gives you the best chance of an upgrade without bricking.
So I followed this procedure
Hard Reset (aka 30/30/30 reset):
The following procedure will clear out the NVRAM and set dd-wrt back to default values:
- With the unit powered on, press and hold the reset button on back of unit for 30 seconds
- Without releasing the reset button, unplug the unit and hold reset for another 30 seconds
- Plug the unit back in STILL holding the reset button a final 30 seconds
I downgraded back to stock WRT54GSv3_4.71.4.001_fw did the 30/30/30 again then upgraded to dd-wrt.v24_mini_generic however I found it didn't had support for SD cards in it which is a future mod I have planned so again I did a 30/30/30 and downgraded back to stock before reupgrading to dd-wrt.v24_std_generic
One of the first things I did was enable SSHD via the 'services' tab however when I clicked apply setting my browser was forwarded to a blank white screen @ http://192.168.1.1/applyuser.cgi I tried the same again in a different browser and it worked fine, it may have been a remnants of an old session cookie or something.