smart installation not scriptable

Mark Wormgoor mark at wormgoor.com
Tue Dec 18 23:52:36 PST 2007


Cliff,

Cliff Wells wrote:
> 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
> 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.  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.

I'm doing the same thing as you are in Kickstart on CentOS5 (except for
the smart upgrade - I prefer doing that manually after installation) and
it works fine for me. What you're trying to do above is feed your
/usr/bin/yes binary into smart as some sort of input file. Try this
instead:
/usr/bin/yes | smart update

> 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.

Try (manually first):
smart channel --show

The previous command (smart update) needs to succeed in adding the
channels before you can enable them. In my ATrpms channels config, there's
no need to enable the channels, as they will be enabled by default after
the smart update command (the default for these channels is set in the
smart channel config).

Kind regards,

Mark Wormgoro
-- 
***************************************************************
* |\    /|      |  /|  /       Mark Wormgoor                  *
* | \  / |      | / | /        mailto:mark at wormgoor.com       *
* |  \/  |ark   |/  |/ormgoor  http://www.wormgoor.com/mark/  *
***************************************************************



More information about the Smart mailing list