[opensuse] configure additional ip adress via commandline
Hello, ist it possible to configure an additional ip adress via the yast2 command line interface? Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface?
Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX" -- Per Jessen, Zürich (15.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 2/3/20 um 1:22 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface? Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX"
Yes, I know it. But it has gone with the next reboot. The to configure it via yast so it is written in the standard config would be a nice way. -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2020-02-03 09:54 AM, Daniel Spannbauer wrote:
Am 2/3/20 um 1:22 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface? Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX" Yes, I know it. But it has gone with the next reboot.
You can create a script that runs on start up. I used to use one called after.boot, IIRC, but I'm not sure what the current preferred method is. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Daniel Spannbauer wrote:
Am 2/3/20 um 1:22 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface? Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX"
Yes, I know it. But it has gone with the next reboot.
The to configure it via yast so it is written in the standard config would be a nice way.
you start up yast, go into network config, edit the interface and add the address(es) you want. It all goes into /etc/sysconfig/network/ifcfg-ethX. -- Per Jessen, Zürich (15.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 2/3/20 um 4:23 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Am 2/3/20 um 1:22 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface? Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX" Yes, I know it. But it has gone with the next reboot.
The to configure it via yast so it is written in the standard config would be a nice way. you start up yast, go into network config, edit the interface and add the address(es) you want.
It all goes into /etc/sysconfig/network/ifcfg-ethX.
I wan't to change the settings out of a python script. A nice way was to call yast via the command line interface (yast help or .e.g yast lan help) I don't wan't to write the config out via my python script. Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email ds@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Daniel Spannbauer wrote:
Am 2/3/20 um 4:23 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Am 2/3/20 um 1:22 PM schrieb Per Jessen:
Daniel Spannbauer wrote:
Hello,
ist it possible to configure an additional ip adress via the yast2 command line interface? Dunno about yast2, but how about "ip addr add x.x.x.x/n dev ethX" Yes, I know it. But it has gone with the next reboot.
The to configure it via yast so it is written in the standard config would be a nice way.
you start up yast, go into network config, edit the interface and add the address(es) you want.
It all goes into /etc/sysconfig/network/ifcfg-ethX.
I want to change the settings out of a python script.
Aha.
A nice way was to call yast via the command line interface (yast help or .e.g yast lan help)
I don't wan't to write the config out via my python script.
TMK, there is no API today that would permit editing /etc/sysconfig/network/ifcfg-ethX. I edit it with vi, sometimes with sed in installation scripts. -- Per Jessen, Zürich (17.7°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2020-02-03 11:37 AM, Per Jessen wrote:
I want to change the settings out of a python script. Aha.
A nice way was to call yast via the command line interface (yast help or .e.g yast lan help)
I don't wan't to write the config out via my python script. TMK, there is no API today that would permit editing /etc/sysconfig/network/ifcfg-ethX.
I edit it with vi, sometimes with sed in installation scripts.
The bash command was already given. You just need to include that in your script. Then start the script on boot up, according to current practice. I don't know what that current practice is though. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 2020-02-03 11:37 AM, Per Jessen wrote:
I want to change the settings out of a python script. Aha.
A nice way was to call yast via the command line interface (yast help or .e.g yast lan help)
I don't wan't to write the config out via my python script.
TMK, there is no API today that would permit editing /etc/sysconfig/network/ifcfg-ethX.
I edit it with vi, sometimes with sed in installation scripts.
The bash command was already given. You just need to include that in your script. Then start the script on boot up, according to current practice. I don't know what that current practice is though.
Current practice = let wicked configure it per ifcfg-ethX. I think Daniel is asking about an API with python bindings that would enable him to edit that config file via yast command line calls. -- Per Jessen, Zürich (16.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2020-02-03 01:15 PM, Per Jessen wrote:
The bash command was already given. You just need to include that in your script. Then start the script on boot up, according to current practice. I don't know what that current practice is though. Current practice = let wicked configure it per ifcfg-ethX.
I was referring to how to launch a script on boot up. I needed to do that a few years ago. There were at least 2 different methods, depending on how long ago. I mentioned after.boot. It was just a handy way to start any script. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 2020-02-03 01:15 PM, Per Jessen wrote:
The bash command was already given. You just need to include that in your script. Then start the script on boot up, according to current practice. I don't know what that current practice is though.
Current practice = let wicked configure it per ifcfg-ethX.
I was referring to how to launch a script on boot up. I needed to do that a few years ago. There were at least 2 different methods, depending on how long ago. I mentioned after.boot. It was just a handy way to start any script.
Oh I see. If it is user related, I like to use @reboot for cron. For system related stuff, I create a service unit. -- Per Jessen, Zürich (17.5°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Daniel Spannbauer
-
James Knott
-
Per Jessen