今さら気付いたTigerとLeopardのささやかな違い

未だにPanther Serverを使っている所があるのですが。orz
今までTigerの作業端末からSSHPantherサーバにログインし、そのPantherサーバ上にある暗号化ディスクイメージをコマンドラインでマウントしようとすると、ことえりの英字入力モードではターミナル上でパスフレーズの入力を完了できなかったのです。

$ hdid -stdinpass hoge.dmg
reading null-terminated passphrase from stdin
(^D on blank line at end; ^@ can be used for NULL)
PASSPHRASE

で、パスフレーズの最後に「^@」を入力することができませんでした。
ので、毎回入力のキーボード配列を U.S. に切り替えてから hdid -stdinpass を叩いてたんですね。
man hdid を見る限り、

       -stdinpass
              causes  hdid to read a null-terminated passphrase from its stan-
              dard input.  ^@ (control-@) can be typed  to  explicitly  insert
              the terminator.  This option is designed for automation in which
              standard input would be attached to a file or pipe.  -passphrase
              <passphrase> This option is provided for automation purposes but
              is very insecure as the passphrase value will be visible in  the
              output of ps(1) (and thus to other users).  -passphrase has been
              deprecated.

ってあるので pipe でも行けるのかと思って、echo して pipe しても

$ echo "PASSPHRASE" | hdid -stdinpass hoge.dmg
hdid failed - Authentication error.

とか言われるし。



■2008.02.20 追記
echo で pipe する件は、とある人さんのコメント にあるように
$ echo -e "PASSPHRASE\0" | hdid -stdinpass hoge.dmg
すると良いです。

で、それがLeopardのターミナルになったらことえりの英字入力モードでもパスフレーズ入力が正常に行えるようになってました。

$ hdid -stdinpass hoge.dmg 
reading null-terminated passphrase from stdin
(^D on blank line at end; ^@ can be used for NULL)
PASSPHRASE^@
^D
/dev/disk1          	Apple_partition_scheme         	
/dev/disk1s1        	Apple_partition_map            	
/dev/disk1s2        	Apple_HFS                      	/Volumes/hoge

すっごく個人的に嬉しいんですが。


と、嬉しかったので久しぶりに更新してみましたが。が、あんまり嬉しい人はいなさそうですね…。
"hdid -stdinpass" でググっても世界中で2件しかヒットしないんですよ…


ちなみに、もしTigerのターミナル上でことえりの英字入力モードでも暗号化ディスクイメージのパスフレーズ入力が可能な方法が有ったら教えて頂ければ幸いです。