戻る

netatalk-2.0-b-i386-P1.tgz

Out line

これは pkgtool で 対応しよう

# mount /cdrom
# pwd    
/root
# cd /cdrom/contrib/Network/
# pwd
/cdrom/contrib/Network
# pkgtool
netatalk-2.0-b-i386-P1 をインストールする
# cd
# umount /cdrom
# eject

さて ファイルを 見つけないと

# ls -l /usr/etc/netatalk/
total 64
-rw-r--r--    1 root     root         5010 May  9  2004 AppleVolumes.default
-rw-r--r--    1 root     root        24971 May  9  2004 AppleVolumes.system
-rw-r--r--    1 root     root        11243 May  9  2004 afpd.conf
-rw-r--r--    1 root     root         1059 May  9  2004 atalkd.conf
-rw-r--r--    1 root     root          821 May  9  2004 netatalk.conf
-rw-r--r--    1 root     root         1479 May  9  2004 papd.conf
drwxr-xr-x    2 root     root         4096 Mar  5 15:13 uams/

へてから

# cd /usr/etc/netatalk/
# pwd
/usr/etc/netatalk
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sdb5              4959600   1885548   2818056  41% /
/dev/sda8              2822080   1562304   1116420  59% /var/data
$ cp /usr/etc/netatalk/atalkd.conf .
$ emacs atalkd.conf &
# mv atalkd.conf atalkd.conf_org
# cp /home/mm/0001_first-step/atalkd.conf .
# diff -s atalkd.conf atalkd.conf_org 
38,39d37
< # Sun Mar  5 17:56:04 JST 2006
< eth0 -phase 2

ほんでもって

$ cp /usr/etc/netatalk/AppleVolumes.default .
$ emacs AppleVolumes.default &
# cp /home/mm/0001_first-step/AppleVolumes.default .
# diff -s AppleVolumes.default AppleVolumes.default_org  
# diff -s AppleVolumes.default AppleVolumes.default_org 
103,104c103
< ~/open_emac
< /home/nyan/ntarou/ nyankichi
---
> ~

ユーザーの ディレクトリを 用意して 既存の rc.atalk を コピーしよう

$ cd
$ mkdir open_emac
$ cd -
/home/mm/0001_first-step
# mount /dev/sda5 /mnt/
# cd /etc/rc.d/
# cp /mnt/etc/rc.d/rc.atalk .

内容は

# cat rc.atalk 
#!/bin/sh
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#

#
# SUNOS: UNCOMMENT THESE LINES TO LOAD THE KERNEL MODULE.  Note that
# modunload-ing netatalk may cause your machine to panic or hang.
#
##echo -n 'loading netatalk: '
##if [ -f /usr/local/etc/netatalk/netatalk.o ]; then
##      /usr/etc/modload -sym /usr/local/etc/netatalk/netatalk.o;
##fi

echo -n 'starting appletalk daemons:'
if [ -x /usr/local/sbin/atalkd ]; then
        /usr/local/sbin/atalkd;         echo -n ' atalkd'
fi

if [ -x /usr/local/bin/nbprgstr ]; then
        /usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
        /usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
                                        echo -n ' nbprgstr'
fi

if [ -x /usr/local/sbin/papd ]; then
        /usr/local/sbin/papd;           echo -n ' papd'
fi

if [ -x /usr/local/sbin/afpd ]; then
        /usr/local/sbin/afpd;           echo -n ' afpd'
fi

# if [ -x /usr/local/sbin/timelord ]; then
#       /usr/local/sbin/timelord;               echo -n ' timelord'
# fi

                                        echo '.'

これは つかえるの? というのは pkgtool で インストールすると

/usr/sbin/ | grep atalkd
atalkd*
/usr/sbin/ | grep papd  
papd*
/usr/sbin/ | grep afpd
afpd*
/usr/bin/ | grep nbprgstr
nbprgstr*

ファイルの場所が 此処に なっている

# cd /etc/rc.d/
# cp rc.atalk 0006_rc.atalk 
# vi rc.atalk
# diff -s rc.atalk 0006_rc.atalk 
18,19c18,19
< if [ -x /usr/sbin/atalkd ]; then
<       /usr/sbin/atalkd;               echo -n ' atalkd'
---
> if [ -x /usr/local/sbin/atalkd ]; then
>       /usr/local/sbin/atalkd;         echo -n ' atalkd'
22,24c22,24
< if [ -x /usr/bin/nbprgstr ]; then
<       /usr/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
<       /usr/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
---
> if [ -x /usr/local/bin/nbprgstr ]; then
>       /usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
>       /usr/local/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
28,29c28,29
< if [ -x /usr/sbin/papd ]; then
<       /usr/sbin/papd;         echo -n ' papd'
---
> if [ -x /usr/local/sbin/papd ]; then
>       /usr/local/sbin/papd;           echo -n ' papd'
32,33c32,33
< if [ -x /usr/sbin/afpd ]; then
<       /usr/sbin/afpd;         echo -n ' afpd'
---
> if [ -x /usr/local/sbin/afpd ]; then
>       /usr/local/sbin/afpd;           echo -n ' afpd'

自動起動 させるには ファイルを 修正せねば いけん

# cat -n  /etc/rc.d/rc.M | grep rc.atalk
   241  if [ -x /etc/rc.d/rc.atalk ]; then
   243      /etc/rc.d/rc.atalk > /dev/null 2>&1
# wc -l rc.M
    326 rc.M
lx:/etc/rc.d# bc -q
326-241
85
quit
# tail -88 rc.M | head -7

# Start netatalk (a file/print server for Macintosh Appletalk).
if [ -x /etc/rc.d/rc.atalk ]; then
    echo -n " atalk"
    /etc/rc.d/rc.atalk > /dev/null 2>&1
fi

/etc/services

services を みておかねば

# cat /etc/services | grep afpovertcp
# cd /etc
# cp services 0005_services 
# vi /etc/services
# diff -s services 0005_services 
214,217d213
< # for netatalk
< #  ::Sun Mar  5 18:15:05 JST 2006
< afpovertcp      548/tcp         # AFP over TCP
< afpovertcp      548/udp

/etc/modules.conf

modules.conf も みておかねば

# cp modules.conf 0006_modules.conf
# vi modules.conf
# diff -s modules.conf 0006_modules.conf 
5,6c5
< # alias net-pf-5 off
< alias net-pf-5 appletalk
---
> alias net-pf-5 off

ほたら 再起動 しませう

# shutdown -r now
# ps ax | grep atalk
 1225 ?        S      0:00 /usr/sbin/atalkd

ほかのんも 動いてるようだ 以下は ps ax の 抜粋です。

1235 ?        S      0:00 /usr/sbin/papd
1237 ?        S      0:00 /usr/sbin/afpd

接続不可能

e-mac さんより 接続すると

Mar 05 23:08:35 afpd[1237][dsi_tcp.c:117]: W:Default: refused connect from mc.bcnet.ne.jp
Mar 05 23:08:35 afpd[1237][dsi_getsess.c:63]: E:Default: dsi_getsess: Connection refused

なにか 不味いようだ 実績の 物を 見てみると

# ls -l /mnt//usr/local/etc/netatalk/uams/ | sed -e 1d
lrwxrwxrwx    1 root     root           14 Sep 21  2004 uams_clrtxt.so -> uams_passwd.so*
lrwxrwxrwx    1 root     root           18 Sep 21  2004 uams_dhx.so -> uams_dhx_passwd.so*
-rw-r--r--    1 root     root        37884 Sep 21  2004 uams_dhx_passwd.a
-rwxr-xr-x    1 root     root          953 Sep 21  2004 uams_dhx_passwd.la*
-rwxr-xr-x    1 root     root        41827 Sep 21  2004 uams_dhx_passwd.so*
-rw-r--r--    1 root     root        24674 Sep 21  2004 uams_guest.a
-rwxr-xr-x    1 root     root          900 Sep 21  2004 uams_guest.la*
-rwxr-xr-x    1 root     root        28910 Sep 21  2004 uams_guest.so*
-rw-r--r--    1 root     root        31322 Sep 21  2004 uams_passwd.a
-rwxr-xr-x    1 root     root          907 Sep 21  2004 uams_passwd.la*
-rwxr-xr-x    1 root     root        35512 Sep 21  2004 uams_passwd.so*
-rw-r--r--    1 root     root        43986 Sep 21  2004 uams_randnum.a
-rwxr-xr-x    1 root     root          932 Sep 21  2004 uams_randnum.la*
-rwxr-xr-x    1 root     root        47288 Sep 21  2004 uams_randnum.so*

今回の 物を 見てみると

# ls -l | sed -e 1d
lrwxrwxrwx    1 root     root           11 Mar  5 15:13 uams_clrtxt.so -> uams_pam.so*
lrwxrwxrwx    1 root     root           15 Mar  5 15:13 uams_dhx.so -> uams_dhx_pam.so*
-rw-r--r--    1 root     root        52338 May  9  2004 uams_dhx_pam.a
-rwxr-xr-x    1 root     root          816 May  9  2004 uams_dhx_pam.la*
-rwxr-xr-x    1 root     root        46792 May  9  2004 uams_dhx_pam.so*
-rw-r--r--    1 root     root        42156 May  9  2004 uams_dhx_passwd.a
-rwxr-xr-x    1 root     root          839 May  9  2004 uams_dhx_passwd.la*
-rwxr-xr-x    1 root     root        37585 May  9  2004 uams_dhx_passwd.so*
-rw-r--r--    1 root     root        33098 May  9  2004 uams_guest.a
-rwxr-xr-x    1 root     root          780 May  9  2004 uams_guest.la*
-rwxr-xr-x    1 root     root        29715 May  9  2004 uams_guest.so*
-rw-r--r--    1 root     root        41454 May  9  2004 uams_pam.a
-rwxr-xr-x    1 root     root          772 May  9  2004 uams_pam.la*
-rwxr-xr-x    1 root     root        37157 May  9  2004 uams_pam.so*
-rw-r--r--    1 root     root        37218 May  9  2004 uams_passwd.a
-rwxr-xr-x    1 root     root          795 May  9  2004 uams_passwd.la*
-rwxr-xr-x    1 root     root        33299 May  9  2004 uams_passwd.so*
-rw-r--r--    1 root     root        45466 May  9  2004 uams_randnum.a
-rwxr-xr-x    1 root     root          810 May  9  2004 uams_randnum.la*
-rwxr-xr-x    1 root     root        40930 May  9  2004 uams_randnum.so*

リンク先が 異なってるようだ

暫定対策

# pwd
/usr/etc/netatalk/uams
# rm uams_clrtxt.so
# rm uams_dhx.so
# ln -s uams_passwd.so uams_clrtxt.so
# ln -s uams_dhx_passwd.so uams_dhx.so
# ls -l uams_clrtxt.so
lrwxrwxrwx    1 root root   14 Mar  6 13:13 uams_clrtxt.so -> uams_passwd.so*
# ls -l uams_dhx.so
lrwxrwxrwx    1 root root   18 Mar  6 13:14 uams_dhx.so -> uams_dhx_passwd.so*

にゃんたろう 拝!
2006年 3月15日 (水) 20:40:07 JST 作成


戻る

Copyright © 2004.-2007. nyantarou All Rights Reserved.