OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • How does the +TARGETS file in a plugin work?
« previous next »
  • Print
Pages: [1]

Author Topic: How does the +TARGETS file in a plugin work?  (Read 284 times)

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
How does the +TARGETS file in a plugin work?
« on: October 17, 2024, 08:20:28 pm »
Hi all,

if I want to copy "distro" to "/usr/local/sbin/distro" like so:
Code: [Select]
distro:/usr/local/sbin/distro

is there a way to specify that the file should be installed mode 755?

Thanks!
Patrick
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: How does the +TARGETS file in a plugin work?
« Reply #1 on: October 17, 2024, 09:32:11 pm »
I don't want to answer directly, so let me give you a question:

Do you need to template your binary (script)? If not you can put it in src/sbin/distro and chmod 755 in git which installs it directly into the directory.

If the script is templated try to make a config file to template and move the binary to src/sbin anyway. It's good practice.


Cheers,
Franco
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6923
  • Karma: 583
    • View Profile
Re: How does the +TARGETS file in a plugin work?
« Reply #2 on: October 17, 2024, 09:37:48 pm »
Quote from: franco on October 17, 2024, 09:32:11 pm
Do you need to template your binary (script)? If not you can put it in src/sbin/distro and chmod 755 in git which installs it directly into the directory.

Great! Thanks!
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • How does the +TARGETS file in a plugin work?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2