Shadow-Here


Server : Apache
System : Linux methusalix2 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
User : hios ( 1437)
PHP Version : 5.6.40-0+deb8u12
Disable Function : proc_close,proc_open,dl,shell_exec,passthru
Directory :  /usr/share/initramfs-tools/hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :
Current File : //usr/share/initramfs-tools/hooks/udev
#!/bin/sh -e

PREREQS=""

prereqs() { echo "$PREREQS"; }

case "$1" in
    prereqs)
    prereqs
    exit 0
    ;;
esac

root_over_the_network() {
  if   egrep -qs '^/dev/(nbd|nd[a-z]|etherd/e)[^[:space:]]+[[:space:]]+/[[:space:]]' /etc/fstab; then
    return 0
  elif egrep -qs '^[^[:space:]#]+[[:space:]]+/[[:space:]]+nfs[234]?[[:space:]]' /etc/fstab; then
    return 0
  fi
  return 1 # false
}

. /usr/share/initramfs-tools/hook-functions

mkdir -p $DESTDIR/lib/systemd
copy_exec /lib/systemd/systemd-udevd      /lib/systemd
copy_exec /bin/udevadm    /bin

# copy compat symlink
cp -a /sbin/udevadm $DESTDIR/sbin/udevadm

mkdir -p $DESTDIR/etc/udev
cp -p /etc/udev/udev.conf $DESTDIR/etc/udev/

mkdir -p $DESTDIR/lib/udev/rules.d/
for rules in 50-firmware.rules 50-udev-default.rules 60-persistent-storage.rules \
	80-drivers.rules \
	64-md-raid.rules 60-persistent-storage-lvm.rules \
	55-dm.rules 60-persistent-storage-dm.rules; do
  if   [ -e /etc/udev/rules.d/$rules ]; then
    cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
  elif [ -e /lib/udev/rules.d/$rules ]; then
    cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
  fi
done

# try to autodetect the value of this configuration option
if [ -z "$NEED_PERSISTENT_NET" ] && root_over_the_network; then
  NEED_PERSISTENT_NET='yes'
fi

# Copy the rules for persistent network interface names for the benefit of
# systems which need to boot over the network. If this is enabled then the
# initramfs must be rebuilt every time a new network interface is added.
# See #414287 for details.
case "$NEED_PERSISTENT_NET" in
YES|yes|Yes|Y|y)
  if [ -e /etc/udev/rules.d/70-persistent-net.rules ]; then
    cp -p /etc/udev/rules.d/70-persistent-net.rules $DESTDIR/lib/udev/rules.d/
  fi
  ;;
esac

cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/
for program in ata_id scsi_id; do
  copy_exec /lib/udev/$program /lib/udev
done
copy_exec /sbin/blkid /sbin

Samx