SV: run apt-get upgrade via ssh batch login doesn't work
Lucas Albers wrote:
> I have a script that connects to all my machines and runs: apt-get
> If instead I run apt-get upgrade, it gives an error about:
> Not being able to find the path, correctly.
> dpkg: `ldconfig' not found on PATH.
> dpkg: `start-stop-daemon' not found on PATH.
> dpkg: `install-info' not found on PATH.
> dpkg: `update-rc.d' not found on PATH.
> dpkg: 4 expected program(s) not found on PATH.
> NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and
> How to set the path correctly for a batch run of an ssh login for an
> apt-get upgrade?
> If you connect to a machine with a command listed as part of hte ssh
> command it will connect non-interactivelly and run the command and
> exit when the command completes. like such:
> ssh foo.example.com apt-get upgrade -y
What happends if you bake it into a script wich contain