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

    Programming syntax request

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 1.2k 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.
    • W
      woeper
      last edited by

      Who will help me on this ?
      I have no idea how the exact syntax is to be able to allow this to work ….
      I modified /etc/rc.bootup ...

      echo "Initializing...";
              echo "Reset LED panel...";
      exec ("/bin/lprled -r");
              echo "Set unarmed mode and current boot slice on LED panel.";
              if ("mount | grep /dev/ufs/pfsense | cut -d' ' -f1" == "/dev/ufs/pfsense0")
      exec ("/bin/lprled -b 0 -w 0x9");
      else
      exec ("/bin/lprled -b 0 -w 0x5");

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        @woeper:

        Who will help me on this ?
        I have no idea how the exact syntax is to be able to allow this to work ….
        I modified /etc/rc.bootup ...

        Try this:

        
        	echo "Initializing...";
        	echo "Reset LED panel...";
        	exec("/bin/lprled -r");
        	echo "Set unarmed mode and current boot slice on LED panel.";
        	if (`mount | grep /dev/ufs/pfsense | cut -d' ' -f1` == "/dev/ufs/pfsense0") 
        		exec("/bin/lprled -b 0 -w 0x9");
        	else
        		exec("/bin/lprled -b 0 -w 0x5");
        

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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