hotplug

来自「嵌入式linux中的usb热拔插脚本,可以实现u盘的热拔插功能」· 代码 · 共 55 行

TXT
55
字号
#!/bin/sh## hotplug This scripts starts hotpluggable subsystems.## chkconfig: 2345 01 99# description:	Starts and stops each hotpluggable subsystem. \#		On startup, may simulate hotplug events for devices \#		that were present at boot time, before filesystems \#		(or other resources) used by hotplug agents were available.## $Id: hotplug,v 1.3 2002/12/03 02:01:48 dbrownell Exp $#PATH=/sbin:/bin:/usr/sbin:/usr/bin# source function libraryif [ -f /etc/init.d/functions ]; then	. /etc/init.d/functionselif [ -f /etc/rc.d/init.d/functions ]; then	. /etc/rc.d/init.d/functionsficase "$1" in    start|restart|status)	for RC in /etc/hotplug/*.rc	do	    $RC $1	done	touch /var/lock/subsys/hotplug	;;    stop)	for RC in /etc/hotplug/*.rc        do            $RC stop        done        rm -f /var/lock/subsys/hotplug        ;;    force-reload)	for RC in /etc/hotplug/*.rc        do            $RC stop        done	for RC in /etc/hotplug/*.rc        do            $RC start        done        rm -f /var/lock/subsys/hotplug        ;;    *)	echo $"Usage: $0 {start|stop|restart|status|force_reload}"	exit 3	;;esac

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?