Page 2 of 4
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Fri Sep 30, 2016 10:18 am
by juusso
Nope. It is easy to write, but i never did that...
ps. Is wc available on TV? can you check?
Code: Select all
. /dtv/SGO.env
wc -c /mnt/samygo.log
piece of code which could be useful. 9999_9999_deleteLogs.init (chmod it to 755)
Code: Select all
#!/bin/sh
#
# ? Copyright 1996-2016, SamyGO
#
#
. /dtv/SGO.env
case $1 in
start)
files="/mnt/samygo.log /mnt/sam.log"
maxsize=120000 # adjust filesize here
for file in $files; do
actualsize=$(wc -c <"$file")
if [ $actualsize -ge $maxsize ]; then
rm -f $file
fi
done
;;
*)
echo "Usage: $0 {start}" 1>&2
exit 0
;;
esac
For maxsize need to decide what size is is too big here...
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Fri Sep 30, 2016 10:37 am
by miazza
I will check tonight and report

Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Fri Sep 30, 2016 4:58 pm
by miazza
Now I have again the problem but log files are deleted.
samyext4.img is 128 Mb ...
I do not know what to do next.
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Fri Sep 30, 2016 5:05 pm
by juusso
Perhaps you need good copy of samyext4.img
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sat Oct 01, 2016 12:41 pm
by miazza
I restored an old samyext4.img and it works now.
wc is supported:
Code: Select all
VDLinux#> wc -c /mnt/samygo.log
27006 /mnt/samygo.log
Script seems not working:
Code: Select all
VDLinux#> wc -c /mnt/samygo.log
27300 /mnt/samygo.log
VDLinux#> wc -c /mnt/sam.log
36750917 /mnt/sam.log
VDLinux#>
Max size 120000 actual 36750917
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sat Oct 01, 2016 1:21 pm
by juusso
Script works, coz:
VDLinux#> wc -c /mnt/sam.log
36750917 /mnt/sam.log
VDLinux#>
And you said actual size was
36750917.
So with default walue of 120000 script will delete log when it will be equal or greater 120Kb. I guess you need bigger log or?
p.s. emmm, you showed output after you placed script into init dir and did chmod 755 to it?
p.p.s. please attach your script you say won`t work for you.
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sun Oct 02, 2016 10:54 am
by miazza
juusso wrote:Script works, coz:
VDLinux#> wc -c /mnt/sam.log
36750917 /mnt/sam.log
VDLinux#>
And you said actual size was
36750917.
So with default walue of 120000 script will delete log when it will be equal or greater 120Kb. I guess you need bigger log or?
p.s. emmm, you showed output after you placed script into init dir and did chmod 755 to it?
p.p.s. please attach your script you say won`t work for you.
Of course the script is chmod +x

I attach script and logs (now sorter because I deleted them and resterted.
log reports:
Code: Select all
/mnt/etc/init.d/9999_9999_deleteLogs.init: .: line 6: can't open '/dtv/SGO.env
really strange ...
deletelog.rar
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sun Oct 02, 2016 10:57 am
by juusso
Can you execute that command in console?
source /dtv/SGO.env
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sun Oct 02, 2016 11:08 am
by miazza
What do you mean ? sorry for the silly question.
Code: Select all
VDLinux#> source /dtv/SGO.env
VDLinux#>
I can run . /dtv/SGO.env from telnet without any problem and all other scripts are running well.
I guess that log is getting bigger because of oscam ... it records all ECM in log...
Re: 22F5400 no telnet no VUSB and no remote working.
Posted: Sun Oct 02, 2016 11:13 am
by juusso
I think its becauae your script encoding...did you use notepad for it? pls attach it here