[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[seul-edu] Re: Best wm for tiny slow computers?
On Wed, Feb 13, 2002 at 03:50:55PM -0500, Ralph M. Deal wrote:
> Yes, I've been warned by a KLUG member to make sure I have ALL the
> updates for RH6.2. I'd rather stick to RH just because I can easily
Then one more -- RH has *amazing* support for old releases (no
one beats them here), but any such support ends -- 3.0.3 is no
more, for example ;-) So if the installation is sort of massive,
consider difference in squeezing new distro on small disk versus
applying all updates. And again -- lots of things have changed
in *usability* aside of basic *security*.
PS: if you go after space, your best friends will be
# du / | sort -rn | less
and careful rm -rf in /usr/share.
Some kind of autosqueezer for RH5.1 is attached; PLEASE DO READ
it before running. You can safely ignore (or delete) stuff about
easy-cyrillic, it was locally specific ;-)
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ http://visa.chem.univ.kiev.ua/~mike/
#!/bin/bash
# Red Hat Linux 5.1 (Manhattan) doctor :)
# they at RedHat think we need just everything. But we often don't,
# especially those of us who are short of disk.
# And of course, our users *do* need to work with floppies and CDs
# So, I tried to make the script crawl out and fix some annoying things.
# Among them I'd like to implement these:
# - /usr cleanup (man, doc, share...)
# - colour ls \_ done by
# - .inputrc /~ EayCyrillic in fact
# - my own fd/CD scripts, together with
# - some /dev/fd* entries & permission fix
# - cyrillization of bash and mc at least...
# ...of course, this could only be run by root to accomplish.
EASYCYRILLIC="./easy-cyrillic"
TIMEREGION="Europe"
TIMEZONE="Kiev"
ask_yes ()
{
echo -n "$1 [Y/n]?"
read answer
case $answer in
n|N|no) OK=;; # empty string
*) OK=yes;; # just not empty :)
esac
}
ask_no ()
{
echo -n "$1 [N/y]?"
read answer
case $answer in
y|Y|yes) OK=yes;;
*) OK=;;
esac
}
clear
echo "I'm gonna clean your disk a bit. Here's your disk stats:"
df -h -t ext2
echo "I think there may be some extra files on your disk..."
ask_no "So, should I proceed"
if [ $OK ]; then
echo "Proceeding..."
else
echo "Maybe next time?"
exit 1
fi
echo
echo -n "Checking free space on root filesystem... "
STARTFREE=`df -h / |tail -n1|cut -c33-43`
echo $STARTFREE
echo "Entering /usr..."
cd /usr
echo -n " /usr/man: online manual pages -- "
du -h man|tail -n1|cut -f1
if [ -d man ]; then
ask_yes " Should we gzip manual pages (don't worry, man _will_ understand)"
if [ $OK ];then
echo " /usr/man -- gzipping man pages"
gzip man/man?/*
else
echo " OK, leaving them alone"
fi
else
echo "Nothing to be done for /usr/man"
fi
echo
echo -n " /usr/share: some collection of spare info -- "
du -h share|tail -n1|cut -f1
echo " We can shrink it a bit by removing extra timezone/terminfo/locale files"
ask_yes " So, let's do it"
if [ $OK ]; then
cd /usr/share
echo " /usr/share/zoneinfo: time zones all around the world! But if you live in"
echo -n " $TIMEZONE, $TIMEREGION, you can do without rest which takes "
du -h zoneinfo|tail -n1|cut -f1
ask_yes " Remove extra timezone info"
if [ $OK ]; then
cd zoneinfo
for i in *; do
if [ -d $i ]; then # this is a directory
echo -n " >$i... "
cd $i
if [ $i = $TIMEREGION ]; then # ...e.g. "Europe"
echo -n " aha!.. "
for j in *; do
if [ $j != $TIMEZONE ]; then
rm -f $j
fi
done
cd ..
echo "cleaned up."
else
rm -f *
cd ..
rmdir $i
echo "bye."
fi
else # then maybe a file?..
rm -f $i
fi
done
cd ..
echo -n " So, now it wants "
du -h zoneinfo|tail -n1|cut -f1 # We've just cleaned it up...
else
echo "Yes sir."
fi
else
echo "Nothing to be done for /usr/share"
fi
if [ -f $EASYCYRILLIC.tgz ]; then
echo
echo "Let's install Easy Cyrillic! It's COOL, COOL, COOL!"
echo "Since it allows us to use cp866, koi8, and (under tortures) cp1251"
echo "and uses various swicher-keys"
ask_yes "So, OK to install"
if [ $OK ]; then
echo "Installing, installing, installing!"
tar zxf $EASYCYRILLIC.tgz
$EASYCYRILLIC/Install.me
else
echo "You'll be back. EC is nice."
fi
else
echo "-----------------------------------------------------------"
echo "There should be $EASYCYRILLIC.tgz here, but I can't see it."
echo "I was relying a bit on it! (because it's worthy)."
echo "I recommend you to get & set it up ASAP!"
echo "-----------------------------------------------------------"
fi
PGP signature