Fix all hardcoded ubuntu-ublue paths to particle-os in config and scriptlets
This commit is contained in:
parent
5f59b3510a
commit
14d7da71e8
7 changed files with 34 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"default_container_runtime": "podman",
|
||||
"default_workspace": "/var/lib/ubuntu-ublue",
|
||||
"default_workspace": "/var/lib/particle-os",
|
||||
"feature_toggles": {
|
||||
"live_overlay": true,
|
||||
"oci_integration": true,
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
"retention_days": 60,
|
||||
"compression": true,
|
||||
"encryption": false,
|
||||
"backup_location": "/var/lib/ubuntu-ublue/backups"
|
||||
"backup_location": "/var/lib/particle-os/backups"
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"retention_days": 30,
|
||||
"keep_recent": 2,
|
||||
"deployments_dir": "/var/lib/ubuntu-ublue/deployments",
|
||||
"deployments_dir": "/var/lib/particle-os/deployments",
|
||||
"logs_dir": "/var/log/apt-layer",
|
||||
"backups_dir": "/var/lib/ubuntu-ublue/backups"
|
||||
"backups_dir": "/var/lib/particle-os/backups"
|
||||
}
|
||||
|
|
@ -21,14 +21,25 @@ init_live_overlay_system() {
|
|||
mkdir -p "${UBLUE_LIVE_OVERLAY_DIR:-/var/lib/particle-os/live-overlay}" "${UBLUE_LIVE_UPPER_DIR:-/var/lib/particle-os/live-overlay/upper}" "${UBLUE_LIVE_WORK_DIR:-/var/lib/particle-os/live-overlay/work}"
|
||||
mkdir -p "$LIVE_OVERLAY_MOUNT_POINT"
|
||||
|
||||
# Set proper permissions
|
||||
chmod 755 "${UBLUE_LIVE_OVERLAY_DIR:-/var/lib/particle-os/live-overlay}"
|
||||
chmod 700 "${UBLUE_LIVE_UPPER_DIR:-/var/lib/particle-os/live-overlay/upper}" "${UBLUE_LIVE_WORK_DIR:-/var/lib/particle-os/live-overlay/work}"
|
||||
# Set proper permissions (use sudo if needed)
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
# Running as root, use chmod directly
|
||||
chmod 755 "${UBLUE_LIVE_OVERLAY_DIR:-/var/lib/particle-os/live-overlay}" 2>/dev/null || true
|
||||
chmod 700 "${UBLUE_LIVE_UPPER_DIR:-/var/lib/particle-os/live-overlay/upper}" "${UBLUE_LIVE_WORK_DIR:-/var/lib/particle-os/live-overlay/work}" 2>/dev/null || true
|
||||
else
|
||||
# Running as regular user, use sudo
|
||||
sudo chmod 755 "${UBLUE_LIVE_OVERLAY_DIR:-/var/lib/particle-os/live-overlay}" 2>/dev/null || true
|
||||
sudo chmod 700 "${UBLUE_LIVE_UPPER_DIR:-/var/lib/particle-os/live-overlay/upper}" "${UBLUE_LIVE_WORK_DIR:-/var/lib/particle-os/live-overlay/work}" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Initialize package log if it doesn't exist
|
||||
if [[ ! -f "$LIVE_OVERLAY_PACKAGE_LOG" ]]; then
|
||||
touch "$LIVE_OVERLAY_PACKAGE_LOG"
|
||||
chmod 644 "$LIVE_OVERLAY_PACKAGE_LOG"
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
chmod 644 "$LIVE_OVERLAY_PACKAGE_LOG" 2>/dev/null || true
|
||||
else
|
||||
sudo chmod 644 "$LIVE_OVERLAY_PACKAGE_LOG" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Conditional DNS fix for chroot overlay (WSL, etc)
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
# =============================================================================
|
||||
|
||||
# Bootloader configuration (with fallbacks for when particle-config.sh is not loaded)
|
||||
BOOTLOADER_CONFIG_DIR="${UBLUE_CONFIG_DIR:-/etc/ubuntu-ublue}/bootloader"
|
||||
BOOTLOADER_CONFIG_DIR="${UBLUE_CONFIG_DIR:-/etc/particle-os}/bootloader"
|
||||
BOOTLOADER_STATE_DIR="${UBLUE_ROOT:-/var/lib/particle-os}/bootloader"
|
||||
BOOTLOADER_ENTRIES_DIR="$BOOTLOADER_STATE_DIR/entries"
|
||||
BOOTLOADER_BACKUP_DIR="$BOOTLOADER_STATE_DIR/backups"
|
||||
KARGS_CONFIG_DIR="${UBLUE_CONFIG_DIR:-/etc/ubuntu-ublue}/kargs"
|
||||
KARGS_CONFIG_DIR="${UBLUE_CONFIG_DIR:-/etc/particle-os}/kargs"
|
||||
KARGS_STATE_FILE="$BOOTLOADER_STATE_DIR/kargs.json"
|
||||
|
||||
# Initialize bootloader system
|
||||
|
|
@ -659,7 +659,7 @@ list_grub_entries() {
|
|||
local grub_cfg="/boot/grub/grub.cfg"
|
||||
|
||||
if [[ -f "$grub_cfg" ]]; then
|
||||
grep -A1 "menuentry" "$grub_cfg" | grep -E "(menuentry|ubuntu-ublue)" | while read -r line; do
|
||||
grep -A1 "menuentry" "$grub_cfg" | grep -E "(menuentry|particle-os)" | while read -r line; do
|
||||
if [[ "$line" =~ menuentry ]]; then
|
||||
local title
|
||||
title=$(echo "$line" | sed 's/.*menuentry '\''\([^'\'']*\)'\''.*/\1/')
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ find_newer_base_image() {
|
|||
|
||||
# List available base images and find newer ones
|
||||
local available_bases
|
||||
available_bases=($(composefs_list_images | grep "^ubuntu-ublue/base/" | sort -V))
|
||||
available_bases=($(composefs_list_images | grep "^particle-os/base/" | sort -V))
|
||||
|
||||
for base in "${available_bases[@]}"; do
|
||||
if [[ "$base" > "$current_base" ]]; then
|
||||
|
|
|
|||
|
|
@ -184,8 +184,8 @@ SYSTEM MANAGEMENT:
|
|||
# Reset Particle-OS system
|
||||
|
||||
EXAMPLES:
|
||||
apt-layer ubuntu-ublue/base/24.04 ubuntu-ublue/gaming/24.04 steam wine
|
||||
apt-layer --container ubuntu-ublue/base/24.04 ubuntu-ublue/dev/24.04 vscode git
|
||||
apt-layer particle-os/base/24.04 particle-os/gaming/24.04 steam wine
|
||||
apt-layer --container particle-os/base/24.04 particle-os/dev/24.04 vscode git
|
||||
apt-layer --dpkg-install curl wget
|
||||
apt-layer --live-install firefox
|
||||
apt-layer install steam wine
|
||||
|
|
@ -221,8 +221,8 @@ BASIC LAYER CREATION:
|
|||
# Update packages with rollback capability and backup creation
|
||||
|
||||
Examples:
|
||||
apt-layer ubuntu-ublue/base/24.04 ubuntu-ublue/gaming/24.04 steam wine
|
||||
apt-layer --container ubuntu-ublue/base/24.04 ubuntu-ublue/dev/24.04 vscode git
|
||||
apt-layer particle-os/base/24.04 particle-os/gaming/24.04 steam wine
|
||||
apt-layer --container particle-os/base/24.04 particle-os/dev/24.04 vscode git
|
||||
apt-layer --dpkg-install curl wget
|
||||
apt-layer --advanced-install firefox
|
||||
EOF
|
||||
|
|
@ -350,7 +350,7 @@ OCI INTEGRATION:
|
|||
|
||||
EXAMPLES:
|
||||
apt-layer --list
|
||||
apt-layer --info ubuntu-ublue/base/24.04
|
||||
apt-layer --info particle-os/base/24.04
|
||||
apt-layer --remove old-layer
|
||||
apt-layer --oci-export my-image oci:my-registry/my-image:latest
|
||||
EOF
|
||||
|
|
@ -558,10 +558,10 @@ CLOUD SECURITY:
|
|||
|
||||
Examples:
|
||||
apt-layer cloud aws init
|
||||
apt-layer cloud deploy ubuntu-ublue/gaming/24.04 aws ecr
|
||||
apt-layer cloud deploy particle-os/gaming/24.04 aws ecr
|
||||
apt-layer kubernetes eks create-cluster my-cluster us-west-2
|
||||
apt-layer orchestration gitops init https://github.com/my-org/gitops-repo
|
||||
apt-layer cloud-security scan ubuntu-ublue/gaming/24.04 aws comprehensive
|
||||
apt-layer cloud-security scan particle-os/gaming/24.04 aws comprehensive
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
@ -572,10 +572,10 @@ Particle-OS apt-layer Tool - Examples
|
|||
|
||||
BASIC LAYER CREATION:
|
||||
# Create gaming layer from base Ubuntu image
|
||||
apt-layer ubuntu-ublue/base/24.04 ubuntu-ublue/gaming/24.04 steam wine
|
||||
apt-layer particle-os/base/24.04 particle-os/gaming/24.04 steam wine
|
||||
|
||||
# Create development layer with container isolation
|
||||
apt-layer --container ubuntu-ublue/base/24.04 ubuntu-ublue/dev/24.04 vscode git
|
||||
apt-layer --container particle-os/base/24.04 particle-os/dev/24.04 vscode git
|
||||
|
||||
# Direct dpkg installation (faster)
|
||||
apt-layer --dpkg-install curl wget
|
||||
|
|
@ -611,10 +611,10 @@ IMAGE MANAGEMENT:
|
|||
apt-layer --list
|
||||
|
||||
# Show image details
|
||||
apt-layer --info ubuntu-ublue/gaming/24.04
|
||||
apt-layer --info particle-os/gaming/24.04
|
||||
|
||||
# Export as OCI image
|
||||
apt-layer --oci-export ubuntu-ublue/gaming/24.04 ubuntu-ublue/gaming:latest
|
||||
apt-layer --oci-export particle-os/gaming/24.04 particle-os/gaming:latest
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue