begin quote On Fri, 22 Aug 2003 16:35:44 +1000 blade- <[EMAIL PROTECTED]> wrote:
> Thanks for your help all, this is what i ended up doing, can anyone > tell me if this is bad security wise in anyway, it seems to be working > fine. Now I won't have to ssh in all the time to check for updates. > > #!/bin/sh > ( > echo "To: [EMAIL PROTECTED] <blade->" > echo "From: system <root>" > echo "Subject: Updates available" > echo The following updates are available: > echo > `emerge sync 2>&1` > emerge -uDpv world > /tmp/pkg.tmp > cat /tmp/pkg.tmp | grep ebuild ) | /usr/sbin/sendmail -t > rm /tmp/pkg.tmp > Reshuffle "emerge sync" and the pipe redirected "emerge -uvp" so they are before the echo lines. This will reduce the time that your script is blocking sendmail. You should also move that file to $HOME instead, that will relieve some file-overwrite problems. (ln -s /etc/passwd /tmp/pgk.tmp ....) //Spider -- begin .signature This is a .signature virus! Please copy me into your .signature! See Microsoft KB Article Q265230 for more information. end
pgp00000.pgp
Description: PGP signature
