Brad Bishop | 5a3ac18 | 2020-01-07 09:03:18 -0500 | [diff] [blame] | 1 | set_mac = dependency('systemd', required: get_option('first-boot-set-mac')) |
Brad Bishop | 403e263 | 2020-01-07 09:44:35 -0500 | [diff] [blame] | 2 | set_hostname = dependency('systemd', required: get_option('first-boot-set-hostname')) |
Brad Bishop | 5a3ac18 | 2020-01-07 09:03:18 -0500 | [diff] [blame] | 3 | |
| 4 | if set_mac.found() |
| 5 | install_data( |
| 6 | 'first-boot-set-mac.sh', |
| 7 | install_mode: 'rwxr-xr-x', |
| 8 | install_dir: get_option('bindir'), |
| 9 | ) |
| 10 | |
| 11 | configure_file( |
| 12 | input: 'first-boot-set-mac@.service', |
| 13 | output: 'first-boot-set-mac@.service', |
| 14 | copy: true, |
| 15 | install_dir: |
Patrick Williams | 8419820 | 2023-04-12 08:01:26 -0500 | [diff] [blame] | 16 | set_mac.get_variable('systemdsystemunitdir'), |
Brad Bishop | 5a3ac18 | 2020-01-07 09:03:18 -0500 | [diff] [blame] | 17 | ) |
| 18 | endif |
Brad Bishop | 403e263 | 2020-01-07 09:44:35 -0500 | [diff] [blame] | 19 | |
| 20 | if set_hostname.found() |
| 21 | install_data( |
| 22 | 'first-boot-set-hostname.sh', |
| 23 | install_mode: 'rwxr-xr-x', |
| 24 | install_dir: get_option('bindir'), |
| 25 | ) |
| 26 | |
| 27 | configure_file( |
| 28 | input: 'first-boot-set-hostname.service', |
| 29 | output: 'first-boot-set-hostname.service', |
| 30 | copy: true, |
| 31 | install_dir: |
Patrick Williams | 8419820 | 2023-04-12 08:01:26 -0500 | [diff] [blame] | 32 | set_hostname.get_variable('systemdsystemunitdir'), |
Brad Bishop | 403e263 | 2020-01-07 09:44:35 -0500 | [diff] [blame] | 33 | ) |
| 34 | endif |