File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -353,11 +353,28 @@ func (v *Validator) CheckRlimits() (msgs []string) {
353353func supportedMountTypes (OS string , hostSpecific bool ) (map [string ]bool , error ) {
354354 supportedTypes := make (map [string ]bool )
355355
356- if OS != "linux" && OS != "windows" {
357- logrus .Warnf ("%v is not supported to check mount type" , OS )
358- return nil , nil
359- } else if OS == "windows" {
360- supportedTypes ["ntfs" ] = true
356+ if OS == "solaris" {
357+ f , err := os .Open ("/etc/vfstab" )
358+ if err != nil {
359+ return nil , err
360+ }
361+ defer f .Close ()
362+
363+ s := bufio .NewScanner (f )
364+ for s .Scan () {
365+ if err := s .Err (); err != nil {
366+ return supportedTypes , err
367+ }
368+
369+ text := s .Text ()
370+ parts := strings .Split (text , "\t " )
371+ if len (parts ) > 1 {
372+ supportedTypes [parts [1 ]] = true
373+ } else {
374+ supportedTypes [parts [0 ]] = true
375+ }
376+ }
377+
361378 return supportedTypes , nil
362379 }
363380
You can’t perform that action at this time.
0 commit comments