blob: 743eab558e5fbcd7836e5f74abd4e4f456bd1f0c [file] [log] [blame]
Brad Bishop5a3ac182020-01-07 09:03:18 -05001set_mac = dependency('systemd', required: get_option('first-boot-set-mac'))
Patrick Williams6b7fa812025-02-01 08:38:17 -05002set_hostname = dependency(
3 'systemd',
4 required: get_option('first-boot-set-hostname'),
5)
Brad Bishop5a3ac182020-01-07 09:03:18 -05006
7if set_mac.found()
8 install_data(
9 'first-boot-set-mac.sh',
10 install_mode: 'rwxr-xr-x',
11 install_dir: get_option('bindir'),
12 )
13
14 configure_file(
15 input: 'first-boot-set-mac@.service',
16 output: 'first-boot-set-mac@.service',
17 copy: true,
Patrick Williams6b7fa812025-02-01 08:38:17 -050018 install_dir: set_mac.get_variable('systemdsystemunitdir'),
Brad Bishop5a3ac182020-01-07 09:03:18 -050019 )
20endif
Brad Bishop403e2632020-01-07 09:44:35 -050021
22if set_hostname.found()
23 install_data(
24 'first-boot-set-hostname.sh',
25 install_mode: 'rwxr-xr-x',
26 install_dir: get_option('bindir'),
27 )
28
29 configure_file(
30 input: 'first-boot-set-hostname.service',
31 output: 'first-boot-set-hostname.service',
32 copy: true,
Patrick Williams6b7fa812025-02-01 08:38:17 -050033 install_dir: set_hostname.get_variable('systemdsystemunitdir'),
Brad Bishop403e2632020-01-07 09:44:35 -050034 )
35endif