mirror of https://github.com/fairyglade/ly.git
Use shutdown -p now on FreeBSD, update instructions
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
44c8acff16
commit
bfb3f925d9
|
|
@ -134,6 +134,10 @@ pub fn Installer(install_config: bool) type {
|
||||||
try patch_map.put("$PREFIX_DIRECTORY", prefix_directory);
|
try patch_map.put("$PREFIX_DIRECTORY", prefix_directory);
|
||||||
try patch_map.put("$EXECUTABLE_NAME", executable_name);
|
try patch_map.put("$EXECUTABLE_NAME", executable_name);
|
||||||
|
|
||||||
|
// The "-a" argument doesn't exist on FreeBSD, so we use "-p"
|
||||||
|
// instead to shutdown the system.
|
||||||
|
try patch_map.put("$PLATFORM_SHUTDOWN_ARG", if (init_system == .freebsd) "-p" else "-a");
|
||||||
|
|
||||||
try install_ly(allocator, patch_map, install_config);
|
try install_ly(allocator, patch_map, install_config);
|
||||||
try install_service(allocator, patch_map);
|
try install_service(allocator, patch_map);
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +363,7 @@ pub fn Uninstaller(uninstall_config: bool) type {
|
||||||
},
|
},
|
||||||
.dinit => try deleteFile(allocator, config_directory, "/dinit.d/ly", "dinit service not found"),
|
.dinit => try deleteFile(allocator, config_directory, "/dinit.d/ly", "dinit service not found"),
|
||||||
.sysvinit => try deleteFile(allocator, config_directory, "/init.d/ly", "sysvinit service not found"),
|
.sysvinit => try deleteFile(allocator, config_directory, "/init.d/ly", "sysvinit service not found"),
|
||||||
.freebsd => try deleteFile(allocator, config_directory, "/rc.d/ly", "freebsd service not found"),
|
.freebsd => try deleteFile(allocator, prefix_directory, "/bin/ly_wrapper", "freebsd wrapper not found"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ To disable TTY 2, go to `/etc/inittab` and comment out the line containing `tty2
|
||||||
### FreeBSD
|
### FreeBSD
|
||||||
|
|
||||||
```
|
```
|
||||||
# zig build installexe -Dprefix_directory=/usr/local -Dinit_system=freebsd
|
# zig build installexe -Dprefix_directory=/usr/local -Dconfig_directory=/usr/local/etc -Dinit_system=freebsd
|
||||||
# sysrc lightdm_enable="NO"
|
# sysrc lightdm_enable="NO"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ session_log = ly-session.log
|
||||||
setup_cmd = $CONFIG_DIRECTORY/ly/setup.sh
|
setup_cmd = $CONFIG_DIRECTORY/ly/setup.sh
|
||||||
|
|
||||||
# Command executed when pressing shutdown_key
|
# Command executed when pressing shutdown_key
|
||||||
shutdown_cmd = /sbin/shutdown -a now
|
shutdown_cmd = /sbin/shutdown $PLATFORM_SHUTDOWN_ARG now
|
||||||
|
|
||||||
# Specifies the key used for shutdown (F1-F12)
|
# Specifies the key used for shutdown (F1-F12)
|
||||||
shutdown_key = F1
|
shutdown_key = F1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue