pogoplugはmypogoplugから設定をすると、sshアクセスもできて結構遊べるらしいけど、
http://blog.goo.ne.jp/_memento/e/3e3ff2c11bb9e7625fe4f904a613d95a
IPアドレスがわからない。ゲートウェイルータのDHCPサーバのアドレス払出し情報を見ればよいらしいけど、それも面倒だということで、ググるとAPIで情報が取れるらしい。
http://ameblo.jp/uassist-ceo/entry-10884788306.html
まとめてみると次のような感じ。
MAILAD=mypogoplugアカウントのメールアドレス
PASSWD=パスワード
USERTOKEN=/tmp/usertoken.pogo.$$
wget -q -O - https://service.pogoplug.com/svc/api/loginUser¥?email=$MAILAD¥&password=$PASSWD > $USERTOKEN
VALTOKEN=`cat $USERTOKEN | sed -e '1d' -e '3,$d' -e 's/.*"valtoken":"¥(.*¥)/¥1/' | cut -f1 -d¥"`
wget -q -O - http://service.pogoplug.com/svc/api/listDevices¥?valtoken=$VALTOKEN | sed -e '1d' -e '3,$d' -e 's/.*"apiurl":"http:¥/¥/¥(.*¥)/¥1/' | cut -f1 -d/
最初にユーザトークンを取得するときはパスワードを送るので HTTPS 暗号化セッションでアクセスして、次にそのトークンを使ってボックスの情報をとるときは HTTP アクセスと、セキュリティの配慮もされている。
pogoplugのOSはLinuxベースで busyboxでコンパクトにまとめられている。次は /sbin ディレクトリの中。
-bash-3.2$ uname -a
Linux Pogoplug 2.6.22.18 #81 Tue Oct 19 16:05:00 PDT 2010 armv5tejl unknown
-bash-3.2$ ls -l /sbin/
lrwxrwxrwx 1 root root 14 Nov 4 2009 adjtimex -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 arp -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 fdisk -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 freeramdisk -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 fsck -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 fsck.minix -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 getty -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 halt -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 hdparm -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 hwclock -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 ifconfig -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 ifdown -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 ifup -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 init -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 insmod -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 klogd -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 loadkmap -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 logread -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 losetup -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 lsmod -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 makedevs -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 mdev -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 mkfs.minix -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 mkswap -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 modprobe -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 nameif -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 pivot_root -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 poweroff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 raidautorun -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 reboot -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 rmmod -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 route -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 runlevel -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 setconsole -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 slattach -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 start-stop-daemon -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 sulogin -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 swapoff -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 swapon -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 switch_root -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 sysctl -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 syslogd -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 udhcpc -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 vconfig -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 watchdog -> ../bin/busybox
lrwxrwxrwx 1 root root 14 Nov 4 2009 zcip -> ../bin/busybox
そんなわけで、 /etc の下もすっきりしている。
-bash-3.2$ find /etc
/etc
/etc/mtab
/etc/fstab
/etc/group
/etc/cefs.conf
/etc/shadow-
/etc/Wireless
/etc/Wireless/RT2870STA
/etc/Wireless/RT2870STA/RT2870STA.dat
/etc/dropbear
/etc/dropbear/dropbear_dss_host_key
/etc/dropbear/dropbear_rsa_host_key
/etc/ld.so.conf
/etc/inittab
/etc/nsswitch.conf
/etc/init.d
/etc/init.d/db
/etc/init.d/rcS
/etc/init.d/hbmgr.sh
/etc/init.d/dropbear.sh
/etc/init.d/udhcpc_ra0.sh
/etc/passwd
/etc/shadow
/etc/shells
/etc/resolv.conf
そんなわけでOSのフットプリントも、なんと15MB程度と驚きの小ささ。
-bash-3.2$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/mtdblock2 32.0M 14.8M 17.2M 46% /
none 125.0M 12.0k 125.0M 0% /tmp
/tmp/.cemnt/sda1 14.8G 165.6M 13.9G 1% /tmp/.cemnt/mnt_sda1
主要なプログラムは、/usr/local/cloudengines/ ディレクトリ下に配備されているようだ。