If editing files in Windows, with normal Windows editors, won't there be possible problems with line endings when trying to run them on the Pi? May be a good idea to suggest a suitable editor that can produce files with Linux compatible line endings. I use an editor - notepad++,
http://notepad-plus-plus.org/ - which I quite like.
On a rather different note, back in the good old days of squeeze there was a file in the /boot directory - boot_enable_ssh.rc - which if renamed to boot.rc would run and enable SSH. In those days SSH was not enabled by default. Editing this file and you can do all sorts of things including installing wifi.
Unfortunately this file is not included in images these days or it would be possible to install wifi without having to edit or install anything on the Pi by hand, it can automatically be done at boot time by installing any needed files in the boot directory and setting up boot.rc as needed when the image is created, in my case on my Windows laptop.
I have been playing with this and modified one of my SD cards to run boot.rc by editing /etc/rc.local to include a call to it. I have been able to get wifi running by setting up boot.rc to copy a suitably set up interfaces file put in the /boot directory to /etc/network/interfaces. I haven't bother with wpa_supplicant but setting up wpa_supplicant.conf should be no different I think. I have also got it to install a driver, which also included downloading it from dropbox, for a module using the realtek 8188eu and bring up the drive on the first boot of a new image on a B Pi. Would be good for getting wifi up on the model A Pi if all needed files were in the /boot directory when first booted as no connection to the internet or anything else is needed, no display, keyboard etc.
As an example here is the modified /etc/rc.local including the call to boot.rc copied from an old version of code
Code: Select all
pi@raspberrypi ~ $ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
if [ -x /boot/boot.rc ]; then
# note the user could easily try to make or edit this file in Windows
# this will give it the wrong line endings and may result in errors
# we try to discourage this my not making it a .txt file
. /boot/boot.rc
fi
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0
pi@raspberrypi ~ $
and an example of boot.rc used to set up /etc/network/interfaces and stuff to download a driver module, commented out here, as an example of what is possible
Code: Select all
pi@raspberrypi ~ $ cat /boot/boot.rc
# sourced from rc.local on Raspberry Pi
#
# Name this file as "boot.rc" and put it on the boot partition if you want to run it.
# echo "Checking if interfaces is installed"
if [ -x /boot/interfaces ] ; then
mv -f /boot/interfaces /etc/network/
# wget https://dl.dropboxusercontent.com/u/80256631/8188eu-20130209.tar.gz
# tar -zxvf 8188eu-20130209.tar.gz
# install -p -m 644 8188eu.ko /lib/modules/3.6.11+/kernel/drivers/net/wireless
# rm 8188eu*
# insmod /lib/modules/3.6.11+/kernel/drivers/net/wireless/8188eu.ko
# depmod -a
reboot
fi
pi@raspberrypi ~ $
Pretty crude but it works. Now if only current images made the call to boot.rc .... Something to think about maybe.
MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Please post ALL technical questions on the forum. Please Do Not send private messages.