将下面的脚本存储为 sl 文件,并放置到 /etc/rc.d/init.d 目录下
再将这个 sl 文件加入到 /etc/profile 文件里即可:
- #!/bin/bash
- # chkconfig: 2345 80 10
- # description: sl
- if [ "$1" = "on" ] ||[ "$1" = "ON" ]; then
- xset led named 'Scroll Lock'
- elif [ "$1" = "off" ] ||[ "$1" = "OFF" ]; then
- xset -led named 'Scroll Lock'
- else
- echo "Usage: $0 on/off"
- exit 1
- fi
- exit 0
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28878983/viewspace-2134982/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28878983/viewspace-2134982/