Hallo zusammen,
@newbiefan erstmal ein dickes DANKE für die Erläuterungen.
leider funktioniert das bei mir noch nicht so richtig....
Habe alles laut HowTo eingerichtet, leider ohne Erfolg.
Ich hänge mal mein "sambi", meine "post-boot", die ausgeführten Prozesse und den sambi-aufruf an, vielleicht entdeckt Ihr ja einen Fehler:
PHP Code:
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# Die folgenden 4 Rauten entfernen, wenn eine USB-Platte angeschlossen ist. Beim WL-HDD nicht notwendig, da IDE.
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi
#Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
# Activate swap
swapon /dev/discs/disc0/part1
# Mount the rest
mount /dev/discs/disc0/part3 /tmp/harddisk
#include access to any samba share with smbmount
if [ -e /opt/modules/smbfs.o ]
then
insmod /opt/modules/smbfs.o
fi
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
PHP Code:
#!/bin/sh
#script samba toogles the mount to umount and vice versa
if mount | grep /tmp/harddisk/olishare ; then #is already mounted
smbumount /tmp/harddisk/olishare
echo -n "/tmp/harddisk/olishare unmounted"
date
else # is not mounted
smbmount //192.168.1.22/Share /tmp/harddisk/olishare -o rw,guest
sleep 1
echo -n "SMB-share //192.168.1.22/Share mounted to /tmp/harddisk/olishare"
date
fi
Unter den Prozessen finde ich den smbmount, nur was hat er zu bedeuten?
PHP Code:
[admin@Asus olishare]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
59 ? S 0:00 telnetd
64 ? S 0:00 httpd vlan1
65 ? Ss 0:01 nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
69 ? S 0:00 klogd
72 ? S 0:00 dnsmasq
73 ? S 0:00 [khubd]
82 ? Ss 0:00 lpd
84 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
87 ? Ss 0:00 waveservermain
89 ? Ss 0:00 rcamdmain
93 ? S 0:00 [usb-storage-0]
94 ? S 0:00 [scsi_eh_0]
114 ? Ss 0:00 pppd file /tmp/ppp/options.wan0
116 ? Ss 0:00 infosvr br0
117 ? Ss 0:00 watchdog
119 ? Zs 0:00 \_ [ntp] <defunct>
132 ? S 0:00 dropbear
237 ? Ss 0:02 \_ dropbear
239 pts/0 Ss 0:00 \_ -sh
385 pts/0 R+ 0:00 \_ ps axf
144 ? S 0:00 [kjournald]
155 ? S 0:00 [kjournald]
170 ? S 0:00 /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
175 ? Ss 0:00 /opt/sbin/cron
181 ? Ss 0:00 /opt/sbin/xinetd
188 ? S 0:00 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
196 ? Ss 0:00 /opt/sbin/smbd -D
198 ? Ss 0:00 /opt/sbin/nmbd -D
209 ? S 0:00 /opt/sbin/thttpd -C /opt/etc/thttpd.conf
235 ? S 0:00 stupid-ftpd
320 ? Ss 0:00 smbmount //192.168.1.22/Share /tmp/harddisk/olishare -o rw guest
Folgende Meldung erhalte ich beim Aufruf des sambi-scripts:
PHP Code:
[admin@Asus olishare]$ /opt/sbin/sambi
319: session request to 192.168.1.22 failed (Called name not present)
319: session request to 192 failed (Called name not present)
SMB-share //192.168.1.22/Share mounted to /tmp/harddisk/olishareThu Jan 1 01:05:28 MEZ 1970
[admin@Asus olishare]$ ls -all
total 8
drwxrwxrwx 2 admin root 4096 Jan 2 1970 .
drwxr-xr-x 9 admin root 4096 Jan 2 1970 ..
Danke für die Hilfe
Oliver