mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
green/blue labels
This commit is contained in:
committed by
Aiden McClelland
parent
f995b5a12a
commit
6f1cd49b1b
@@ -3,6 +3,8 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use rpc_toolkit::command;
|
use rpc_toolkit::command;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use tokio::fs::File;
|
||||||
|
use tokio::io::AsyncWriteExt;
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
use torut::onion::TorSecretKeyV3;
|
use torut::onion::TorSecretKeyV3;
|
||||||
|
|
||||||
@@ -98,9 +100,11 @@ pub async fn execute_inner(
|
|||||||
)
|
)
|
||||||
.execute(&mut sqlite_pool.acquire().await?)
|
.execute(&mut sqlite_pool.acquire().await?)
|
||||||
.await?;
|
.await?;
|
||||||
tokio::fs::write("/embassy-os/disk.guid", &guid)
|
let mut guid_file = File::create("/embassy-os/disk.guid").await?;
|
||||||
.await
|
guid_file.write_all(guid.as_bytes()).await?;
|
||||||
.with_ctx(|_| (crate::ErrorKind::Filesystem, "/embassy-os/disk.guid"))?;
|
guid_file.sync_all().await?;
|
||||||
|
crate::disk::main::export(&ctx.zfs_pool_name).await?;
|
||||||
|
|
||||||
ctx.shutdown.send(()).expect("failed to shutdown");
|
ctx.shutdown.send(()).expect("failed to shutdown");
|
||||||
|
|
||||||
Ok(SetupResult {
|
Ok(SetupResult {
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ sudo losetup -d $LOOPDEV
|
|||||||
# Label the filesystems
|
# Label the filesystems
|
||||||
sudo fatlabel ${OUTPUT_DEVICE}p1 system-boot
|
sudo fatlabel ${OUTPUT_DEVICE}p1 system-boot
|
||||||
sudo fatlabel ${OUTPUT_DEVICE}p2 EMBASSY
|
sudo fatlabel ${OUTPUT_DEVICE}p2 EMBASSY
|
||||||
sudo e2label ${OUTPUT_DEVICE}p3 writable
|
sudo e2label ${OUTPUT_DEVICE}p3 green
|
||||||
sudo e2label ${OUTPUT_DEVICE}p4 reserved
|
sudo e2label ${OUTPUT_DEVICE}p4 blue
|
||||||
|
|
||||||
# Mount the boot partition and config
|
# Mount the boot partition and config
|
||||||
mkdir -p /tmp/eos-mnt
|
mkdir -p /tmp/eos-mnt
|
||||||
sudo mount ${OUTPUT_DEVICE}p1 /tmp/eos-mnt
|
sudo mount ${OUTPUT_DEVICE}p1 /tmp/eos-mnt
|
||||||
|
|
||||||
|
sudo sed -i 's/LABEL=writable/LABEL=green/g' /tmp/eos-mnt/cmdline.txt
|
||||||
cat /tmp/eos-mnt/config.txt | grep -v "dtoverlay=" | sudo tee /tmp/eos-mnt/config.txt.tmp
|
cat /tmp/eos-mnt/config.txt | grep -v "dtoverlay=" | sudo tee /tmp/eos-mnt/config.txt.tmp
|
||||||
echo "dtoverlay=pwm-2chan" | sudo tee -a /tmp/eos-mnt/config.txt.tmp
|
echo "dtoverlay=pwm-2chan" | sudo tee -a /tmp/eos-mnt/config.txt.tmp
|
||||||
sudo mv /tmp/eos-mnt/config.txt.tmp /tmp/eos-mnt/config.txt
|
sudo mv /tmp/eos-mnt/config.txt.tmp /tmp/eos-mnt/config.txt
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export class HttpService {
|
|||||||
|
|
||||||
const req = this.http.post(url, options.body, options)
|
const req = this.http.post(url, options.body, options)
|
||||||
|
|
||||||
return (withTimeout(req, 60000))
|
return (req)
|
||||||
.toPromise()
|
.toPromise()
|
||||||
.then(res => AES_CTR.decryptPbkdf2(this.productKey, (res as any).body as ArrayBuffer))
|
.then(res => AES_CTR.decryptPbkdf2(this.productKey, (res as any).body as ArrayBuffer))
|
||||||
.then(res => JSON.parse(res))
|
.then(res => JSON.parse(res))
|
||||||
|
|||||||
Reference in New Issue
Block a user