View Single Post
Old 12-30-2010, 05:49 PM   #5
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by thatsme View Post
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]
I was simply trying to copy a modified version over with WinSCP. I didn't know you had to stop/start it with /etc/init.d/powerd stop/start.
kranu is offline   Reply With Quote