samoshi
By:
samoshi

Some pre-defined services in /etc/rc.conf I want to remove in FreeBsd

June 7, 2017 495 views
Deployment FreeBSD

There're some services in FreeBsd in /etc/rc.conf

# vim /etc/rc.conf

sshd_enable="YES"

digitaloceanpre="YES"
cloudinit_enable="YES"
digitalocean="YES"

What are the last 3 for? Can I remove them?

3 Answers

Please don't, iirc, I think the scripts do initialization during VPS boot up. You instance might become unreachable when it boots up as it is not registered to DO service. If necessary checkout the exact scripts these statements invoke.

  • checkout the exact scripts these statements invoke.

    how?

    • So on my local FreeBSD 11 VM SSH script is in /etc/rc.d/ and the snippet:

      % head /etc/rc.d/sshd
      
      #!/bin/sh
      #
      # $FreeBSD: releng/11.0/etc/rc.d/sshd 303770 2016-08-05 15:32:35Z des $
      #
      
      # PROVIDE: sshd
      # REQUIRE: LOGIN FILESYSTEMS
      # KEYWORD: shutdown
      
      . /etc/rc.subr
      
      • my question isn't about sshd!

        • Well, if you read my reply, I have stated it is on my local VM. I have shared an example.
          I don't have access to a DO droplet at the moment to check for others. Checkout the above mentioned path and see if the other scripts exists there.

Hi @samoshi

You can safely remove those services, but if you restore a snapshot/backup, it will not spin up correctly, since those services are partly responsible for setting the correct network interface and other specific things of your droplet.
That means you have to use the Console via the control panel to re-establish the services to get networking working again or manual edit the configurations.

And if you resize your droplet, there might be problems too. As well as if the data center reboots, then it's important for getting the droplet up again correctly.

All in it's very tiny scripts, which are helpful for managing your droplet.
I would say the same thing as @mzs114 - leave them.

Have another answer? Share your knowledge.