用脚本修改UBUNTU源为archive.ylmf.net
vi ylmf-apt.sh
#!/bin/bash
#power by hugwww
#change apt source
#ubuntu 8.04
if [ $(cat /etc/lsb-release |grep "\
then
CODENAME=”hardy”
fi
#ubuntu 8.10
if [ $(cat /etc/lsb-release |grep "\
then
CODENAME=”intrepid”
fi
#ubuntu 9.04
if [ $(cat /etc/lsb-release |grep "\
then
CODENAME=”jaunty”
fi
#ubuntu 9.10
if [ $(cat /etc/lsb-release |grep "\
then
CODENAME=”karmic”
fi
#back old source,update to ylmf ubuntu source
if [ $CODENAME ]
then
msg=”#ylmf ubuntu apt source 2009-09-09 update:`date` \n\n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME main restricted \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME main restricted \n\
\n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME-updates main restricted \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME-updates main restricted \n\
\n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME universe \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME universe \n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME-updates universe \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME-updates universe \n\
\n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME multiverse \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME multiverse \n\
deb http://archive.ylmf.net/ubuntu/ $CODENAME-updates multiverse \n\
deb-src http://archive.ylmf.net/ubuntu/ $CODENAME-updates multiverse \n\
\n\
deb http://security.ubuntu.com/ubuntu $CODENAME-security main restricted \n\
deb-src http://security.ubuntu.com/ubuntu $CODENAME-security main restricted \n\
deb http://security.ubuntu.com/ubuntu $CODENAME-security universe \n\
deb-src http://security.ubuntu.com/ubuntu $CODENAME-security universe \n\
deb http://security.ubuntu.com/ubuntu $CODENAME-security multiverse \n\
deb-src http://security.ubuntu.com/ubuntu $CODENAME-security multiverse \n”
#echo -e $msg
cp /etc/apt/sources.list /etc/apt/sources.list-bak
echo $msg >/etc/apt/sources.list
echo “已更改为ylmf ubuntu源!”
fi
完成!
七月 26th, 2011 at 08:52
Great website…
[...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]………