Juraj Chlebec
Juraj.Chlebec at uniag.sk
Tue Jul 9 10:08:39 CEST 2002
Ahojte,
Odpoviem si sam (aj vdaka LK) pred kazdy prikaz do scriptu treba pridat
cestu, cize nie ipfw ale /sbin/ipfw a potom je hned vsetko vporiadku.
Juro Chlebec
Juraj Chlebec wrote:
> Mam tento script pre nastavenie kapacity linky v zavislosti od casu.
>
> #!/bin/sh
>
> hour=`date "+%H"`;
>
> if [ ${hour} -ge 0 ] && [ ${hour} -lt 8 ] || [ ${hour} -ge 22 ]; then
> if ipfw pipe 2 config bw 256000bit/s; then
> echo ">>> `date "+%Y-%m-%d %H:%M:%S"` >>> od 22:00 az po 8:00 bezime na 256 Kbit/s";
> else
> echo ">>> `date "+%Y-%m-%d %H:%M:%S"` >>> niekde sa stala chyba a 256 Kbit/s nenabehlo";
> fi;
> elif [ ${hour} -ge 8 ] && [ ${hour} -lt 22 ]; then
> if ipfw pipe 2 config bw 56000bit/s; then
> echo ">>> `date "+%Y-%m-%d %H:%M:%S"` >>> od 8:00 az po 22:00 bezime na 56 Kbit/s";
> else
> echo ">>> `date "+%Y-%m-%d %H:%M:%S"` >>> niekde sa stala chyba a 56 Kbit/s nenabehlo";
> fi;
> fi;
>
> Pokial ho spustim s prikazoveho riadku skript bez problemov funguje a
> vypise riadok o nastaveni linky... Pokial ho spustim z cronu
>
> * * * * * /etc/ipscript.sh >> /var/log/ipfw_changes.log
>
> Tak zbehne ale vzdy s chybovym hlasenim niekde sa stala chyba bla bla
> bla... nastavenie neprebehne. Neviete mi poradit preco a co mam urobit pre
> to aby mi to bezalo?
>
> Vdaka
>
> Juraj Chlebec
>
> --
> /-------------------------------\
> University of Agriculture Voice: (0421) 037 / 6508 813
> CIT FEM Nitra, Slovakia (7.30 - 16.00)
> ____ __ _ _ ____ __ _ ---
> (_ || ||\ || | (_ || || |_ Juraj.Chlebec at fem.uniag.sk
> __)||_||_|||_| __)| | |_|_ http://www.fem.uniag.sk/Juraj.Chlebec/
> W E B D E S I G N Commodore 64 is alive !
> \-------------------------------/
>
More information about the Users-l
mailing list