fix all references embassyd -> startd (#2355)

This commit is contained in:
Aiden McClelland
2023-07-14 12:29:20 -06:00
committed by GitHub
parent 2c07cf50fa
commit 59d6795d9e
10 changed files with 21 additions and 26 deletions

View File

@@ -103,10 +103,9 @@ update-overlay:
@echo "\033[33mALL CHANGES WILL BE REVERTED IF YOU RESTART THE DEVICE\033[0m" @echo "\033[33mALL CHANGES WILL BE REVERTED IF YOU RESTART THE DEVICE\033[0m"
@if [ -z "$(REMOTE)" ]; then >&2 echo "Must specify REMOTE" && false; fi @if [ -z "$(REMOTE)" ]; then >&2 echo "Must specify REMOTE" && false; fi
@if [ "`ssh $(REMOTE) 'cat /usr/lib/embassy/VERSION.txt'`" != "`cat ./VERSION.txt`" ]; then >&2 echo "StartOS requires migrations: update-overlay is unavailable." && false; fi @if [ "`ssh $(REMOTE) 'cat /usr/lib/embassy/VERSION.txt'`" != "`cat ./VERSION.txt`" ]; then >&2 echo "StartOS requires migrations: update-overlay is unavailable." && false; fi
@if ssh $(REMOTE) "pidof embassy-init"; then >&2 echo "Embassy in INIT: update-overlay is unavailable." && false; fi ssh $(REMOTE) "sudo systemctl stop startd"
ssh $(REMOTE) "sudo systemctl stop embassyd"
$(MAKE) install REMOTE=$(REMOTE) OS_ARCH=$(OS_ARCH) $(MAKE) install REMOTE=$(REMOTE) OS_ARCH=$(OS_ARCH)
ssh $(REMOTE) "sudo systemctl start embassyd" ssh $(REMOTE) "sudo systemctl start startd"
update: update:
@if [ -z "$(REMOTE)" ]; then >&2 echo "Must specify REMOTE" && false; fi @if [ -z "$(REMOTE)" ]; then >&2 echo "Must specify REMOTE" && false; fi

View File

@@ -12,18 +12,17 @@
## Structure ## Structure
The StartOS backend is broken up into 4 different binaries: The StartOS backend is packed into a single binary `startbox` that is symlinked under
several different names for different behaviour:
- embassyd: This is the main workhorse of StartOS - any new functionality you - startd: This is the main workhorse of StartOS - any new functionality you
want will likely go here want will likely go here
- embassy-init: This is the component responsible for allowing you to set up - start-cli: This is a CLI tool that will allow you to issue commands to
your device, and handles system initialization on startup startd and control it similarly to the UI
- embassy-cli: This is a CLI tool that will allow you to issue commands to - start-sdk: This is a CLI tool that aids in building and packaging services
embassyd and control it similarly to the UI
- embassy-sdk: This is a CLI tool that aids in building and packaging services
you wish to deploy to StartOS you wish to deploy to StartOS
Finally there is a library `embassy` that supports all four of these tools. Finally there is a library `startos` that supports all of these tools.
See [here](/backend/Cargo.toml) for details. See [here](/backend/Cargo.toml) for details.

View File

@@ -72,5 +72,3 @@ sudo chown -R $USER ../libs/target
if [ -n "$fail" ]; then if [ -n "$fail" ]; then
exit 1 exit 1
fi fi
#rust-arm64-builder aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/embassyd

View File

@@ -4,24 +4,24 @@ use std::path::Path;
pub mod avahi_alias; pub mod avahi_alias;
pub mod deprecated; pub mod deprecated;
#[cfg(feature = "cli")] #[cfg(feature = "cli")]
pub mod embassy_cli; pub mod start_cli;
#[cfg(feature = "daemon")] #[cfg(feature = "daemon")]
pub mod embassy_init; pub mod start_init;
#[cfg(feature = "sdk")] #[cfg(feature = "sdk")]
pub mod embassy_sdk; pub mod start_sdk;
#[cfg(feature = "daemon")] #[cfg(feature = "daemon")]
pub mod embassyd; pub mod startd;
fn select_executable(name: &str) -> Option<fn()> { fn select_executable(name: &str) -> Option<fn()> {
match name { match name {
#[cfg(feature = "avahi-alias")] #[cfg(feature = "avahi-alias")]
"avahi-alias" => Some(avahi_alias::main), "avahi-alias" => Some(avahi_alias::main),
#[cfg(feature = "cli")] #[cfg(feature = "cli")]
"start-cli" => Some(embassy_cli::main), "start-cli" => Some(start_cli::main),
#[cfg(feature = "sdk")] #[cfg(feature = "sdk")]
"start-sdk" => Some(embassy_sdk::main), "start-sdk" => Some(start_sdk::main),
#[cfg(feature = "daemon")] #[cfg(feature = "daemon")]
"startd" => Some(embassyd::main), "startd" => Some(startd::main),
"embassy-cli" => Some(|| deprecated::renamed("embassy-cli", "start-cli")), "embassy-cli" => Some(|| deprecated::renamed("embassy-cli", "start-cli")),
"embassy-sdk" => Some(|| deprecated::renamed("embassy-sdk", "start-sdk")), "embassy-sdk" => Some(|| deprecated::renamed("embassy-sdk", "start-sdk")),
"embassyd" => Some(|| deprecated::renamed("embassyd", "startd")), "embassyd" => Some(|| deprecated::renamed("embassyd", "startd")),

View File

@@ -225,7 +225,7 @@ async fn inner_main(cfg_path: Option<PathBuf>) -> Result<Option<Shutdown>, Error
} }
pub fn main() { pub fn main() {
let matches = clap::App::new("embassy-init") let matches = clap::App::new("start-init")
.arg( .arg(
clap::Arg::with_name("config") clap::Arg::with_name("config")
.short('c') .short('c')

View File

@@ -105,11 +105,11 @@ pub fn main() {
EmbassyLogger::init(); EmbassyLogger::init();
if !Path::new("/run/embassy/initialized").exists() { if !Path::new("/run/embassy/initialized").exists() {
super::embassy_init::main(); super::start_init::main();
std::fs::write("/run/embassy/initialized", "").unwrap(); std::fs::write("/run/embassy/initialized", "").unwrap();
} }
let matches = clap::App::new("embassyd") let matches = clap::App::new("startd")
.arg( .arg(
clap::Arg::with_name("config") clap::Arg::with_name("config")
.short('c') .short('c')

View File

@@ -9,11 +9,10 @@ use crate::disk::repair;
use crate::init::SYSTEM_REBUILD_PATH; use crate::init::SYSTEM_REBUILD_PATH;
use crate::logs::{fetch_logs, LogResponse, LogSource}; use crate::logs::{fetch_logs, LogResponse, LogSource};
use crate::shutdown::Shutdown; use crate::shutdown::Shutdown;
use crate::system::SYSTEMD_UNIT;
use crate::util::display_none; use crate::util::display_none;
use crate::Error; use crate::Error;
pub const SYSTEMD_UNIT: &'static str = "embassy-init";
#[command(subcommands(error, logs, exit, restart, forget_disk, disk, rebuild))] #[command(subcommands(error, logs, exit, restart, forget_disk, disk, rebuild))]
pub fn diagnostic() -> Result<(), Error> { pub fn diagnostic() -> Result<(), Error> {
Ok(()) Ok(())

View File

@@ -22,7 +22,7 @@ use crate::util::serde::{display_serializable, IoFormat};
use crate::util::{display_none, Invoke}; use crate::util::{display_none, Invoke};
use crate::{Error, ErrorKind, ResultExt}; use crate::{Error, ErrorKind, ResultExt};
pub const SYSTEMD_UNIT: &'static str = "embassyd"; pub const SYSTEMD_UNIT: &'static str = "startd";
#[command(subcommands(zram))] #[command(subcommands(zram))]
pub async fn experimental() -> Result<(), Error> { pub async fn experimental() -> Result<(), Error> {