1set_mac = dependency('systemd', required: get_option('first-boot-set-mac')) 2set_hostname = dependency( 3 'systemd', 4 required: get_option('first-boot-set-hostname'), 5) 6 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, 18 install_dir: set_mac.get_variable('systemdsystemunitdir'), 19 ) 20endif 21 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, 33 install_dir: set_hostname.get_variable('systemdsystemunitdir'), 34 ) 35endif 36