@@ -2,7 +2,6 @@ package config
22
33import (
44 "fmt"
5- "runtime"
65
76 "github.com/crc-org/crc/v2/pkg/crc/constants"
87 "github.com/crc-org/crc/v2/pkg/crc/logging"
@@ -62,17 +61,6 @@ func RegisterSettings(cfg *Config) {
6261 return validateBundlePath (value , GetPreset (cfg ))
6362 }
6463
65- validateSmbSharedDirs := func (value interface {}) (bool , string ) {
66- if ! cfg .Get (HostNetworkAccess ).AsBool () {
67- return false , fmt .Sprintf ("%s can only be used with %s set to 'true'" ,
68- EnableSharedDirs , HostNetworkAccess )
69- }
70- if cfg .Get (SharedDirPassword ).IsDefault {
71- return false , fmt .Sprintf ("Please set '%s' first to enable shared directories" , SharedDirPassword )
72- }
73- return ValidateBool (value )
74- }
75-
7664 // Preset setting should be on top because CPUs/Memory config depend on it.
7765 cfg .AddSetting (Preset , version .GetDefaultPreset ().String (), validatePreset , RequiresDeleteAndSetupMsg ,
7866 fmt .Sprintf ("Virtual machine preset (valid values are: %s)" , preset .AllPresets ()))
@@ -96,18 +84,8 @@ func RegisterSettings(cfg *Config) {
9684 "Enable emergency login for 'core' user. Password is randomly generated. (true/false, default: false)" )
9785 cfg .AddSetting (PersistentVolumeSize , constants .DefaultPersistentVolumeSize , validatePersistentVolumeSize , SuccessfullyApplied ,
9886 fmt .Sprintf ("Total size in GiB of the persistent volume used by the CSI driver for %s preset (must be greater than or equal to '%d')" , preset .Microshift , constants .DefaultPersistentVolumeSize ))
99-
100- // Shared directories configs
101- if runtime .GOOS == "windows" {
102- cfg .AddSetting (SharedDirPassword , Secret ("" ), validateString , SuccessfullyApplied ,
103- "Password used while using CIFS/SMB file sharing (It is the password for the current logged in user)" )
104-
105- cfg .AddSetting (EnableSharedDirs , false , validateSmbSharedDirs , SuccessfullyApplied ,
106- "Mounts host's user profile folder at '/' in the CRC VM (true/false, default: false)" )
107- } else {
108- cfg .AddSetting (EnableSharedDirs , true , ValidateBool , SuccessfullyApplied ,
109- "Mounts host's home directory at '/' in the CRC VM (true/false, default: true)" )
110- }
87+ cfg .AddSetting (EnableSharedDirs , true , ValidateBool , SuccessfullyApplied ,
88+ "Mounts host's home directory at '/' in the CRC VM (true/false, default: true)" )
11189
11290 if ! version .IsInstaller () {
11391 cfg .AddSetting (NetworkMode , string (defaultNetworkMode ()), network .ValidateMode , network .SuccessfullyAppliedMode ,
0 commit comments