Script to enable and disable interface eth

General support questions
Post Reply
4Unknow
Posts: 1
Joined: 2018/10/08 19:41:01

Script to enable and disable interface eth

Post by 4Unknow » 2018/10/08 19:43:16

Hello dear friends.

I wonder if there is a way to create a script in centos 6 where at a certain time it activates and deactivates the network card.

Is it possible, is there a way?

Thanks for the help.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Script to enable and disable interface eth

Post by TrevorH » 2018/10/08 20:49:45

The `ifup` and `ifdown` scripts already exist and bring it up or down. They won't do anything about timed invocation but there's always crontab for that. This all does rather depend on what you aim to do if it goes wrong though - can you live with it not being online when it should be? Or being online when it shouldn't be?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply