Clean create_cfg.py updated readme
- Trim unnecessary trailing whitespaces - Simplify logic in error and disk partition checks - Replace ambiguous return with a more Pythonic `not errors` - Enhance IOError handling for clarity - Update `README.md` for clearer installer purpose and flow
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
Install Station
|
||||
===
|
||||
It is a strip down version of install-station and it is the new installer for GhostBSD.
|
||||
Install Station is the streamlined installer for GhostBSD.
|
||||
|
||||
Install Station only edit disk, partition and will install GhostBSD. Users and system setup will be done with at the first boot after installation with Setup Station.
|
||||
Install Station handles disk editing, partitioning, and OS installation. User configuration and system setup are performed at first boot after installation with Setup Station.
|
||||
|
||||
## Managing Translations
|
||||
To create a translation file.
|
||||
|
||||
@@ -69,7 +69,7 @@ class Configuration:
|
||||
if not installation_config:
|
||||
errors.append("Installation config file path not defined")
|
||||
|
||||
return len(errors) == 0, errors
|
||||
return not errors, errors
|
||||
|
||||
@classmethod
|
||||
def create_cfg(cls):
|
||||
@@ -142,9 +142,7 @@ class Configuration:
|
||||
# Partition Setup
|
||||
f.write('\n# Partition Setup\n')
|
||||
for line in InstallationData.new_partition:
|
||||
if 'BOOT' in line or 'BIOS' in line or 'UEFI' in line:
|
||||
pass
|
||||
else:
|
||||
if 'BOOT' not in line and 'BIOS' not in line and 'UEFI' not in line:
|
||||
f.write(f'disk0-part={line.strip()}\n')
|
||||
f.write('commitDiskLabel\n')
|
||||
|
||||
@@ -158,10 +156,5 @@ class Configuration:
|
||||
f.write("runCommand=pw userdel -n ghostbsd -r\n")
|
||||
f.write("runCommand=sed -i '' 's/ghostbsd/root/g' /etc/gettytab\n")
|
||||
f.write("runCommand=sed -i '' 's/ghostbsd/root/g' /etc/ttys\n")
|
||||
f.write("runCommand=mv /usr/local/etc/devd/automount_devd"
|
||||
".conf.skip /usr/local/etc/devd/automount_devd.conf\n")
|
||||
f.write("runCommand=mv /usr/local/etc/devd/automount_devd"
|
||||
"_localdisks.conf.skip /usr/local/etc/devd/"
|
||||
"automount_devd_localdisks.conf\n")
|
||||
except IOError as e:
|
||||
raise IOError(f"Failed to write configuration file: {e}")
|
||||
raise IOError(f"Failed to write configuration file: {e}") from e
|
||||
|
||||
Reference in New Issue
Block a user