build: fix installation of getty symlinks

The getty symlinks are installed both in the init.d directory and the
default runlevel directory. This makes the getty installation consistent
with the rest of the runlevel setup.
This commit is contained in:
William Hubbs 2025-04-29 10:16:53 -05:00 committed by navi
parent a05efd2246
commit 0026e6a1ee
2 changed files with 10 additions and 4 deletions

View File

@ -105,11 +105,10 @@ install_symlink('functions.sh',
install_dir: init_d_dir)
if get_option('sysvinit') == true and os == 'Linux'
default_runlevel_dir = get_option('sysconfdir') / 'runlevels' / 'default'
foreach x : get_option('agetty')
link_name = 'agetty.' + x
install_symlink(link_name, install_dir: init_d_dir, pointing_to: 'agetty')
install_symlink(link_name, install_dir: default_runlevel_dir,
pointing_to: init_d_dir / link_name)
install_symlink(link_name,
install_dir: init_d_dir,
pointing_to: 'agetty')
endforeach
endif

View File

@ -89,4 +89,11 @@ foreach runlevel: runlevels.keys()
install_dir: runlevel_dir / runlevel,
pointing_to: init_d_dir / service)
endforeach
if get_option('sysvinit') == true and os == 'Linux' and runlevel == 'default'
foreach tty : get_option('agetty')
install_symlink('agetty.' + tty,
install_dir: runlevel_dir / runlevel,
pointing_to: init_d_dir / 'agetty.' + tty)
endforeach
endif
endforeach