Results 1 to 4 of 4

Thread: what is the alternative to /etc/init.d/boot.localnet in opensuse to set hostname in boot time

  1. #1

    Default what is the alternative to /etc/init.d/boot.localnet in opensuse to set hostname in boot time

    script /etc/init.d/boot.localnet used to read the hostname value from /etc/hostname file during the boot time and set the hostname variable. In recent version of opensuse that this file is no longer present. So is there an alternative for this file?

  2. #2
    Join Date
    Sep 2012
    Posts
    7,096

    Default Re: what is the alternative to /etc/init.d/boot.localnet in opensuse to set hostname in boot time

    Hostname is set by systemd early on startup and it reads it from /etc/hostname or if this file is missing from /etc/HOSTNAME (traditional SUSE location).

  3. #3

    Default Re: what is the alternative to /etc/init.d/boot.localnet in opensuse to set hostname in boot time

    Hi Arvidjaar,

    I want to change hostname once after installation through running scripts. I used to edit /etc/HOSTNAME with the new name and used to run /etc/init.d/boot.localnet manually to read the latest hostname in /etc/HOSTNAME and set it in the system. Unfortunately without that script I am no longer able to do that. I do not want to restart my system for systemd to pickup. Do you know of the systemd command I can run to read latest hostname from /etc/HOSTNAME? It would be of great help if you can provide me that command.

  4. #4
    Join Date
    Sep 2012
    Posts
    7,096

    Default Re: what is the alternative to /etc/init.d/boot.localnet in opensuse to set hostname in boot time

    Quote Originally Posted by pradeepbr View Post
    Do you know of the systemd command I can run to read latest hostname from /etc/HOSTNAME?
    hostnamectl

Posting Permissions

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