[lano666] Re: diskInfo

  • From: Lo'oRiS il Kabukimono <_lano_@xxxxxxxxx>
  • To: lano666@xxxxxxxxxxxxx
  • Date: Sun, 24 Nov 2002 17:28:32 +0100

Lo'oRiS il Kabukimono <_lano_@xxxxxxxxx> :

> Binary/unsupported file stripped by Ecartis

comincio ad ODIARLO

-- 
Generated by Signify v1.07.  For this and more, visit
http://www.debian.org/
                             . /\ °
Real Name: Lorenzo Petrone    <* >
WEB!!! http://lano.webhop.net  \/ ·


-- Attached file included as plaintext by Ecartis --
-- File: diskinfo

#!/bin/bash
# diskInfo (c) 2002 Lorenzo Petrone
# version A.0.0, 24-11-2002
# distributed under Gnu GPL version 2, or any later version
# http://www.gnu.org
# my web site: http://lano.webhop.net

# obviously, DO NOT SUID THIS SCRIPT

PROGRAM_VERSION="A.0.0"
PROGRAM_DATE="24-11-2002"
PROGRAM_NAME="diskInfo"

DISK=/dev/hda

copx () {
        echo ----- $@ -----
        echo
        $@ || echo ERROR!!!
        echo
        echo
}

if [ "$1" = "--help" ] ; then
    echo "$PROGRAM_NAME $PROGRAM_VERSION (c) 2002 Lorenzo Petrone"
    echo "distributed under Gnu GPL version 2, or any later version"
    echo
        echo 'syntax: diskinfo [device]'
    exit 0
fi
if [ "$1" = "--version" ] ; then
    echo $PROGRAM_VERSION
    exit 0
fi

if [ -n "$1" ] ; then
        DISK=$1
fi

if [ `whoami` != "root" ] ; then
        echo -n "you are not root, i doubt you can get useful output using " 
1>&2
        echo -n "this program... shall i continue? (Y/n) " 1>&2
        read YESORNO
        if [ -z $YESORNO ] ; then
                YESORNO=Y
        fi
        if [ $YESORNO != "y" -a $YESORNO != "Y" ] ; then
                exit 1
        fi
fi

dmesg -n1 || echo "warning: dmesg -n1 failed"
copx parted -s $DISK print
copx fdisk -l $DISK
mount -a || echo "warning: mount -a failed"
copx mount
copx df -khT
copx cat /etc/fstab



Other related posts: