Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: how to make the file in /usr/lib writable< Next Oldest | Next Newest >
yss Offline





Group: Members
Posts: 4
Joined: April 2005
Posted: April 15 2005,07:57 QUOTE

updating the /usr/lib file it claim the file inside /usr/lib is only read-file and unable to write. Any opinion?
Back to top
Profile PM 
tronik Offline





Group: Members
Posts: 182
Joined: Dec. 2004
Posted: April 15 2005,16:44 QUOTE

From mikshaw:
Quote

Messing around with cbagger's mkwriteable script, and came up with something that allows the user to specify which directories to open up. I figure this could be useful for someone who is sensitive to RAM usage but also wants to be able to write to a particular directory or directories.

This hasn't been thoroughly tested, but it seems to work.


#!/bin/bash
ARGS=$@
checkfile=/etc/sysconfig/writeable2
grep ^all $checkfile && exit
do_bin() {
cp -srd /KNOPPIX/bin/ /ramdisk
ln -sf /ramdisk/bin /
echo "bin" >> $checkfile
}
do_boot() {
cp -srd /KNOPPIX/boot/ /ramdisk
ln -sf /ramdisk/boot /
echo "boot" >> $checkfile
}
do_lib() {
cp -srd /KNOPPIX/lib/ /ramdisk
ln -sf /ramdisk/lib /
echo "lib" >> $checkfile
}
do_sbin() {
cp -srd /KNOPPIX/sbin/ /ramdisk
ln -sf /ramdisk/sbin /
echo "sbin" >> $checkfile
}
do_usr() {
cp -srd /KNOPPIX/usr/ /ramdisk
ln -sf /ramdisk/usr/X11R6/lib/X11 /ramdisk/usr/lib/
ln -sf /ramdisk/usr /
echo "usr" >> $checkfile
}
do_all() {
grep ^bin $checkfile || do_bin
grep ^boot $checkfile || do_boot
grep ^lib $checkfile || do_lib
grep ^sbin $checkfile || do_sbin
grep ^usr $checkfile || do_usr
cp -srd /KNOPPIX/var/cache/apt/ /ramdisk/var/cache
rm -rf /ramdisk/var/cache/apt/archives/lock
cp /KNOPPIX/var/cache/apt/archives/lock /ramdisk/var/cache/apt/archives
rm -rf /ramdisk/var/lib/apt
cp -srd /KNOPPIX/var/lib/apt/ /ramdisk/var/lib
rm -f /var/lib/dpkg
echo "all" > $checkfile
exit
}
[ ! "$ARGS" ] && do_all
for arg in bin boot lib sbin usr; do
check_args=`echo $ARGS | grep -w $arg`
check_done=`grep ^$arg $checkfile`
if [ "$check_args" ]; then
[ ! "$check_done" ] && do_$arg
fi
done

If the script is launched with no arguments, it should behave in basically the same way as the original.

Arguments are
bin
boot
lib
sbin
usr


--------------
-william
atlanta, GA, USA

DSL 1.0+2.4.27/sata : P4 2.4norwood : 512ddr2 : nvgf4ti4200-64 : 128mbLexar Jumpdrive Elite
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: April 15 2005,23:19 QUOTE

Or if you are not so RAM-restricted, the included mkwriteable script is in /etc/init.d
Run it with "sudo /etc/init.d/mkwriteable" or boot with the "write" option.

With either script you will probably need to delete the symlink of the desired file in /usr/lib and copy it over from /KNOPPIX/usr/lib before it can be edited.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
2 replies since April 15 2005,07:57 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: how to make the file in /usr/lib writable

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code