Results 1 to 5 of 5

Thread: Enable automatic updates (or any YaST setting) from command line

  1. #1

    Default Enable automatic updates (or any YaST setting) from command line

    By using YaST --> Software --> Online Update Configuration, one can enable automatic updates.

    Is there any way to achieve the same settings by just using the command line? This question naturally extends to all kinds of settings that can be done within YaST.

    Background: I'd like to set up my server from scratch using a shell script with the least possible manual interaction.

    Sure I can use diff on /etc to find out what exactly YaST has changed and then replicate those changes in my script. However, I do not see a guarantee that this procedure will continue to work on future releases of openSUSE.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,750

    Default Re: Enable automatic updates (or any YaST setting) from command line

    I would say that you should not use YaST when you want to to things from the CLI and/or in the batch. For software management from the CLI we have zypper
    Code:
    man zypper
    to find more.

    And
    Code:
    zypper patch
    does the same from the CLI as YaST > Software > Online Update. And when you then create a crontab entry to run that, you are done IMHO. You should of course check the man page to find out how to run zypper patch in such a way hat it does not ask things from you.
    Henk van Velden

  3. #3
    Join Date
    Sep 2012
    Posts
    5,315

    Default Re: Enable automatic updates (or any YaST setting) from command line

    Quote Originally Posted by hcvv View Post

    And
    Code:
    zypper patch
    does the same from the CLI as YaST > Software > Online Update.
    I'm not sure it is the same. zypper patch will install only patches. Whatever component notifies me about pending updates and installs them (13.1 with GNOME3) will also install newer versions of normal packages (e.g. from third party repos), not only official patches. I'd say, "zypper update" comes more close in this case.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,750

    Default Re: Enable automatic updates (or any YaST setting) from command line

    Quote Originally Posted by arvidjaar View Post
    I'm not sure it is the same. zypper patch will install only patches. Whatever component notifies me about pending updates and installs them (13.1 with GNOME3) will also install newer versions of normal packages (e.g. from third party repos), not only official patches. I'd say, "zypper update" comes more close in this case.
    The OP talks about YaST > Software > Online Update when I understand him correctly. And that is equivalent to zypper patch. YaST Online Update uses the Update repos only.

    When you do Yast > Software > Software Management and then open a list of all software on your system (several ways to get there) and then right click in the list and go for All in this list ... > Update when a newer version is available, that is equivalent with zypper up.

    Neither the OP nor I are talking about any Desktop related notifier (like Apper in KDE) and what it does. Thats is not subject of this thread IMHO.
    Henk van Velden

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Enable automatic updates (or any YaST setting) from command line

    On 2014-06-03 10:16, lasse kliemann wrote:
    >
    > By using YaST --> Software --> Online Update Configuration, one can
    > enable automatic updates.
    >
    > Is there any way to achieve the same settings by just using the command
    > line? This question naturally extends to all kinds of settings that can
    > be done within YaST.
    >
    > Background: I'd like to set up my server from scratch using a shell
    > script with the least possible manual interaction.


    Ok, all those settings, or most of them, are under "/etc/sysconfig/". It
    could be this one, or nearby:

    Code:
    
    > Telcontar:~ # grep AUTO /etc/sysconfig/*
    > grep: /etc/sysconfig/SuSEfirewall2.d: Is a directory
    > /etc/sysconfig/autofs:AUTOFS_OPTIONS=""
    > /etc/sysconfig/automatic_online_update:AOU_AUTO_AGREE_WITH_LICENSES="false"
    > ...
    Traditionally, you could change anything there, and then apply the
    changes by running "SuSEconfig". But this script has been removed, so
    changes will not be applied.

    Some of the variables are sourced by the scripts that need them, so they
    work automatically. Some do not, there is a helper script that
    translates the variables in that directory to the appropriate changes
    elsewhere - this is the case for the mail config, for instance. If you
    happen to know what is the script or command to implements that action,
    mail in this case, mail system will be adapted. But a change on, say,
    er... dns, will not.

    SuSEconfig took care of running all those scripts for you.


    You need to use YaST, “velis nolis”.



    Some collected notes.

    For mail, the command is "/usr/sbin/config.postfix" or
    "usr/sbin/config.sendmail", as appropriate. I don't know if that
    implements fetchmail changes, or anything in the toolchaing not postfix.

    For permissions, the command is now "chkstat --system" and "chkstat
    --system", plus "/sbin/set_polkit_default_privs".

    For SuSEconfig.glib2 the replacement might be
    "/usr/bin//update-desktop-database". Unverified.

    fonts-config


    "zypper in -f filesystem" - hum, I don't remember why I wrote this
    particular one :-? Permissions?



    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •