檢查是用那一個config 檔算是一種方法。
#! /bin/bash
if [ -e /etc/grub.conf ]; then
echo "grub is the boot manager."
elif [ -e /etc/lilo.conf ] ; then
echo "lilo is the boot manager."
else
echo "others."
fi
[quote:345102b1b9="twf_cc"]檢查是用那一個config 檔算是一種方法。
#! /bin/bash
if [ -e /etc/grub.conf ]; then
echo "grub is the boot manager."
elif [ -e /etc/lilo.conf ] ; then
echo "lilo is the boot manager."
else
echo "others."
fi[/quote]
兄弟,不同版本不一样。据我所知的linux版本都将grub.conf放在/boot/grub/下面,甚至根本就没有grub.conf这个文件