File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,18 @@ impl CoreUtils {
282282 }
283283 Err ( e) => return Err ( e) ,
284284 }
285- ctl. set_value_string ( val)
285+ let result = ctl. set_value_string ( val) ;
286+ // if we have a read only /proc we ignore it as well
287+ match result {
288+ Ok ( _) => result,
289+ Err ( SysctlError :: IoError ( e) ) => {
290+ if e. raw_os_error ( ) == Some ( libc:: EROFS ) {
291+ return Ok ( String :: from ( "" ) ) ;
292+ }
293+ return Err ( e. into ( ) ) ;
294+ } ,
295+ Err ( err) => return Err ( err) ,
296+ }
286297 }
287298}
288299
@@ -433,9 +444,6 @@ pub fn disable_ipv6_autoconf(if_name: &str) -> NetavarkResult<()> {
433444 // just ignore that case
434445 }
435446
436- // if we have a read only /proc we ignore it as well
437- SysctlError :: IoError ( ref e) if e. raw_os_error ( ) == Some ( libc:: EROFS ) => { }
438-
439447 _ => {
440448 return Err ( NetavarkError :: wrap (
441449 "failed to set autoconf sysctl" ,
You can’t perform that action at this time.
0 commit comments