Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 103492 Details for
Bug 157115
baselayout-1.13.0_alpha7-r1's checkroot script skips fsck of /
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Replace the regex with simple test logic
x (text/plain), 1.62 KB, created by
Roy Marples (RETIRED)
on 2006-12-06 15:43:40 UTC
(
hide
)
Description:
Replace the regex with simple test logic
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2006-12-06 15:43:40 UTC
Size:
1.62 KB
patch
obsolete
>Index: init.d/checkroot >=================================================================== >--- init.d/checkroot (revision 2393) >+++ init.d/checkroot (working copy) >@@ -70,19 +70,22 @@ > # - find the / entry > # - make sure we have 6 fields > # - see if fs_passno is something other than 0 >- if [[ $'\n'$(</etc/fstab) =~ $'\n'.*[[:space:]]/[[:space:]].*[[:space:]].*[[:space:]](.*)[[:space:]] ]] \ >- && [[ ${BASH_REMATCH[1]} == "0" ]] ; then >- ebegin $"Checking root filesystem" >- if [[ $(uname) == "Linux" ]] ; then >- fsck -C -T -a / >+ local node= point= fs= opts= dump= pass= foo= >+ while read node point fs opts dump pass foo ; do >+ [[ ${node} == "#"* || ${point} != "/" || -z ${fs} ]] && continue >+ if [[ ${pass:-0} == "0" ]] ; then >+ ebegin $"Skipping root filesystem check" "(fstab's passno == 0)" >+ retval=0 > else >- fsck -p -F / >+ ebegin $"Checking root filesystem" >+ if [[ $(uname) == "Linux" ]] ; then >+ fsck -C -T -a / >+ else >+ fsck -p -F / >+ fi >+ retval=$? > fi >- retval=$? >- else >- ebegin $"Skipping root filesystem check" "(fstab's passno == 0)" >- retval=0 >- fi >+ done < /etc/fstab > fi > > if [[ ${retval} -eq 0 ]] ; then >Index: ChangeLog >=================================================================== >--- ChangeLog (revision 2395) >+++ ChangeLog (working copy) >@@ -3,6 +3,9 @@ > > 06 Dec 2006; Roy Marples <uberlord@gentoo.org>: > >+ Replace checkroot bash regex with a while read and parse each option >+ as the regex was complex and error prone, #157115. >+ > Report /etc/init.d/$SVCNAME in syslog instead of rcscripts, > #156138 thanks to Wolfram Schlich. >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 157115
:
103337
|
103350
|
103492
|
103538