Long Waiting Up for 60 Second Network

If you want to modify the /etc/init/failsafe.conf file to reduce the waiting time for the network to come up during system startup. Specifically, you want to remove the sleep 40 and sleep 50 commands from the network waiting section. Here’s how you can do it:

Note: Modifying system configuration files can have unintended consequences and may impact the stability and functionality of your system. Please make sure you have a backup of the original file and proceed with caution.

  1. Open a terminal on your Linux system.

  2. To edit the /etc/init/failsafe.conf file, you can use a text editor like nano or vi. Here, we’ll use nano:

    1
    
    sudo nano /etc/init/failsafe.conf
  3. Look for the section that waits for the network to come up. It might look something like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    # Wait for a network interface to come up.
    start on net-device-up IFACE!=lo
    task
    script
        # Add your network-related commands here, if any.
        # Remove or comment out the sleep commands you want to remove.
        # sleep 40
        # sleep 50
    end script
  4. As instructed, remove or comment out the sleep 40 and sleep 50 lines. To comment them out, simply add a # character at the beginning of each line like this:

    1
    2
    3
    4
    5
    6
    7
    8
    
    # Wait for a network interface to come up.
    start on net-device-up IFACE!=lo
    task
    script
        # Add your network-related commands here, if any.
        # sleep 40
        # sleep 50
    end script
  5. Save the file and exit the text editor. In nano, you can do this by pressing Ctrl + O, then Enter to save, and Ctrl + X to exit.

  6. After making these changes, you may need to restart your system or the relevant service for the changes to take effect. You can do this with:

    1
    
    sudo systemctl restart networking

Please be cautious when making changes to system configuration files, as improper modifications can lead to system instability. If you’re not confident in making these changes, it’s a good idea to consult with someone experienced or your system administrator.

0%