View Single Post
Old 12-30-2010, 07:26 AM   #3
thatsme
Junior Member
thatsme began at the beginning.
 
Posts: 2
Karma: 14
Join Date: Dec 2010
Device: none
You don't state an exact error message, so it's hard to say what went wrong. I'm guessing that either the root fs wasn't mounted rw, or you tried to edit the file in place instead of replacing it, and the daemon was still running at that point. Personally, I'd replace the file atomically from a copy.

Code:
# mntroot rw
# /etc/init.d/powerd stop

# cd /mnt/us
/mnt/us# cp /usr/bin/powerd powerd-backup # just to be safe
/mnt/us# cp /usr/bin/powerd powerd-modified
# edit powerd-modified

/mnt/us# mv powerd-modified /usr/bin/powerd #replaces the file atomically, even if the daemon were still running
# /etc/init.d/powerd start
# mntroot ro
[edited for various typos]

Last edited by thatsme; 12-30-2010 at 11:10 AM.
thatsme is offline   Reply With Quote