• So.... (unregistered)

    FSCK THAT SHST!!!

  • ANON (unregistered)

    for attempt in {1..3}; do post "frist" done

    We always succeed. exit 0

  • Zog (unregistered)

    Pragmatic :-O

  • Lauri (unregistered)

    Furth

  • (cs)

    i really hate ifs in bash shell 'if ... else ... fi'.

    i find fi so dumb.

  • (cs) in reply to Helix
    Helix:
    i really hate ifs in bash shell 'if ... else ... fi'.

    i find fi so dumb.

    I worked with Fi for a couple of years; she's lovely. I do giggle when I get the occasional "unexpected fi"

  • Rob (unregistered)

    This script leaves the device unmounted...

  • (cs) in reply to Helix
    Helix:
    i really hate ifs in bash shell 'if ... else ... fi'. i find fi so dumb.
    You like endifs better? FI is Algol 68's solution for begin/end brackets. Never a dangling else. It's simple and effective.
  • Artur Krajewski (unregistered)

    Met too often ;-)

    try { [...] } catch (Exception ex) { #F### it. We always succeed. exit 0 return 0; }

  • Noughmad (unregistered) in reply to Helix

    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.

  • Noughmad (unregistered) in reply to Noughmad
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    If I didn't make it clear enough, this was meant for the 'fi' discussions.
  • (cs) in reply to Noughmad
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.
  • Baker (unregistered)

    The Daily What the Fsck

  • faoileag (unregistered)

    Am I missing something? Apart from that the article is wrong ("the script below is a wrapper to fsck.xfs" - no it isn't, it is a replacement) where is the wtf?

    It's not a pretty solution (and, looking at the comments, the developer knows that), but if it works and there is no better alternative then that's not a wtf but a pragmatic solution that gets the job done.

    At least until that "xfs meta data corruption bug" has been investigated more thoroughly and a fix provided for that.

  • (cs)
    # This is terrible. We must never tell anyone that we did this. It's a 
    # hideous hack for the xfs metadata corruption bug that we've been seeing.
    

    When nobody was looking, Lex Luthor added a script to check XFS four times. That's 4 times. That's as many as two times two. And that's terrible.

  • narciblog (unregistered) in reply to derari
    derari:
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.

    It is a foolish consistency.

  • Engywuck (unregistered) in reply to narciblog

    we all should use <if> ... </if> etc. Much more enterprisy.

    Captcha: acsi - the small brother of ascii

  • RandomGuy (unregistered) in reply to derari
    derari:
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.
    So why not write ɘƨɒɔ or ǝsɐɔ?
  • Smug Unix User (unregistered)

    If at first you don't succeed, try, try, try again.

  • (cs)

    What is see as problems:

    1. It leaves the file system unmounted after running it.
    2. He should be checking if it could mount the file system. In that case, quit trying to clean up the file system.

    This is not as bad as some things I have seen, but it does deserve representation here.

  • faoileag (unregistered) in reply to Smug Unix User
    Smug Unix User:
    If at first you don't succeed, try, try, try again.
    I counter that with Fahnestock's Rule for Failure: "If at first you don't succeed, destroy all evidence that you tried."
  • Brompot (unregistered) in reply to Engywuck
    Engywuck:
    we all should use <if> ... </if> etc. Much more enterprisy.

    Captcha: acsi - the small brother of ascii

    acsi is a european campsite organisation. http://www.acsi.eu.

  • (cs) in reply to RandomGuy
    RandomGuy:
    derari:
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.
    So why not write ɘƨɒɔ or ǝsɐɔ?
    Because that doesn't work with ASCII files. Use '\u0258\u01A8\u0252\u0254' instead.
  • (cs)

    I guess TRWTF is that the system-provided fsck.xfs doesn’t do anything and just returns success... But I remember trying to repair a somewhat large XFS volume with xfs_repair, and having xfs_repair run out of memory. So I guess that explains it...

    I also think that fsck.xfs is needed in the first place because some GNU/Linux distros will fail to boot if some partition mounted at boot time needs a FS check but fsck.<FS> does not exist. Why this couldn’t be handled more gracefully is beyond me.

  • VL (unregistered) in reply to VinDuv
    #!/bin/sh -f
    #
    # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
    #
    
    AUTO=false
    while getopts ":aApy" c
    do
    	case $c in
    	a|A|p|y)	AUTO=true;;
    	esac
    done
    eval DEV=\${$#}
    if [ ! -e $DEV ]; then
    	echo "$0: $DEV does not exist"
    	exit 8
    fi
    if $AUTO; then
    	echo "$0: XFS file system."
    else
    	echo "If you wish to check the consistency of an XFS filesystem or"
    	echo "repair a damaged filesystem, see xfs_check(8) and xfs_repair(8)."
    fi
    exit 0
    

    FYI this is the OpenSuSE standard fsck.xfs... Doesn't really do anything :)

  • Carl (unregistered)

    *whoever

  • Que (unregistered) in reply to Smug Unix User

    If at first you don’t succeed, try, try again. Then quit. There’s no point in being a damn fool about it. - W. C. FIELDS

  • (cs)

    Looks like two different applications of hideIt() to me.

    From my implementation of that infamous flowchart:

    void youAreInTrouble()
    {
       while (!youCanBlameSomeoneElse()) youPoorIdiot();
    }
    
    void problemSolver()
    {
       if (itWorks())
       {
           leaveItAlone();
           noProblem();
           return;
       }
       if (youMessedWithIt())
       {
           howCouldYouBeSuchAnIdiot();
           if (!anyoneKnows())
           {
               hideIt();
               noProblem();
               return;
           }
           youAreInTrouble();
           return;
       }
       if (youWillGetInTrouble())
       {
          youAreInTrouble();
          return;
       }
       hideIt();
       noProblem();
    }
    
  • anonymous (unregistered) in reply to derari
    derari:
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.
    So... case and if, then?

    Yeah... good luck finding those on your keyboard.

  • (cs)

    This reminds me of the time I tried to check my ReiserFS volume. I thought that was what fstab was for. Boy, was my car seat^H^H^H^H^H^H^H^H face red!

  • (cs)

    The fools! If only they'd built it with 6001 hulls!

  • guey (unregistered) in reply to VL

    Additionally, even when configured with an XFS root filesystem, the initrd does not contain the required xfs_check and xfs_repair binaries. I discovered this when an XFS root became corrupt and I couldn't fix it with the maintenance shell. This server being ancient, it of course requried a drive to the datacenter, 90 minutes away.

    After that, I added scripts to mkinitrd that added xfs_repair binary.

  • DigitalDan (unregistered)

    TRWTF is the use of "whomever" in the third graf. This pronoun is the subject of the independent clause "whoever wrote the script."

  • wtf (unregistered)

    learned about BASH_REMATCH today ...

  • (cs) in reply to Smug Unix User
    Smug Unix User:
    If at first you don't succeed, try, try, try again.
    If at first you don't succeed, don't try skydiving. //rimshot

    BTW, when will the front page get rid of that ugly Halloween coloration? Or is it just my cache?

  • Anomaly (unregistered) in reply to cellocgw
    cellocgw:
    Smug Unix User:
    If at first you don't succeed, try, try, try again.
    If at first you don't succeed, don't try skydiving. //rimshot

    BTW, when will the front page get rid of that ugly Halloween coloration? Or is it just my cache?

    Just your cache. And in regards to the skydiving. At least if your sky dive plane hits another sky dive plane, then everyone who jumps makes it out alive. True story. One pilot jumped and the other landed his plane with the first plane halfway inside it.

    sagaciter

  • (cs) in reply to cellocgw

    Just your cache. Ctrl + F5.

  • Calli Arcale (unregistered)

    Ah yes. The comment-block confessional, where we sometimes confess our sins, and pray for the forgiveness of whomever must maintain our code. ;-)

  • (cs) in reply to chubertdev
    chubertdev:
    Just your cache. Ctrl + F5.

    Thanks - tho' at least w/ Chrome, had to clear thedailywtf site cookies before dumping the cache to succeed.

  • Simon Clarkstone (unregistered) in reply to cellocgw

    The Halloween decoration is caused by an image and some CSS embedded in the last paragraph of the Halloween story. It will not show up on the front page if you turn off the showing of full article text on the front page. As newer articles keep getting added, the decoration will move down the archive pages along with the article it is embedded in.

  • Simon Clarkstone (unregistered) in reply to cellocgw

    ... and you clearing the cookies will have toggled the showing of full article text on the front page.

  • Captain Renault (unregistered)

    Realizing the importance of the case, my men are rounding up twice the usual number of suspects.

  • (cs) in reply to cellocgw
    cellocgw:
    chubertdev:
    Just your cache. Ctrl + F5.

    Thanks - tho' at least w/ Chrome, had to clear thedailywtf site cookies before dumping the cache to succeed.

    F12, right-click refresh button, Empty Cache and Hard Reload.

  • (cs)

    why is the homepage STILL a hideous Halloween skin? It's been a week since Halloween...

  • (cs) in reply to Simon Clarkstone
    Simon Clarkstone:
    The Halloween decoration is caused by an image and some CSS embedded in the last paragraph of the Halloween story. It will not show up on the front page if you turn off the showing of full article text on the front page. As newer articles keep getting added, the decoration will move down the archive pages along with the article it is embedded in.

    Odd, I have that option enabled, but it never had seemed to make any difference.

  • (cs) in reply to RandomGuy
    RandomGuy:
    derari:
    Noughmad:
    I take it you've never seen a case statement in bash. There are few combinations of letter that sound more stupid than 'esac'.
    In many languages, the closing token is the opening token mirrored, e.g. '(' and ')', '{' and '}', or '[' and ']'. This is just consistency.
    So why not write ɘƨɒɔ or ǝsɐɔ?
    We're all familiar with the story from Knuth that one of his students turned in an ALGOL exercise with the fragment esac; comment bletch tnemmoc;?
  • Anomaly (unregistered)

    I'm using IE (work), and it never even showed the color change on the first page. Just the article itself.

  • Auther has bad grammer (unregistered) in reply to DigitalDan
    DigitalDan:
    TRWTF is the use of "whomever" in the third graf. This pronoun is the subject of the independent clause "whoever wrote the script."
  • user (unregistered)

    Its empty because it shouldn't ever be needed.

    I once had an xfs go bad on an SGI Octave. Never once had a problem with xfs under Linux.

  • Anonymous (unregistered)

    Did anybody notice the WTF in the dmesg command? In the command

    dmesg -c >/dev/null
    dmesg produces output which gets sent to /dev/null. If
    dmesg -C
    were used instead, it would not produce any output. Why produce output to trash it instead of just not producing it to start with?

Leave a comment on “Fourth Time's the Charm”

Log In or post as a guest

Replying to comment #:

« Return to Article