smart installation not scriptable

ptilopteri at gmail.com ptilopteri at gmail.com
Tue Dec 18 17:49:31 PST 2007


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

* Cliff Wells <cliff at develix.com> [12-18-07 19:07]:
> I'm trying to automate installation of virtual Fedora 8 environments.
> To that end I have the following simple script:
> 
> #!/bin/bash
> yum -y install smart

> smart update < /usr/bin/yes
               ^^^^^^^^^^^^^^
	       not necessary

> smart channel --enable core updates
> smart upgrade -y
> smart install -y python-devel python-imaging python-psycopg2 httpd
> postgresql-server django mod_python mod_ssl
> 
> 
> The first problem I ran into was that "smart update" has no way of
> automatically accepting "Y" when it's run for the first time.  

smart update" requires no other input unless you want to specify
particular channel[s]

17:22 wahoo:~ > smart update --help
Usage: smart update [options] [channelalias] ...

This command will update the known information about the
given channels. If no channels are given, all channels
which are not disabled or setup for manual updates will
be updated.

Options:
  -h, --help   Show this help message and exit
    --after=MIN  Only update if the last successful update happened
                 before the given delay
		   
Examples:
  smart update 
  smart update mychannel 
  smart update mychannel1 mychannel2
			 

> It seems to require console (keyboard) input.  I tried feeding it from
> /usr/bin/yes without success.  Apparently someone has to sit there and
> hit enter on the console.

no

> Next I thought I would simply enable the two default channels (core and
> updates, as seen in the script above).  Still no luck.  Smart informs me
> that "core" and "updates" aren't known channels.

to see which channels you have:

smart channel --show


> What can I do?  It's a shell script, so I don't mind dirty hacks.


yum -y install smart
smart channel --add ./mychannel.txt     ;; requires a listing of channels
smart update
smart install -y <preferred packages>


to see command line parameters for smart, do:
  smart --help
  smart <action> --help
  smart channel --help


- -- 
Patrick Shanahan         Plainfield, Indiana, USA        HOG # US1244711
http://wahoo.no-ip.org     Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535                    @ http://counter.li.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFHaHirClSjbQz1U5oRAjd6AKCGCTDqfly1TcYa5YP2sDG43tupswCfV5KC
clTgmhCoqSFQsn+TKGjhOOg=
=LQKD
-----END PGP SIGNATURE-----



More information about the Smart mailing list