@@ -60,7 +60,7 @@ conf.set10('HAVE_SPLIT_USR', split_usr)
6060rootprefixdir = get_option (' rootprefix' )
6161# Unusual rootprefixdir values are used by some distros
6262# (see https://github.com/systemd/systemd/pull/7461).
63- rootprefix_default = get_option ( ' split-usr ' ) ? ' /' : ' /usr'
63+ rootprefix_default = split_usr ? ' /' : ' /usr'
6464if rootprefixdir == ''
6565 rootprefixdir = rootprefix_default
6666endif
@@ -87,6 +87,7 @@ datadir = join_paths(prefixdir, get_option('datadir'))
8787localstatedir = join_paths (' /' , get_option (' localstatedir' ))
8888
8989rootbindir = join_paths (rootprefixdir, ' bin' )
90+ rootsbindir = join_paths (rootprefixdir, ' sbin' )
9091rootlibexecdir = join_paths (rootprefixdir, ' lib/systemd' )
9192
9293rootlibdir = get_option (' rootlibdir' )
@@ -1453,6 +1454,10 @@ executable('systemd',
14531454 install : true ,
14541455 install_dir : rootlibexecdir)
14551456
1457+ meson .add_install_script(meson_make_symlink,
1458+ join_paths (rootlibexecdir, ' systemd' ),
1459+ join_paths (rootsbindir, ' init' ))
1460+
14561461exe = executable (' systemd-analyze' ,
14571462 systemd_analyze_sources,
14581463 include_directories : includes,
@@ -1712,6 +1717,12 @@ exe = executable('systemctl', 'src/systemctl/systemctl.c',
17121717 install_dir : rootbindir)
17131718public_programs += [exe]
17141719
1720+ foreach alias : [' halt' , ' poweroff' , ' reboot' , ' runlevel' , ' shutdown' , ' telinit' ]
1721+ meson .add_install_script(meson_make_symlink,
1722+ join_paths (rootbindir, ' systemctl' ),
1723+ join_paths (rootsbindir, alias))
1724+ endforeach
1725+
17151726if conf.get(' ENABLE_BACKLIGHT' ) == 1
17161727 executable (' systemd-backlight' ,
17171728 ' src/backlight/backlight.c' ,
0 commit comments