Arch linux setting script
Linux/내부설정 2006. 6. 23. 22:19
#!/bin/bash
user=1
Or=1
nu=x
wi=1
if(($UID != "0")); then
echo "sorry, You are not ROOT ,Root Login please"
fi
while [ "$Or" != "y" ] ; do
echo -n "User ID?:"
read user
echo -n "$user Right? y or n:"
read Or
done
clear
echo "ADD USER"
adduser $user
clear
echo "ROOT Passwd"
passwd
clear
echo "Pacman Update"
pacman -Suy
clear
echo "ALL Update"
pacman -Suy
clear
echo "Date Setup Please Wait"
pacman -S rdate
cp /etc/rc.conf /etc/rc.conf.org
sed -e 's/TIMEZONE=Canada\/Pacific/TIMEZONE=Asia\/Seoul/g' /etc/rc.conf > /etc/rc.conf.ok
rdate -p time.bora.net
mv /etc/rc.conf.ok /etc/rc.conf
clear
echo "xorg.conf..."
pacman -S xorg hwd
hwd -x
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.tmp
mv /etc/X11/xorg.conf.hwd /etc/X11/xorg.conf
clear
echo "Nvidia Driver Setting"
pacman -S ati-fglrx
aticonfig --initial --input=/etc/X11/xorg.conf
echo "What do you Want resoultion?"
echo -n "1:1024x768 2:1280x1024 3:1600x1200 :"
read nu
if(( $nu == "1" )); then
aticonfig --resolution=1024x768
elif(( $nu == "2" )); then
aticonfig --resolution=1280x1024
elif(( $nu == "3" )); then
aticonfig --resolution=1600x1200
fi
clear
echo -n "5.1 channel Setting... continue? y|n"
read Or
if (( $Or == "y" )); then
echo "pcm.!default {" > /home/$user/.asoundrc
echo "type route" >> /home/$user/.asoundrc
echo "slave.pcm surround51" >> /home/$user/.asoundrc
echo "slave.channels 6" >> /home/$user/.asoundrc
echo "ttable.0.0 1" >> /home/$user/.asoundrc
echo "ttable.1.1 1" >> /home/$user/.asoundrc
echo "ttable.0.2 1" >> /home/$user/.asoundrc
echo "ttable.1.3 1" >> /home/$user/.asoundrc
echo "ttable.0.4 0.5" >> /home/$user/.asoundrc
echo "ttable.1.4 0.5" >> /home/$user/.asoundrc
echo "ttable.0.5 0.5" >> /home/$user/.asoundrc
echo "ttable.1.5 0.5" >> /home/$user/.asoundrc
echo "}" >> /home/$user/.asoundrc
echo "Compleat"
fi
clear
echo "Alsa config"
pacman -S alsa-lib alsa-utils
mv /etc/modprobe.conf /etc/modprobe.conf.org
echo -n "Sound Card in your computer? y|n:"
read Or
if(( $Or == "y" )); then
modprobe snd_intel8x0
fi
alsaconf
gpasswd -a $user audio
amixer set Master 75 unmute
amixer set PCM 75 unmute
alsamixer
alsactl store
echo "/usr/sbin/alsactl restore" >> /etc/rc.local
clear
echo "locale Setting"
localedef -cvi ko_KR -f UTF-8 ko_KR.utf8
cp /etc/rc.conf /etc/rc.conf.tmp
echo "Arch Linux Version?"
echo -n "1. 0.71(Noodle) 2. 0.72(Gimmick) Else NOT SETTING:"
read nu
cp /etc/rc.conf /etc/rc.conf.org
if (( $nu == "1" )); then
sed -e 's/LOCALE=/LOCALE=ko_KR.UTF-8/g' /etc/rc.conf > /etc/rc.conf.ok
fi
if (( $nu == "2" )); then
sed -e 's/en_US.utf8/ko_KR.UTF-8/g' /etc/rc.conf > /etc/rc.conf.ok
fi
mv /etc/rc.conf.ok /etc/rc.conf
pacman -S scim scim-hangul
cp /etc/rc.local /etc/rc.local.tmp
echo setkeycodes 71 122 >> /etc/rc.local
echo setkeycodes 72 123 >> /etc/rc.local
cp /home/$user/.bash_profile.tmp
echo export XMODIFIERS=@im=SCIM >> /home/$user/.bash_profile
echo export GTK_IM_MODULE=scim >> /home/$user/.bash_profile
echo export QT_IM_MODULE=scim >> /home/$user/.bash_proflile
mv /home/$user/.Xmodmap /home/$user/.Xmodmap.tmp
echo xmodmap -e '"keycode 210 = Hangul"' > /home/$user/.Xmodmap
echo xmodmap -e '"keycode 209 = Hangul_Hanja"' >> /home/$user/.Xmodmap
chmod 777 /home/$user/.Xmodmap
wget http://lowid.mireene.com/Eunjin.ttf
mv Eunjin.ttf /usr/share/fonts/TTF
wget http://kldp.net/frs/download.php/1547/ttf-unfonts-1.0-1.pkg.tar.gz
tar -xvzf ttf-unfonts-1.0-1.pkg.tar.gz
mkdir /usr/share/fonts/unfonts
cp ./usr/X11R6/lib/X11/fonts/ttf-unfonts/* /usr/share/fonts/unfonts
rm -rf usr ttf-unfonts-1.0-1.pkg.tar.gz
fc-cache
clear
echo "Windows Partition "
echo -n "Do you Want Setting for windows? y|n: "
read Or
if(( $Or == "y")); then
echo "title Windows" >> /boot/grub/menu.lst
echo "root (hd0,0)" >> /boot/grub/menu.lst
echo "makeactive" >> /boot/grub/menu.lst
echo "chainloader +1" >> /boot/grub/menu.lst
mkdir /mnt/win
echo "/dev/hda1 /mnt/win ntfs user,ro,nls=utf8,umask=0000 0 0" >> /etc/fstab
fi
clear
echo -n "Do you Want Setting for X? y|n:"
read Or
if(( "$Or" == "y")); then
echo "Chice ......."
echo -n "1.Gnome 2,Kde 3.fluxbox 4.xfce else->exit"
read nu
cp /home/$user/.xinitrc /home/$user/xinitrc.tmp
sed -e 's/exec wmaker/\#exec wmaker/g' /home/$user/.xinitrc > /home/$user/.xinitrc.ok
mv /home/$user/.xinitrc.ok /home/$user/.xinitrc
if(( $nu == "1")); then
pacman -S gnome
echo "exec gnome" >> /home/$user/.xinitrc
fi
if(( $nu == "2")); then
pacman -S kde
echo "exec kde" >> /home/$user/.xinitrc
fi
if(( $nu == "3")); then
pacman -S fluxbox
echo "exec fluxbox" >> /home/$user/.xinitrc
fi
if(( $nu == "4")); then
pacman -S xfce4
echo "exec xfce4" >> /home/$user/.xinitrc
fi
fi
clear
echo -n "AutoLogin----? y|n:"
read Or
if(( "$Or" == "y")); then
sed -e 's/id:3:initdefault:/id:5:initdefault:/g' /etc/inittab > /etc/inittab.ok
mv /etc/inittab.ok /etc/inittab
sed -e 's/x:5:respawn:\/usr\/X11R6\/bin\/xdm-nodaemon/x:5:once:\/bin\/su lowid -l -c "\/bin\/bash --login -c startx>\/dev\/null 2>\/dev\/null"/g' /etc/inittab > /etc/inittab.ok2
sed -e 's/x:5:respawn:\/usr\/bin\/xdm-nodaemon/x:5:once:\/bin\/su lowid -l -c "\/bin\/bash --login -c startx>\/dev\/null 2>\/dev\/null"/g' /etc/inittab > /etc/inittab.ok2
mv /etc/inittab.ok2 /etc/inittab
fi
clear
echo "Install Firefox...."
pacman -S mozilla-firefox flashplugin
clear
echo "Internet Aplication 1.gaim"
pacman -S gaim
clear
echo "Internet Aplication 2.xchat"
pacman -S xchat
clear
echo "Internet Aplication 3.amule"
pacman -S amule
clear
echo "Install Mplayer-svn"
pacman -S libmad cdparanoia codecs sdl xvidcore lame libtheora faad2 subversion pkgconfig
wget http://aur.archlinux.org/packages/mplayer-svn/mplayer-svn/PKGBUILD
makepkg
pacman -A mplayer-svn*.pkg.tar.gz
pacman -S mplayer-plugin
echo "All Finish! REBOOT!"
reboot
user=1
Or=1
nu=x
wi=1
if(($UID != "0")); then
echo "sorry, You are not ROOT ,Root Login please"
fi
while [ "$Or" != "y" ] ; do
echo -n "User ID?:"
read user
echo -n "$user Right? y or n:"
read Or
done
clear
echo "ADD USER"
adduser $user
clear
echo "ROOT Passwd"
passwd
clear
echo "Pacman Update"
pacman -Suy
clear
echo "ALL Update"
pacman -Suy
clear
echo "Date Setup Please Wait"
pacman -S rdate
cp /etc/rc.conf /etc/rc.conf.org
sed -e 's/TIMEZONE=Canada\/Pacific/TIMEZONE=Asia\/Seoul/g' /etc/rc.conf > /etc/rc.conf.ok
rdate -p time.bora.net
mv /etc/rc.conf.ok /etc/rc.conf
clear
echo "xorg.conf..."
pacman -S xorg hwd
hwd -x
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.tmp
mv /etc/X11/xorg.conf.hwd /etc/X11/xorg.conf
clear
echo "Nvidia Driver Setting"
pacman -S ati-fglrx
aticonfig --initial --input=/etc/X11/xorg.conf
echo "What do you Want resoultion?"
echo -n "1:1024x768 2:1280x1024 3:1600x1200 :"
read nu
if(( $nu == "1" )); then
aticonfig --resolution=1024x768
elif(( $nu == "2" )); then
aticonfig --resolution=1280x1024
elif(( $nu == "3" )); then
aticonfig --resolution=1600x1200
fi
clear
echo -n "5.1 channel Setting... continue? y|n"
read Or
if (( $Or == "y" )); then
echo "pcm.!default {" > /home/$user/.asoundrc
echo "type route" >> /home/$user/.asoundrc
echo "slave.pcm surround51" >> /home/$user/.asoundrc
echo "slave.channels 6" >> /home/$user/.asoundrc
echo "ttable.0.0 1" >> /home/$user/.asoundrc
echo "ttable.1.1 1" >> /home/$user/.asoundrc
echo "ttable.0.2 1" >> /home/$user/.asoundrc
echo "ttable.1.3 1" >> /home/$user/.asoundrc
echo "ttable.0.4 0.5" >> /home/$user/.asoundrc
echo "ttable.1.4 0.5" >> /home/$user/.asoundrc
echo "ttable.0.5 0.5" >> /home/$user/.asoundrc
echo "ttable.1.5 0.5" >> /home/$user/.asoundrc
echo "}" >> /home/$user/.asoundrc
echo "Compleat"
fi
clear
echo "Alsa config"
pacman -S alsa-lib alsa-utils
mv /etc/modprobe.conf /etc/modprobe.conf.org
echo -n "Sound Card in your computer? y|n:"
read Or
if(( $Or == "y" )); then
modprobe snd_intel8x0
fi
alsaconf
gpasswd -a $user audio
amixer set Master 75 unmute
amixer set PCM 75 unmute
alsamixer
alsactl store
echo "/usr/sbin/alsactl restore" >> /etc/rc.local
clear
echo "locale Setting"
localedef -cvi ko_KR -f UTF-8 ko_KR.utf8
cp /etc/rc.conf /etc/rc.conf.tmp
echo "Arch Linux Version?"
echo -n "1. 0.71(Noodle) 2. 0.72(Gimmick) Else NOT SETTING:"
read nu
cp /etc/rc.conf /etc/rc.conf.org
if (( $nu == "1" )); then
sed -e 's/LOCALE=/LOCALE=ko_KR.UTF-8/g' /etc/rc.conf > /etc/rc.conf.ok
fi
if (( $nu == "2" )); then
sed -e 's/en_US.utf8/ko_KR.UTF-8/g' /etc/rc.conf > /etc/rc.conf.ok
fi
mv /etc/rc.conf.ok /etc/rc.conf
pacman -S scim scim-hangul
cp /etc/rc.local /etc/rc.local.tmp
echo setkeycodes 71 122 >> /etc/rc.local
echo setkeycodes 72 123 >> /etc/rc.local
cp /home/$user/.bash_profile.tmp
echo export XMODIFIERS=@im=SCIM >> /home/$user/.bash_profile
echo export GTK_IM_MODULE=scim >> /home/$user/.bash_profile
echo export QT_IM_MODULE=scim >> /home/$user/.bash_proflile
mv /home/$user/.Xmodmap /home/$user/.Xmodmap.tmp
echo xmodmap -e '"keycode 210 = Hangul"' > /home/$user/.Xmodmap
echo xmodmap -e '"keycode 209 = Hangul_Hanja"' >> /home/$user/.Xmodmap
chmod 777 /home/$user/.Xmodmap
wget http://lowid.mireene.com/Eunjin.ttf
mv Eunjin.ttf /usr/share/fonts/TTF
wget http://kldp.net/frs/download.php/1547/ttf-unfonts-1.0-1.pkg.tar.gz
tar -xvzf ttf-unfonts-1.0-1.pkg.tar.gz
mkdir /usr/share/fonts/unfonts
cp ./usr/X11R6/lib/X11/fonts/ttf-unfonts/* /usr/share/fonts/unfonts
rm -rf usr ttf-unfonts-1.0-1.pkg.tar.gz
fc-cache
clear
echo "Windows Partition "
echo -n "Do you Want Setting for windows? y|n: "
read Or
if(( $Or == "y")); then
echo "title Windows" >> /boot/grub/menu.lst
echo "root (hd0,0)" >> /boot/grub/menu.lst
echo "makeactive" >> /boot/grub/menu.lst
echo "chainloader +1" >> /boot/grub/menu.lst
mkdir /mnt/win
echo "/dev/hda1 /mnt/win ntfs user,ro,nls=utf8,umask=0000 0 0" >> /etc/fstab
fi
clear
echo -n "Do you Want Setting for X? y|n:"
read Or
if(( "$Or" == "y")); then
echo "Chice ......."
echo -n "1.Gnome 2,Kde 3.fluxbox 4.xfce else->exit"
read nu
cp /home/$user/.xinitrc /home/$user/xinitrc.tmp
sed -e 's/exec wmaker/\#exec wmaker/g' /home/$user/.xinitrc > /home/$user/.xinitrc.ok
mv /home/$user/.xinitrc.ok /home/$user/.xinitrc
if(( $nu == "1")); then
pacman -S gnome
echo "exec gnome" >> /home/$user/.xinitrc
fi
if(( $nu == "2")); then
pacman -S kde
echo "exec kde" >> /home/$user/.xinitrc
fi
if(( $nu == "3")); then
pacman -S fluxbox
echo "exec fluxbox" >> /home/$user/.xinitrc
fi
if(( $nu == "4")); then
pacman -S xfce4
echo "exec xfce4" >> /home/$user/.xinitrc
fi
fi
clear
echo -n "AutoLogin----? y|n:"
read Or
if(( "$Or" == "y")); then
sed -e 's/id:3:initdefault:/id:5:initdefault:/g' /etc/inittab > /etc/inittab.ok
mv /etc/inittab.ok /etc/inittab
sed -e 's/x:5:respawn:\/usr\/X11R6\/bin\/xdm-nodaemon/x:5:once:\/bin\/su lowid -l -c "\/bin\/bash --login -c startx>\/dev\/null 2>\/dev\/null"/g' /etc/inittab > /etc/inittab.ok2
sed -e 's/x:5:respawn:\/usr\/bin\/xdm-nodaemon/x:5:once:\/bin\/su lowid -l -c "\/bin\/bash --login -c startx>\/dev\/null 2>\/dev\/null"/g' /etc/inittab > /etc/inittab.ok2
mv /etc/inittab.ok2 /etc/inittab
fi
clear
echo "Install Firefox...."
pacman -S mozilla-firefox flashplugin
clear
echo "Internet Aplication 1.gaim"
pacman -S gaim
clear
echo "Internet Aplication 2.xchat"
pacman -S xchat
clear
echo "Internet Aplication 3.amule"
pacman -S amule
clear
echo "Install Mplayer-svn"
pacman -S libmad cdparanoia codecs sdl xvidcore lame libtheora faad2 subversion pkgconfig
wget http://aur.archlinux.org/packages/mplayer-svn/mplayer-svn/PKGBUILD
makepkg
pacman -A mplayer-svn*.pkg.tar.gz
pacman -S mplayer-plugin
echo "All Finish! REBOOT!"
reboot
'Linux > 내부설정' 카테고리의 다른 글
하드 디스크 속도 향상시키기 (2) | 2006.07.29 |
---|---|
UTF-8 에서 한글 Manpage 가 됩니다!!!! (5) | 2006.06.27 |
파이어 폭스 폰트(설정에서 안바뀌는) 변경 (0) | 2006.06.22 |
X에서 unknown hostname에러 ㅡㅜ (0) | 2006.06.17 |
ie4linux 에서 Wine Prefix error 날때 해결책 (0) | 2006.06.14 |