For the last two days whenever I added /opt/etc/init.d/S22static in either rcS or mount_optext2, none of the usb drive would mount after I reboot. I had to go into the file and delete the line. I don't know why that kept happening. I tested that if I manually typed /opt/etc/init.d/S22static and then ifconfig, I confirmed that the static ip was set so the S22static file worked.
I just rebooted after I added /opt/etc/init.d/S22static to mount_optext2 and somehow all the usb mounted so I have static IP! I was able to ssh into the pogoplug with the new static ip as well as the dynamic ip.
--- In email@example.com, "oddballhero" <oddballhero@...> wrote:
> Did you reboot after making those modifications? Where there any error messages while you were performing the modifications? Are you able to ssh back in to your plug after making those modifications?
> If you didn't reboot, then the modifications won't take place.
> If there were error messages, then the instructions probably were not carried out successfully.
> If you can't ssh back into your plug after making the modification and rebooting the plug, then you need to solve that problem first.
> If everything is working fine and you have a static ip, then you don't need to do anything.
> If everything is working fine and you don't have a static ip, then continue.
> What is described below is actually just a variation of that article you followed, except that if no usb drive is seen, then it acts "stock" obtaining the ip information with dhcp. All this adds is a statement after mounting the /opt drive to change to a static ip.
> The is just the same as typing on the command line "ifconfig eth0 192.168.xxx.xxx" where 192.168.xxx.xxx is the static ip address you desire. If you are still connected by ssh after typing above statement, you can verify this information by typing "ifconfig" which should show eth0 to have your desired static ip. If not, then the method below and that article you cited won't work.
> Do this at your own risk! No warranty implied.
> Be careful, modifying you rcS can "brick/break" the plug!
> If you don't feel comfortable doing this then don't.
> If you don't know how to edit the file, then don't.
> Make sure that you read everything below before doing anything and that you know how to perform the modifications. If not, don't.
> You should also make a backup of your rcS.
> A little trick is to leave the rcS as it is, so remove your modifications. Let "udhcpc" get most of the information and create the resolv.conf so that in case parameters change with your network, you can recover. Assuming you are using Optware, create a file in "/opt/etc/init.d called S22static, with the contents between the lines (you need to modify aaa.aaa with the pertinent information for your static ip and bbb.bbb with the pertinent information for your local dns server):
> /sbin/ifconfig eth0 192.168.aaa.aaa
> echo "nameserver 192.168.bbb.bbb" >> /tmp/resolv.conf
> ## Uncomment the lines below to activate Google's public name servers.
> #echo "nameserver 184.108.40.206" >> /tmp/resolv.conf
> #echo "nameserver 220.127.116.11" >> /tmp/resolv.conf
> You need to make this file executable with "chmod 755 /opt/etc/init.d/S22static".
> You then add the line "/opt/etc/init.d/S22static" after you mount your /opt usb drive. This way, if you boot up without the usb drive, it can still get the dhcp info like the stock setup, in case your network parameters change (change subnet, replace router, etc.).
> A problem you may have is that the instructions on that site you followed, probably deleted the soft link from "/etc/resolv.conf" to "/tmp/resolv.conf". Verify with "ls -l /etc/resolve.conf". It should look approximately like:
> lrwxrwxrwx 1 root root 16 Dec 31 1999 /etc/resolv.conf -> /tmp/resolv.conf
> The date and size does not matter. If not, you have to recreate the link.
> --- In firstname.lastname@example.org, "Jackie" wrote:
> > I followed this article but it didn't work
> > http://www.adrianandgenese.com/blogger/2010/07/15/how-to-set-a-static-ip-for-a-pogoplug-and-make-it-persistent/
> > Does anyone else have a way to give a static ip address to pogoplug?