Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4423

Can someone please explain bind mounts to me?

$
0
0
I've been reading all over the web and still can't seem to get the info I want.

I want to make temporary changes to system files while a program is running.

For example, if I wanted to make a change to /usr/share/alsa/alsa.conf which is in the read-only system files, I want to "bind mount" and make a change to that file (with sed or whatever), then unmount it when I want. How do I do that?

I try:
touch alsa.conf
mount --bind /usr/share/alsa/alsa.conf alsa.conf
sed -ie s/cards.pcm.front/cards.pcm.default/g alsa.conf

error - cant move alsa.conf3ETwkI to alsa.conf -> obviously sed made a temp file and tried to move it to a read-only file.

Is this even possible? I'm thinking it's just the syntax I'm doing wrong?

edit: yep it's just the syntax. I made an edited rw file and can bind that to the ro system file.
ie: mount --bind bind/alsa.conf /usr/share/alsa/alsa.conf
that seems to work fine. I'll add it to my pianobar script...

Thanks anyway! :)

Viewing all articles
Browse latest Browse all 4423

Trending Articles