Changes between Version 27 and Version 28 of RB1100AHX4


Ignore:
Timestamp:
09/20/26 23:08:55 (11 days ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RB1100AHX4

    v27 v28  
    494494    # --- Container Management ---
    495495    :local cname "alpine"
     496    :local croot "ram/alpine"
     497
    496498    :put "Searching for existing container..."
    497499    :local cid [/container find where name=$cname]
    498  
     500
    499501    :if ($cid != "") do={
    500         :put ("Found existing container. Stopping and removing: " . $cname)
    501         #/container stop $cid
    502         #:delay 2s
     502        :put ("Found existing container. Removing: " . $cname)
    503503        /container remove $cid
    504504        :delay 5s
    … …  
    506506        :put ("No existing container found: " . $cname)
    507507    }
    508  
     508
     509    # remove old extracted rootfs folder (important when using ram disk)
     510    :if ([:len [/file find name=$croot]] > 0) do={
     511        :put ("Removing old root-dir: " . $croot)
     512        /file remove $croot
     513        :delay 2s
     514    }
     515
    509516    :put "Creating new alpine container..."
    510517    :log info "Creating new alpine container..."
    … …  
    513520        file=alpine-arm64.tar \
    514521        interface=veth1 \
    515         root-dir=ram \
     522        root-dir=$croot \
    516523        logging=yes
    517  
     524
    518525    :delay 10s
    519526