转载:https://blog.csdn.net/dotjar/article/details/84810624
# -f 文件存在
if[ -f /etc/sysconfig/network ]; then
./etc/sysconfig/network
fi
# -z 字串为空/ -o or / -a and
if[ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then
HOSTNAME=localhost
fi
# !
if [ ! -e /proc/mounts ]; then
mount -n -t proc /proc /proc
fi
# -d 目录存在
if [ ! -d /proc/bus/usb ]; then
modprobe usbcore >/dev/null 2>&1
else
mount ...
fi