|
下面是红旗的autorun文件
我想:它的作用是选择一个rpm程序,但不知道还有其它作用吗?
还有,我不了解2> /dev/null是什么作用。
希望兄弟们多多讨论,让我多了解一些...
#!/bin/sh
#
# Autorun script for Red Flag Linux
# Copyright (c) 1999 Red Flag Inc.
kwmpid=`/sbin/pidof kwm`
kwinpid=`/sbin/pidof ksmserver`
Xrpm=`/usr/bin/which Xrpm` 2> /dev/null
kpackage=`/usr/bin/which kpackage` 2> /dev/null
gnorpm=`/usr/bin/which gnorpm-auth` 2> /dev/null
if [ -d /mnt/cdrom ]; then
cd /mnt/cdrom
fi
if [ "$kwmpid" = "" ] && [ "$kwinpid" = "" ] ; then
#if [ "$kwmpid" = "" ] ; then
# they are running GNOME most likely, use gnorpm
if [ ! "$gnorpm" = "" ]; then
$gnorpm
elif [ ! "$Xrpm" = "" ]; then
$Xrpm
elif [ ! "$kpackage" = "" ]; then
$kpackage
fi
else
if [ ! "$Xrpm" = "" ]; then
$Xrpm
elif [ ! "$kpackage" = "" ]; then
$kpackage
elif [ ! "$gnorpm" = "" ]; then
$gnorpm
fi
fi |
|