Created
March 4, 2012 00:09
-
-
Save roktas/1969200 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
CONFFILE="/etc/default/grub" | |
[ $(id -u) -eq 0 ] || { echo >&2 "Betiği sudo ile çalıştırın"; exit 1; } | |
[ -f "$CONFFILE" ] || { echo >&2 "$CONFFILE dosyası bulunamadı."; exit 1; } | |
if grep -q bootchartd "$CONFFILE"; then | |
sed -ie 's!\s\+init=/sbin/bootchartd!!g' "$CONFFILE" | |
cat >&2 <<-EOF | |
******************************************************************************** | |
Bootchart önyüklemede etkin DEĞİL. Şimdi önyükleme kaydı güncellenecek. | |
******************************************************************************** | |
EOF | |
elif grep -q "^GRUB_CMDLINE_LINUX_DEFAULT=" "$CONFFILE"; then | |
[ -x /sbin/bootchartd ] || apt-get -y install bootchart bootchart-view | |
sed -ie 's!^\(GRUB_CMDLINE_LINUX_DEFAULT=.*\)"$!\1 init=/sbin/bootchartd"!g' "$CONFFILE" | |
cat >&2 <<-EOF | |
******************************************************************************** | |
Bootchart önyüklemede etkin. Şimdi önyükleme kaydı güncellenecek. | |
Güncelleme sonrasında makineyi yeniden başlatın ve açılıştan sonra bir | |
terminal açarak aşağıdaki komutu çalıştırın: | |
sudo bootchart | |
Bu komutla üretilen bootchart.png imajını http://imgur.com servisine yükleyin | |
ve linki incelenmek üzere paylaşın. | |
DİKKAT! Tüm işlemler tamamlandıktan sonra Bootchart'ın artık önyüklemede | |
yüklenmesi gerekmiyor. Bu betiği tekrar çalıştırarak bootchart kaydını | |
silin. | |
******************************************************************************** | |
EOF | |
else | |
echo >&2 "GRUB_CMDLINE_LINUX_DEFAULT ayarı bulunamadı." | |
exit 1 | |
fi | |
update-grub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment