Skip to content

Commit 1daca52

Browse files
committed
added run of expand_disk if script is present
1 parent 6e01384 commit 1daca52

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [1.6.10] - 2026-01-24
6+
7+
### Added
8+
9+
- Added run of expand_disk.py if the script exists
10+
511
## [1.6.9] - 2025-11-19
612

713
### Changed

router_registration.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def create_parser():
320320
321321
:return: A Namespace containing arguments
322322
"""
323-
__version__ = '1.6.9'
323+
__version__ = '1.6.10'
324324
parser = argparse.ArgumentParser()
325325

326326
mgroup = parser.add_mutually_exclusive_group(required=True)
@@ -420,8 +420,14 @@ def diverter_add():
420420
except requests.exceptions.ConnectionError as exception_result:
421421
logging.warning('An issue occurred while trying to connect: %s', exception_result)
422422

423-
if platform.machine() in ['x86_64','AMD64']:
423+
machine = platform.machine()
424+
if machine in ['x86_64', 'AMD64']:
424425
system_arch = 'amd64'
426+
elif machine in ['aarch64', 'arm64']:
427+
system_arch = 'arm64'
428+
else:
429+
logging.error("Unsupported architecture: %s", machine)
430+
sys.exit(1)
425431

426432
package_filename = f"zfw-tunnel_{release_data['tag_name']}_{system_arch}.deb"
427433

@@ -617,11 +623,7 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands, regis
617623
enrollment_commands.append('--installDir')
618624
enrollment_commands.append('/opt/netfoundry/ziti/ziti-router')
619625

620-
# add tunneler by default for NetFoundry edge-router customers
621-
# if overriding the tunnel ip, check if valid and configure a
622-
# manual tunnelListener. Otherwise just let the auto_enroller
623-
# create one.
624-
626+
interface_name = None
625627
if args.hostOnly:
626628
enrollment_commands.append("--skipDNS")
627629
enrollment_commands.append("--tunnelListener")
@@ -1104,6 +1106,18 @@ def main():
11041106
if registration_endpoint is not None:
11051107
post_mop_callback(registration_endpoint,"0","Registration Successful")
11061108
logging.info("\033[0;35mRegistration Successful\033[0m")
1109+
1110+
# expand disk
1111+
expand_disk_script = "/opt/netfoundry/expand_disk.py"
1112+
if os.path.exists(expand_disk_script):
1113+
logging.info("\033[0;35mFound disk expansion script\033[0m ")
1114+
logging.info("Running disk expansion script")
1115+
try:
1116+
subprocess.run([expand_disk_script, "--logLevel", args.logLevel],
1117+
check=True)
1118+
except subprocess.CalledProcessError as error:
1119+
logging.error("Failed to run disk expansion script: %s", error)
1120+
11071121
logging.info("\033[0;35mPlease use\033[0m \033[0;31mnfhelp-update\033[0;35m "
11081122
"before you use nfhelp commands\033[0m")
11091123

0 commit comments

Comments
 (0)