[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about upgrading debian using crontab



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

>       Here is a question about debian upgrading.  Now i am doing debian
> upgrade by using command "aptitude update" and then "aptitude
> dist-upgrade" manually.
>       And what i am thinking is if i can use crontab to do the job for
> me. The only problem is that when doing "aptitude dist-upgrade", there
> are some dialogs which need to interact with me for the software
> setting. I have to answer some questions to finish the dist-upgrade.

My situation:
The debian server (a little router/NAT for internet access) should
also be maintanenable by users, who don't really know much about
linux. If something "difficult" happens, they should be warned by
email (and than e.g. they could ask someone, who knows debian, to
handle this).

My plan:
I want to update everything, that needs no interactive configuration,
automatically. Everything else should only download and an admin
should install it later on manually.

Well, I designed this solution:
- - Two scripts:
  a) "update-script", which starts the internet connection by running
     vpnc (university internet access), then runs "apt-get update"
     and afterwards "apt-get -y -q upgrade". At every stage it
     observes the errorcodes and if doesn't match "0", it will
     itself produce a error-code.
  b) a script, which runs and observes the update-script. At the
     moment it always produces a status-email to an email-user.
- - The latter script is run by cron.
- - At the moment, the apt-get upgrade does nothing; it is
  run with "-s" (simulation) for testing purpose.

Problems/Unsolved/Questions:
- - If nothing happens (no package has been updated), it shouldn't
  generate a email.
  How do I know from apt-get, that there were no updates?
- - If packages have been updated, which need no manual interaction,
  it should just produce a kind of status email, where the updated
  packages are listed.
  How do I figure out, which packages need manual interaction
  for updating? Is the option "-y" for apt-get enough for this?
- - If packages could be updated, but they need manual interaction,
  it should only download the packages and then ask the user
  by email, to run the upgrade manually.
  How do I figure out, which packages need manual interaction?
  Where do I configure the "level of manual interaction"?

Perhaps someone can help me with the questions above?

If you would like to have these two scripts, I can mail them. Problem
is, that the comments and outputs of the script are in German.

Bye,
Simon

- --
  [bysf]
  simon frettloeh # mailto:simonfr@gmx.net
  pgp keyid:0x372A2577 # available on all public key servers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCGJgTeRT02zcqJXcRAkKLAJ92O0DacNFcX+uO9x0VfBgV3xB7BQCfScf9
tB2c6SGlhUpcdKj+pMomrnA=
=WZ0v
-----END PGP SIGNATURE-----



Reply to: