Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
90f22d96
Commit
90f22d96
authored
Dec 12, 2012
by
Mike Hibler
Browse files
By popular demand, turn off time-dependent auto-fsck on Linux FSes.
parent
f08b513c
Changes
2
Show whitespace changes
Inline
Side-by-side
clientside/tmcc/freebsd/slicefix
View file @
90f22d96
...
...
@@ -708,7 +708,20 @@ dolinux() {
fi
fi
# attempt to mount filesystem
#
# Turn off time-dependent fsck.
#
if
[
-x
/usr/local/sbin/tune2fs
]
;
then
echo
" disabling time-dependent fsck"
tune2fs
-i
0
$rootdev
>
/dev/null 2>&1
if
[
$?
-ne
0
]
;
then
echo
" WARNING: could not disable time-dependent fsck"
fi
fi
#
# Attempt to mount filesystem
#
echo
" fixing Linux root partition
${
disk
}
s
${
part
}
"
mount
-t
ext2fs
$rootdev
/mnt
||
{
# might need a journal recovery, try fsck
...
...
clientside/tmcc/linux/linux_slicefix.pl
View file @
90f22d96
...
...
@@ -108,6 +108,13 @@ sub set_random_rootfs_uuid
system
("
$TUNE2FS
-U random
$root
");
}
sub
disable_time_dependent_fsck
{
my
(
$root
)
=
@_
;
system
("
$TUNE2FS
-i 0
$root
>/dev/null 2>&1
");
}
sub
kernel_version_compare
{
my
(
$v1
,
$v2
)
=
@_
;
...
...
@@ -960,6 +967,7 @@ sub main
my
$old_uuid
=
get_uuid
(
$root
);
set_random_rootfs_uuid
(
$root
);
disable_time_dependent_fsck
(
$root
);
my
$fstype
=
mount_image
(
$root
,
$imageroot
);
my
$uuid
=
get_uuid
(
$root
);
my
$label
=
get_label
(
$root
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment