...
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -55,3 +55,4 @@ MCP_HTTP_REST_IMPLEMENTATION_PLAN.md
|
||||
.kilocode
|
||||
.continue
|
||||
tmux_logger
|
||||
release
|
||||
BIN
examples/osal/sshagent/sshagent
Executable file
BIN
examples/osal/sshagent/sshagent
Executable file
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
||||
|
||||
import freeflowuniverse.herolib.osal.sshagent
|
||||
import freeflowuniverse.herolib.builder
|
||||
|
||||
54
install_v.sh
54
install_v.sh
@@ -81,6 +81,59 @@ export DIR_BUILD="/tmp"
|
||||
export DIR_CODE="$DIR_BASE/code"
|
||||
export DIR_CODE_V="$DIR_BASE/_code"
|
||||
|
||||
check_release() {
|
||||
if ! command -v lsb_release >/dev/null 2>&1; then
|
||||
echo "❌ lsb_release command not found. Install 'lsb-release' package first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CODENAME=$(lsb_release -sc)
|
||||
RELEASE=$(lsb_release -rs)
|
||||
|
||||
if dpkg --compare-versions "$RELEASE" lt "24.04"; then
|
||||
echo "ℹ️ Detected Ubuntu $RELEASE ($CODENAME). Skipping mirror fix (requires 24.04+)."
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
ubuntu_sources_fix() {
|
||||
if check_release; then
|
||||
local CODENAME
|
||||
CODENAME=$(lsb_release -sc)
|
||||
local TIMESTAMP
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
|
||||
echo "🔎 Fixing apt mirror setup for Ubuntu $(lsb_release -rs) ($CODENAME)..."
|
||||
|
||||
if [ -f /etc/apt/sources.list ]; then
|
||||
echo "📦 Backing up /etc/apt/sources.list -> /etc/apt/sources.list.backup.$TIMESTAMP"
|
||||
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup.$TIMESTAMP
|
||||
fi
|
||||
|
||||
if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then
|
||||
echo "📦 Backing up /etc/apt/sources.list.d/ubuntu.sources -> /etc/apt/sources.list.d/ubuntu.sources.backup.$TIMESTAMP"
|
||||
sudo mv /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.backup.$TIMESTAMP
|
||||
fi
|
||||
|
||||
echo "📝 Writing new /etc/apt/sources.list.d/ubuntu.sources"
|
||||
sudo tee /etc/apt/sources.list.d/ubuntu.sources >/dev/null <<EOF
|
||||
Types: deb
|
||||
URIs: mirror://mirrors.ubuntu.com/mirrors.txt
|
||||
Suites: $CODENAME $CODENAME-updates $CODENAME-backports $CODENAME-security
|
||||
Components: main restricted universe multiverse
|
||||
EOF
|
||||
|
||||
echo "🔄 Running apt update..."
|
||||
sudo apt update -qq
|
||||
|
||||
echo "✅ Done! Your system now uses the rotating Ubuntu mirror list."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sshknownkeysadd {
|
||||
mkdir -p ~/.ssh
|
||||
touch ~/.ssh/known_hosts
|
||||
@@ -172,6 +225,7 @@ function myplatform {
|
||||
myplatform
|
||||
|
||||
function os_update {
|
||||
ubuntu_sources_fix
|
||||
echo ' - os update'
|
||||
if [[ "${OSNAME}" == "ubuntu" ]]; then
|
||||
if is_github_actions; then
|
||||
|
||||
@@ -18,6 +18,7 @@ pub mut:
|
||||
pub fn this_remote_exec(args_ ThisRemoteArgs) !bool {
|
||||
mut args := args_
|
||||
if args.script.trim_space().starts_with('/tmp/remote_') {
|
||||
// TODO: don't understand this
|
||||
return false // means we need to execute
|
||||
}
|
||||
addr := texttools.to_array(args.nodes)
|
||||
|
||||
2
lib/builder/ubuntu_solutions.v
Normal file
2
lib/builder/ubuntu_solutions.v
Normal file
@@ -0,0 +1,2 @@
|
||||
pub fn ubuntu_sources_fix() {
|
||||
}
|
||||
Reference in New Issue
Block a user