From 32a427ace4f6de624bddf97970b40808e6457177 Mon Sep 17 00:00:00 2001 From: robojerk Date: Sat, 12 Jul 2025 12:50:31 -0700 Subject: [PATCH] Fix Unicode character issues in apt-layer.sh --- apt-layer.sh | 92 ++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/apt-layer.sh b/apt-layer.sh index 215bd6d..de9e1fd 100644 --- a/apt-layer.sh +++ b/apt-layer.sh @@ -458,14 +458,14 @@ get_system_info() { echo "Architecture: $(uname -m)" echo "Available modules:" if modprobe -n squashfs >/dev/null 2>&1; then - echo " ✓ squashfs module available" + echo " squashfs module available" else - echo " ✗ squashfs module not available" + echo " squashfs module not available" fi if modprobe -n overlay >/dev/null 2>&1; then - echo " ✓ overlay module available" + echo " overlay module available" else - echo " ✗ overlay module not available" + echo " overlay module not available" fi } @@ -1703,7 +1703,7 @@ container_status() { # OCI Export/Import Integration # ============================================================================ # OCI Integration for Ubuntu uBlue apt-layer Tool -# Provides ComposeFS ↔ OCI export/import functionality for container-based layer creation +# Provides ComposeFS OCI export/import functionality for container-based layer creation # OCI registry configuration declare -A OCI_REGISTRY_CONFIG @@ -2243,9 +2243,9 @@ oci_status() { echo "=== OCI Tool Configuration ===" echo "Preferred tool: $OCI_TOOL" echo "Available tools:" - command -v skopeo &> /dev/null && echo " ✓ skopeo" - command -v podman &> /dev/null && echo " ✓ podman" - command -v docker &> /dev/null && echo " ✓ docker" + command -v skopeo &> /dev/null && echo " skopeo" + command -v podman &> /dev/null && echo " podman" + command -v docker &> /dev/null && echo " docker" echo "" echo "=== OCI Workspace ===" @@ -2565,7 +2565,7 @@ atomic_status() { fi if [[ -n "$pending_deployment" ]]; then - echo "⚠️ Pending deployment will activate on next boot" + echo " Pending deployment will activate on next boot" fi } @@ -3249,7 +3249,7 @@ get_live_overlay_status() { echo "=== Live Overlay Status ===" if is_live_overlay_active; then - log_success "✓ Live overlay is ACTIVE" "apt-layer" + log_success " Live overlay is ACTIVE" "apt-layer" # Show mount details if mountpoint -q "$LIVE_OVERLAY_MOUNT_POINT"; then @@ -3267,22 +3267,22 @@ get_live_overlay_status() { log_info "Packages installed in overlay: $package_count" "apt-layer" fi else - log_warning "⚠️ Overlay mount point not mounted" "apt-layer" + log_warning " Overlay mount point not mounted" "apt-layer" fi # Check for active processes if check_active_processes; then - log_warning "⚠️ Active processes detected - overlay cannot be stopped" "apt-layer" + log_warning " Active processes detected - overlay cannot be stopped" "apt-layer" fi else - log_info "ℹ Live overlay is not active" "apt-layer" + log_info " Live overlay is not active" "apt-layer" # Check if system supports live overlay if check_live_overlay_support >/dev/null 2>&1; then - log_info "ℹ System supports live overlay" "apt-layer" + log_info " System supports live overlay" "apt-layer" log_info "Use '--live-overlay start' to start live overlay" "apt-layer" else - log_warning "⚠️ System does not support live overlay" "apt-layer" + log_warning " System does not support live overlay" "apt-layer" fi fi @@ -5411,9 +5411,9 @@ get_advanced_package_info() { echo "" echo "Security Information:" if check_package_signature "$package"; then - echo " ✓ Package is signed" + echo " Package is signed" else - echo " ✗ Package is not signed" + echo " Package is not signed" fi # Size information @@ -6168,11 +6168,11 @@ get_layer_signing_status() { # Check if layer exists if [[ ! -f "$layer_path" ]]; then - echo " ✗ Layer file not found" + echo " Layer file not found" return 1 fi - echo " ✓ Layer file exists" + echo " Layer file exists" # Check for signatures local signature_db="$LAYER_SIGNING_SIGNATURES_DIR/signatures.json" @@ -6190,21 +6190,21 @@ get_layer_signing_status() { local signed_at signed_at=$(echo "$signature_info" | jq -r '.signed_at // "unknown"') - echo " ✓ Signed with $method using key: $key_name" - echo " ✓ Signature status: $status" - echo " ✓ Signed at: $signed_at" + echo " Signed with $method using key: $key_name" + echo " Signature status: $status" + echo " Signed at: $signed_at" else - echo " ✗ No signature found" + echo " No signature found" fi else - echo " ✗ Signature database not found" + echo " Signature database not found" fi # Check for revocation if check_layer_revocation "$layer_path"; then - echo " ⚠ Layer is revoked" + echo " Layer is revoked" else - echo " ✓ Layer is not revoked" + echo " Layer is not revoked" fi echo "" @@ -8029,10 +8029,10 @@ YELLOW='\033[1;33m' RED='\033[0;31m' CYAN='\033[0;36m' NC='\033[0m' -CHECK="✅" -WARN="⚠️ " -CROSS="❌" -INFO="ℹ️ " +CHECK="" +WARN=" " +CROSS="" +INFO=" " # --- Helper: Check for WSL --- is_wsl() { @@ -8853,16 +8853,16 @@ check_tenant_health() { # Check tenant exists if [[ ! -d "$tenant_dir" ]]; then - echo "❌ Tenant directory not found" + echo " Tenant directory not found" return 1 fi if ! jq -e ".tenants[] | select(.name == \"$tenant_name\")" "$tenant_db" > /dev/null 2>&1; then - echo "❌ Tenant not found in database" + echo " Tenant not found in database" return 1 fi - echo "✅ Tenant exists" + echo " Tenant exists" # Check directory structure local missing_dirs=() @@ -8873,9 +8873,9 @@ check_tenant_health() { done if [[ ${#missing_dirs[@]} -gt 0 ]]; then - echo "⚠️ Missing directories: ${missing_dirs[*]}" + echo " Missing directories: ${missing_dirs[*]}" else - echo "✅ Directory structure complete" + echo " Directory structure complete" fi # Check quota usage @@ -8888,7 +8888,7 @@ check_tenant_health() { storage_used=$(echo "$tenant_info" | jq -r '.quotas.used_storage_gb') storage_max=$(echo "$tenant_info" | jq -r '.quotas.max_storage_gb') - echo "📊 Resource Usage:" + echo " Resource Usage:" echo " Layers: $layers_used/$layers_max" echo " Storage: ${storage_used}GB/${storage_max}GB" @@ -8897,14 +8897,14 @@ check_tenant_health() { local storage_percent=$((storage_used * 100 / storage_max)) if [[ $layer_percent -gt 80 ]]; then - echo "⚠️ Layer quota usage high: ${layer_percent}%" + echo " Layer quota usage high: ${layer_percent}%" fi if [[ $storage_percent -gt 80 ]]; then - echo "⚠️ Storage quota usage high: ${storage_percent}%" + echo " Storage quota usage high: ${storage_percent}%" fi - echo "✅ Tenant health check complete" + echo " Tenant health check complete" } # Multi-tenant command handler @@ -15244,25 +15244,25 @@ cloud_security_status() { # Check if system is initialized if [[ -d "$cloud_security_dir" ]]; then - echo "✅ System initialized: $cloud_security_dir" + echo " System initialized: $cloud_security_dir" # Check configuration local config_file="$cloud_security_dir/cloud-security-config.json" if [[ -f "$config_file" ]]; then - echo "✅ Configuration: $config_file" + echo " Configuration: $config_file" local enabled_providers=$(jq -r '.enabled_providers[]' "$config_file" 2>/dev/null | tr '\n' ', ' | sed 's/,$//') echo " Enabled providers: $enabled_providers" else - echo "❌ Configuration missing" + echo " Configuration missing" fi # Check directories local dirs=("scans" "policies" "reports" "integrations") for dir in "${dirs[@]}"; do if [[ -d "$cloud_security_dir/$dir" ]]; then - echo "✅ $dir directory: $cloud_security_dir/$dir" + echo " $dir directory: $cloud_security_dir/$dir" else - echo "❌ $dir directory missing" + echo " $dir directory missing" fi done @@ -15271,13 +15271,13 @@ cloud_security_status() { local policy_count=$(find "$cloud_security_dir/policies" -name "*.json" 2>/dev/null | wc -l) local report_count=$(find "$cloud_security_dir/reports" -name "*.json" 2>/dev/null | wc -l) - echo "📊 Statistics:" + echo " Statistics:" echo " Security scans: $scan_count" echo " Policy files: $policy_count" echo " Compliance reports: $report_count" else - echo "❌ System not initialized" + echo " System not initialized" echo " Run 'cloud-security init' to initialize" fi }