Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    init / kernel - change the script that gets called when pressing power button?

    Scheduled Pinned Locked Moved Hardware
    1 Posts 1 Posters 122 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • luckman212L
      luckman212 LAYER 8
      last edited by luckman212

      Right after I discovered how to disable the power button to prevent unexpected internet outages, my mind drifted to the idea of making that now-defunct button do something else instead. Maybe run a script that renews the WAN DHCP lease, or toggles a VPN connection, etc.

      I saw in the docs for init(8) some notes about the process itself, but it didn't seem possible to change it to call anything other than /etc/rc.shutdown. Just came here to ask if any of you FreeBSD gurus know otherwise.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.