File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,11 @@ static int fsck(int pass)
212212 if (mnt -> mnt_passno == 0 || mnt -> mnt_passno != pass )
213213 continue ;
214214
215+ if (hasmntopt (mnt , "noauto" )) {
216+ dbg ("Skipping fsck of %s, marked noauto" , mnt -> mnt_fsname );
217+ continue ;
218+ }
219+
215220 /* Device to maybe fsck, */
216221 dev = mnt -> mnt_fsname ;
217222
@@ -425,6 +430,11 @@ static void fs_swapon(char *cmd, size_t len)
425430 if (strcmp (mnt -> mnt_type , MNTTYPE_SWAP ))
426431 continue ;
427432
433+ if (hasmntopt (mnt , "noauto" )) {
434+ dbg ("Skipping swap %s, marked noauto" , mnt -> mnt_fsname );
435+ continue ;
436+ }
437+
428438 snprintf (cmd , len , "swapon %s" , mnt -> mnt_fsname );
429439 run_interactive (cmd , "Enabling swap %s" , mnt -> mnt_fsname );
430440 }
Original file line number Diff line number Diff line change @@ -187,6 +187,11 @@ static void fs_swapoff(void)
187187 if (strcmp (mnt -> mnt_type , MNTTYPE_SWAP ))
188188 continue ;
189189
190+ if (hasmntopt (mnt , "noauto" )) {
191+ dbg ("Skipping swap %s, marked noauto" , mnt -> mnt_fsname );
192+ continue ;
193+ }
194+
190195 snprintf (cmd , sizeof (cmd ), "swapoff %s" , mnt -> mnt_fsname );
191196 run_interactive (cmd , "Disabling swap %s" , mnt -> mnt_fsname );
192197 }
You can’t perform that action at this time.
0 commit comments