[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:14247] Re: /etc/pcmcia/apm.optc: shirose



むつみです。

 HIROSE Shigenobu <debian@xxxxxxxxxxxxxxxxxxxxxxxx> さんは
   Subject: [debian-users:14246] /etc/pcmcia/apm.optc: shirose
   Message-ID: <19990407185018S.debian@xxxxxxxxxxxxxxxxxxxxxxxx>
 において言いました

>> 廣瀬@理科大と申します。

>> /etc/pcmcia/apm.optsというファイルには、ハイバネーション/レジュームの
>> 際にPCカードをどのようにコントロールするかを記述しておくものだと理解し
>> ているのですが、その記述方法を教えていただけないでしょうか? 

 こんなファイルあったんだ ^^;;;

 pcmcia-cs の postinst にはこんなこと書いてあります。

#ちょっと長いけど、いいか。

----- ここから
    if test ! -f /etc/pcmcia/apm.opts
    then
	more <<EOM

Newer version of Debian's apmd package allow the system administrator to
automatically run arbitrary scripts when the system is brought to and from
a suspended state.  While the PCMCIA modules provide APM support (that is,
they are supposed to detect through the kernel when the system is being
suspend and when it is brought back from a suspended state), this does
not work on some computers.  Furthermore, certain cards, most notably
SCSI cards, cannot recover from a suspend/resume cycle.  Therefore, it
is recommended to automatically eject these cards when the system is
suspended.

You now have three options:
1) You can use a script to automatically suspend/resume your PCMCIA
   cards during a APM suspend event.
2) You can use a script to automatically eject/insert your PCMCIA cards
   during a APM suspend event.  (Note that this will break any connections
   established by network cards.)
3) You can do nothing; that is, let the PCMCIA modules' APM support
   handle card suspend/resume events.

Unless you know that your system cannot adequately handle APM
suspend/resume events on its own, you should choose option 3.  If you
decide later that you need to automatically suspend/resume your PCMCIA
cards with a script you should modify the /etc/pcmcia/apm.opts file so
that it contains the following line:
    APM=suspend

If you decide later that you need to automatically eject/insert your
PCMCIA cards with a script you should modify the /etc/pcmcia/apm.opts
file so that it contains the following line:
    APM=eject

EOM
	echo
	echo "What do you want to do on APM suspend/resume events?"
	while :
	do 
	    echo
	    echo "1) Automatically suspend/resume"
	    echo "2) Automatically eject/insert"
	    echo "3) Nothing (default)"
	    read response
	    case $response in
	    1)		echo 'APM=suspend' > /etc/pcmcia/apm.opts; break ;;
	    2)		echo 'APM=eject' > /etc/pcmcia/apm.opts; break ;;
	    3|"")	echo 'unset APM' > /etc/pcmcia/apm.opts; break ;;
	    esac
	    echo "Invalid response"
	done
    fi
    if (cd /; echo \
	'c2a7d646c75ebb6dabd1b13f51d4a58c  etc/pcmcia/network.opts' \
	| md5sum -c 2>/dev/null)
    then
	cat <<EOM
(以下省略)
----- ここまで

-- 
 From Nagoya
  ishikawa@xxxxxxxxxxx, ishikawa@debian.or.jp,
   ishikawa@xxxxxxxxxxxxx, ( mutsumi@xxxxxxxxxxx for PostPet only )
  ** 石川 睦%無意味な全文引用をする人は嫌い@日本 Linux 協会 **
                     LLUG http://llug.linux.or.jp/