File: pcmcia_socket.agent

package info (click to toggle)
pcmciautils 014-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 328 kB
  • ctags: 791
  • sloc: ansic: 3,804; sh: 284; makefile: 238; lex: 219; yacc: 104
file content (38 lines) | stat: -rwxr-xr-x 618 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# PCMCIA-socket-specific hotplug policy agent
#
# $Id$
#

#DEBUG=yes; export DEBUG

cd /etc/hotplug
. ./hotplug.functions

if [ "$ACTION" = "" ]; then
    mesg Bad PCMCIA socket agent invocation, no action
    exit 1
fi

debug_mesg socket number: $SOCKET_NO

case $ACTION in

add)
	sleep 1;
	pcmcia-socket-startup $SOCKET_NO
	DONE_FILE=/sys/class/pcmcia_socket/pcmcia_socket$SOCKET_NO/available_resources_setup_done
	if [ -f  $DONE_FILE ]; then
	    if [ -w $DONE_FILE ]; then
		echo -n "42" > $DONE_FILE
	    fi;
	fi;
	;;
remove)
	;;
*)
	debug_mesg "PCMCIA socket '$ACTION' event not supported"
	;;

esac