403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/laragon/bin/git/etc/post-install/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/laragon/bin/git/etc/post-install/01-devices.post
maybe_create_devs ()
{
  local DEVDIR=/dev
  # Check for ${DEVDIR} directory
  if [ -e "${DEVDIR}" -a ! -d "${DEVDIR}" ]
  then 
    # No mercy.  Try to remove.
    rm -f "${DEVDIR}"
    if [ -e "${DEVDIR}" -a ! -d "${DEVDIR}" ]
    then 
      echo
      echo "${DEVDIR} is existant but not a directory."
      echo "Please fix that manually, otherwise you WILL get problems."
      echo
      exit 1
    fi
  fi

  # Create it if necessary
  mkdir -m 755 "${DEVDIR}" 2> /dev/null
  if [ ! -e "${DEVDIR}" ]
  then
    echo
    echo "Creating ${DEVDIR} directory failed."
    echo "Please fix that manually, otherwise you WILL get problems."
    echo
    exit 1
  fi

  # Check for ${DEVDIR}/shm directory (for POSIX semaphores and POSIX shared mem)
  if [ -e "${DEVDIR}/shm" -a ! -d "${DEVDIR}/shm" ]
  then
    # No mercy.  Try to remove.
    rm -f "${DEVDIR}/shm"
    if [ -e "${DEVDIR}/shm" -a ! -d "${DEVDIR}/shm" ]
    then 
      echo
      echo "${DEVDIR}/shm is existant but not a directory."
      echo "POSIX semaphores and POSIX shared memory will not work"
      echo
    fi
  fi

  # Create it if necessary
  if [ ! -e "${DEVDIR}/shm" ]
  then
    mkdir "${DEVDIR}/shm"
    if [ ! -e "${DEVDIR}/shm" ]
    then
      echo
      echo "Creating ${DEVDIR}/shm directory failed."
      echo "POSIX semaphores and POSIX shared memory will not work"
      echo
    fi
  fi

  # Check for ${DEVDIR}/mqueue directory (for POSIX message queues)
  if [ -e "${DEVDIR}/mqueue" -a ! -d "${DEVDIR}/mqueue" ]
  then
    # No mercy.  Try to remove.
    rm -f "${DEVDIR}/mqueue"
    if [ -e "${DEVDIR}/mqueue" -a ! -d "${DEVDIR}/mqueue" ]
    then 
      echo
      echo "${DEVDIR}/mqueue is existant but not a directory."
      echo "POSIX message queues will not work"
      echo
    fi
  fi

  # Create it if necessary
  if [ ! -e "${DEVDIR}/mqueue" ]
  then
    mkdir "${DEVDIR}/mqueue"
    if [ ! -e "${DEVDIR}/mqueue" ]
    then
      echo
      echo "Creating ${DEVDIR}/mqueue directory failed."
      echo "POSIX message queues will not work"
      echo
    fi
  fi
  
  # Install /dev/fd, /dev/std{in,out,err}.  The bash builtin test was compiled
  # to assume these exist, so use /bin/test to really check.
  /usr/bin/test -h /dev/stdin  || ln -sf /proc/self/fd/0 /dev/stdin
  /usr/bin/test -h /dev/stdout || ln -sf /proc/self/fd/1 /dev/stdout
  /usr/bin/test -h /dev/stderr || ln -sf /proc/self/fd/2 /dev/stderr
  /usr/bin/test -h /dev/fd     || ln -sf /proc/self/fd   /dev/fd
}

maybe_create_devs

Youez - 2016 - github.com/yon3zu
LinuXploit