Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Regarding package monitoring tool
- Madhusudhanan Chandrasekaran
November 1, 2005, 4:21 pm
rate this thread
Assuming I have a bunch of debian machines with user accounts
having sudo access.
(i) I wan't to write a script/daemon that remotely checks the system
for a particular package being installed. For e.g. to check whether a host A has
a package p (which I don't deter from using) installed. How do I enforce
(ii) To support my above statement, my script should be more or
less like apt-get (dist-) upgrade, which checks for the list of packages
and upgrades it. Here instead of just updating it I would want to also
check if package p is installed.
Any pointers or help is much appreciated.
Re: Regarding package monitoring tool
If you can setup keyless logins via SSH then this should be simple:
ssh [hostname] -l [user] dpkg --list [packageName] | grep ^ii
That'll give output if the package is installed.
ssh [hostname] -l [user] sudo apt-get upgrade [packageName]
Note that you'll need to fiddle with different flags if you want an
unattended upgrade - you might find there is a debconf prompt which
Perhaps "sudo apt-get upgrade --quiet --assume-yes upgrade
Debian GNU/Linux System Administration
- » Shadow password transmitted in "clear text" across a network
- — Next thread in » Linux Security
- » Cloud Ace Technologies is offering Implementation Services on Cloud Computing, Cloud Serv...
- — Newest thread in » Linux Security