openpogoにipkgでパッケージをインストール
openpogo化した後はipkgコマンドを活用してパッケージのインストールができる。
ipkg update コマンドがエラーが出て動かない。 エラーの内容は以下のとおり。
# ipkg update Downloading http://openpogo.com/repo/Packages wget: unrecognized option '--passive-ftp' BusyBox v1.16.1 (2010-12-01 15:27:23 PST) multi-call binary. Usage: wget [-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url An error ocurred, return value: 1. Collected errors: ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -q -P /opt/ipkg-0maiXL http://openpogo.com/repo/Packages'
どうやらBusyBox版のwgetのようで正常に動かないらしい。 引数がいるっぽいので、ラッパースクリプトを作成する。
# cd /usr/bin/ # mount -o rw,remount / # mv -i wget wget.busybox
# vi wget.sh #!/bin/sh arg=`echo $* | sed -e 's/--passive-ftp//g'` /bin/busybox wget $arg
# chmod 755 wget.sh # ln -s wget.sh wget # mount -o ro,remount /
wgetを入れ替えてたら後は好きなようにipkgでパッケージを取得できる。
エラーが出た。 どうもopenpogo.comのリポジトリが存在しないらしい。 リポジトリを変更
vi /opt/etc/ipkg/armel-feed.conf
# src cross http://openpogo.com/repo src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable
当初の目的だったsambaをipkgでインストールしてみる
# ipkg install samba36 Installing samba36 (3.6.0-1) to root... Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/samba36_3.6.0-1_arm.ipk package samba36 suggests installing cups ・・・・・・・・ ・・・・・・・ The original samba version 2 config (/etc/samba/smb.conf) is no longer working with this version of samba. Please create a new samba version 3 config (/opt/etc/samba/smb.conf). After verify your smb.conf file, modify and execute /opt/etc/init.d/S08samba to activate the samba version 3. Configuring zlib Successfully terminated.
インストールにはかなり時間がかかるので気長に待つ。 ちなみに、samba3.6からはSMB2をサポートしているらしいので、パフォーマンスが向上する可能性がある。
smb.confがなかったので作成。 自分の環境に合わせて適当に。 ちなみに、自宅で使うつもりなのでセキュリティはあまり気にしてない。
vi /opt/etc/samba/smb.conf
[global] max protocol = SMB2 workgroup = WORKGROUP dos charset = CP932 unix charset = UTF-8 display charset = UTF-8 server string = pogo-p25 security = share null passwords = yes guest account = root max log size = 50 hosts allow = 192.168., 127.0.0.1 dns proxy = no load printers = no disable spoolss = yes [POGOPLUG] path = /tmp/.cemnt/mnt_sdb1/ read only = no public = yes writable = yes force create mode = 0755 force directory mode = 0755 guest ok = yes
libnslが無いとかのエラーが出た場合は、 > ipkg install libnsl
起動スクリプトは/opt/etc/init.d/S08sambaにあるので
/opt/etc/init.d/S08samba start で正常起動すればOK
/etc/init.d/rcSの最後尾に以下を追記する。
/opt/etc/init.d/S08samba start