diff --git a/configs/ubuntu.yml b/configs/ubuntu.yml index cbe8919..12dfb7b 100644 --- a/configs/ubuntu.yml +++ b/configs/ubuntu.yml @@ -8,4 +8,6 @@ devices: mountOptions: defaults group: ubuntu user: ubuntu - permissions: 644 \ No newline at end of file + permissions: 644 + remount: true + resizeFs: true \ No newline at end of file diff --git a/internal/service/filesystem.go b/internal/service/filesystem.go index 1d6eb5f..a3600d9 100644 --- a/internal/service/filesystem.go +++ b/internal/service/filesystem.go @@ -23,22 +23,17 @@ type FileSystemServiceFactory interface { } type LinuxFileSystemServiceFactory struct { - services map[model.FileSystem]FileSystemService RunnerFactory utils.RunnerFactory } func NewLinuxFileSystemServiceFactory(rc utils.RunnerFactory) *LinuxFileSystemServiceFactory { return &LinuxFileSystemServiceFactory{ - services: map[model.FileSystem]FileSystemService{}, RunnerFactory: rc, } } func (fsf *LinuxFileSystemServiceFactory) Select(fs model.FileSystem) (FileSystemService, error) { - fss, exists := fsf.services[fs] - if exists { - return fss, nil - } + var fss FileSystemService switch fs { case model.Ext4: fss = NewExt4Service(fsf.RunnerFactory) @@ -47,7 +42,6 @@ func (fsf *LinuxFileSystemServiceFactory) Select(fs model.FileSystem) (FileSyste case model.Unformatted: return nil, fmt.Errorf("🔴 An unsupported filesystem was encountered") } - fsf.services[fs] = fss return fss, nil }