Daily Archives: 八月 14th, 2008

我们这rhel4为了让windows用WRQ Reflection或xmanager通过x服务图形化登录,对/etc/X11/gdm/gdm.conf做的修改

#AlwaysRestartServer=false   to       AlwaysRestartServer=true
AllowRemoteAutoLogin=false   to       AllowRemoteAutoLogin=true
#RetryDelay=1                to       RetryDelay=1
#UserMaxFile=65536           to       UserMaxFile=65536
#DisallowTCP=true            to       DisallowTCP=false
[xdmcp]
Enable=false            to     Enable=true
#HonorIndirect=true     to     HonorIndirect=true
#MaxPending=4           to     MaxPending=4
#MaxPendingIndirect=4   to     MaxPendingIndirect=4
#MaxSessions=16         to     MaxSessions=16
#MaxWait=15             to     MaxWait=15
#MaxWaitIndirect=15     to     MaxWaitIndirect=15
#DisplaysPerHost=2      to     DisplaysPerHost=4
阅读(72 次)

bash case 用法

case “$j” in
“”)
echo “null”
exit 1
;;
a|b|c)
echo “a or b or c”
;;
d|e|f)
echo “d or e or f”
;;
*)
echo “other”
;;
esac
阅读(82 次)

别人用来检测solaris的脚本

#!/bin/sh
DATE=`date ‘+%Y%m%d’`
mkdir -p /export/${DATE}
cd /export/${DATE}
format </dev/null > format.out
hostid > hostid.out
hostname > hostname.out
ifconfig -a > ifconfig.out
cat /etc/release > release.out
uname -a > uname.out
/usr/platform/sun4u/sbin/prtdiag -v > prtdiag.out
vmstat 2 5 > vmstat.out
egrep -i “warn|error|panic” /var/adm/messages.* >messages.out
iostat -xnd 2  5 >iostat.out
metadb -i > metadb.out
metastat > metastat.out
df -k > df.out
cat /etc/vfstab >vfsta.out
netstat -i >netstat.out
阅读(68 次)