Jump to content
OMRON Forums

Writing a file into /etc with powerpmac.deb


Bill
 Share

Recommended Posts

Hi,

 

I'm trying to make use of your handy PowerPmac thumbdrive installation folder. It all works, including setting the IP address and copying over my usrflash files.

 

The part that doesn't work is that I need to create a file called /etc/rc.local.

 

I made a powerpmac.deb file that properly installs this file, but on reboot, the file gets overwritten with the default rc.local.

 

So, I instead set powerpmac.deb to install the file in /.readonly/etc/rc.local. This simply doesn't work, probably (I'm guessing) because /.readonly is, well, read-only.

 

How do I get around this?

 

Or do I have to install the file "by hand" after using the thumbdrive trick. That would be a shame to require an extra step for our users.

 

Thanks for any suggestions.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The Power PMAC Linux installation keeps itself clean by mounting its file system as read only most of the time and copying the contents of “/.readonly/etc” and “/.readonly/var” to “/etc” and “/var” on power up. Before making changes the file system must be mounted as read/write and after making changes it must be set back to read only.

 

mount -o remount,rw /
cp /media/disk/rc.local /.readonly/etc/
mount -o remount,rw /

 

I believe this could be placed in a shell script on the USB stick and ran from the IDE terminal with a command like the following:

system /media/disk/file.sh

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...