X7ROOT File Manager
Current Path:
/usr/sbin
usr
/
sbin
/
📁
..
📄
ModemManager
(1.19 MB)
📄
NetworkManager
(2.83 MB)
📄
abrt-auto-reporting
(10.98 KB)
📄
abrt-configuration
(31.66 KB)
📄
abrt-dbus
(31.22 KB)
📄
abrt-harvest-pstoreoops
(1.32 KB)
📄
abrt-harvest-vmcore
(8.19 KB)
📄
abrt-install-ccpp-hook
(2.85 KB)
📄
abrt-server
(31.11 KB)
📄
abrtd
(31.22 KB)
📄
accept
(10.95 KB)
📄
accessdb
(11.55 KB)
📄
accton
(11.19 KB)
📄
activate-devpay
(15.04 KB)
📄
addgnupghome
(3.05 KB)
📄
addpart
(19.69 KB)
📄
adduser
(134.39 KB)
📄
agetty
(48.48 KB)
📄
alsa-info
(28.09 KB)
📄
alsa-info.sh
(28.09 KB)
📄
alsabat-test.sh
(4.04 KB)
📄
alsactl
(99.15 KB)
📄
alternatives
(27.61 KB)
📄
amaddclient
(15.02 KB)
📄
amadmin
(55.69 KB)
📄
amaespipe
(3.29 KB)
📄
amandad
(35.36 KB)
📄
amarchiver
(15.3 KB)
📄
amcheck
(63.25 KB)
📄
amcheckdb
(1.79 KB)
📄
amcheckdump
(14.25 KB)
📄
amcleanup
(6.21 KB)
📄
amcleanupdisk
(4.16 KB)
📄
amcrypt
(1.02 KB)
📄
amcrypt-ossl
(3.12 KB)
📄
amcrypt-ossl-asym
(6.8 KB)
📄
amcryptsimple
(4.55 KB)
📄
amdevcheck
(4.51 KB)
📄
amdump
(10.46 KB)
📄
amfetchdump
(26.87 KB)
📄
amflush
(27.13 KB)
📄
amgetconf
(12.24 KB)
📄
amgpgcrypt
(2.68 KB)
📄
amlabel
(11.22 KB)
📄
amoverview
(6.42 KB)
📄
amplot
(5.94 KB)
📄
amreport
(17.65 KB)
📄
amrestore
(12.7 KB)
📄
amrmtape
(8.91 KB)
📄
amserverconfig
(20.99 KB)
📄
amservice
(19.16 KB)
📄
amstatus
(49.23 KB)
📄
amtape
(19.47 KB)
📄
amtapetype
(22.56 KB)
📄
amtoc
(7.54 KB)
📄
amvault
(29.59 KB)
📄
anaconda
(54.99 KB)
📄
anacron
(35.52 KB)
📄
apachectl
(4.19 KB)
📄
applygnupgdefaults
(2.21 KB)
📄
arp
(63.98 KB)
📄
arpd
(52.98 KB)
📄
arping
(23.19 KB)
📄
atd
(27.17 KB)
📄
atrun
(67 B)
📄
attrd_updater
(16.52 KB)
📄
audispd
(39.75 KB)
📄
auditctl
(39.56 KB)
📄
auditd
(125.65 KB)
📄
augenrules
(3.7 KB)
📄
aureport
(105.39 KB)
📄
ausearch
(109.8 KB)
📄
authconfig
(43.49 KB)
📄
authconfig-tui
(43.49 KB)
📄
autrace
(15.49 KB)
📄
avahi-daemon
(133.04 KB)
📄
avcstat
(11.25 KB)
📄
badblocks
(27.69 KB)
📄
biosdecode
(24.15 KB)
📄
biosdevname
(36.57 KB)
📄
blkdeactivate
(15.97 KB)
📄
blkdiscard
(23.84 KB)
📄
blkid
(77.92 KB)
📄
blkmapd
(43.81 KB)
📄
blockdev
(32.2 KB)
📄
brctl
(32.13 KB)
📄
bridge
(77.61 KB)
📄
btrfs
(690.59 KB)
📄
btrfs-convert
(378.62 KB)
📄
btrfs-debug-tree
(354.23 KB)
📄
btrfs-find-root
(346.22 KB)
📄
btrfs-image
(374.63 KB)
📄
btrfs-map-logical
(350.27 KB)
📄
btrfs-select-super
(346.2 KB)
📄
btrfs-zero-log
(346.2 KB)
📄
btrfsck
(690.59 KB)
📄
btrfstune
(350.24 KB)
📄
build-locale-archive
(860.52 KB)
📄
cacertdir_rehash
(644 B)
📄
cache_check
(1.23 MB)
📄
cache_dump
(1.23 MB)
📄
cache_metadata_size
(1.23 MB)
📄
cache_repair
(1.23 MB)
📄
cache_restore
(1.23 MB)
📄
cache_writeback
(1.23 MB)
📄
capsh
(19.43 KB)
📄
cbq
(32.73 KB)
📄
cfdisk
(71.37 KB)
📄
cgdisk
(176.87 KB)
📄
chat
(27.3 KB)
📄
chcpu
(23.7 KB)
📄
chgpasswd
(64.1 KB)
📄
chkconfig
(40.22 KB)
📄
chpasswd
(55.88 KB)
📄
chronyd
(263.08 KB)
📄
chroot
(32.48 KB)
📄
cibadmin
(27.2 KB)
📄
cifs.idmap
(15.07 KB)
📄
cifs.upcall
(31.23 KB)
📄
clamd
(208.18 KB)
📄
clamonacc
(200.67 KB)
📄
clock
(48.44 KB)
📄
clockdiff
(19.04 KB)
📄
consoletype
(6.95 KB)
📄
convertquota
(70.88 KB)
📄
corosync
(284.76 KB)
📄
corosync-cfgtool
(14.97 KB)
📄
corosync-cmapctl
(23.31 KB)
📄
corosync-cpgtool
(11 KB)
📄
corosync-keygen
(11.12 KB)
📄
corosync-notifyd
(33.63 KB)
📄
corosync-quorumtool
(23.16 KB)
📄
cracklib-check
(7.04 KB)
📄
cracklib-format
(246 B)
📄
cracklib-packer
(11.06 KB)
📄
cracklib-unpacker
(7.02 KB)
📄
crda
(11.34 KB)
📄
create-cracklib-dict
(990 B)
📄
crm_attribute
(21.51 KB)
📄
crm_diff
(16.73 KB)
📄
crm_error
(11.48 KB)
📄
crm_failcount
(6.56 KB)
📄
crm_master
(2.37 KB)
📄
crm_mon
(84.05 KB)
📄
crm_node
(24.93 KB)
📄
crm_report
(15.9 KB)
📄
crm_resource
(112.09 KB)
📄
crm_shadow
(21.02 KB)
📄
crm_simulate
(50.68 KB)
📄
crm_standby
(3.33 KB)
📄
crm_ticket
(31.15 KB)
📄
crm_verify
(16.38 KB)
📄
crmadmin
(21.1 KB)
📄
crond
(68.48 KB)
📄
cryptsetup
(85.41 KB)
📄
ctrlaltdel
(11.2 KB)
📄
ctstat
(20.09 KB)
📄
cups-browsed
(136.9 KB)
📄
cups-genppd.5.2
(56.05 KB)
📄
cups-genppdupdate
(34.2 KB)
📄
cupsaccept
(10.95 KB)
📄
cupsaddsmb
(10.98 KB)
📄
cupsctl
(14.97 KB)
📄
cupsd
(427.17 KB)
📄
cupsdisable
(10.95 KB)
📄
cupsenable
(10.95 KB)
📄
cupsfilter
(27.37 KB)
📄
cupsreject
(10.95 KB)
📄
dcbtool
(60.03 KB)
📄
ddns-confgen
(19.44 KB)
📄
debugfs
(120.65 KB)
📄
delpart
(19.69 KB)
📄
depmod
(143.24 KB)
📄
devlink
(64.72 KB)
📄
dhclient
(414.34 KB)
📄
dhclient-script
(30.38 KB)
📄
dm_dso_reg_tool
(11.29 KB)
📄
dmevent_tool
(11.29 KB)
📄
dmeventd
(39.56 KB)
📄
dmfilemapd
(19.16 KB)
📄
dmidecode
(120.2 KB)
📄
dmraid
(22.1 KB)
📄
dmraid.static
(22.1 KB)
📄
dmsetup
(149.2 KB)
📄
dmstats
(149.2 KB)
📄
dnsmasq
(340.79 KB)
📄
dnssec-checkds
(922 B)
📄
dnssec-coverage
(924 B)
📄
dnssec-dsfromkey
(56.6 KB)
📄
dnssec-importkey
(52.59 KB)
📄
dnssec-keyfromlabel
(60.52 KB)
📄
dnssec-keygen
(64.55 KB)
📄
dnssec-keymgr
(920 B)
📄
dnssec-revoke
(48.46 KB)
📄
dnssec-settime
(56.52 KB)
📄
dnssec-signzone
(105.71 KB)
📄
dnssec-verify
(48.47 KB)
📄
dosfsck
(56.24 KB)
📄
dosfslabel
(52.23 KB)
📄
dovecot
(88.1 KB)
📄
dracut
(55.83 KB)
📄
dump-acct
(19.63 KB)
📄
dump-utmp
(15.47 KB)
📄
dumpe2fs
(23.62 KB)
📄
e2freefrag
(11.15 KB)
📄
e2fsck
(250.55 KB)
📄
e2image
(27.85 KB)
📄
e2label
(69.41 KB)
📄
e2undo
(11.32 KB)
📄
e4defrag
(23.55 KB)
📄
eapol_test
(1.77 MB)
📄
ebtables
(6.85 KB)
📄
ebtables-restore
(10.88 KB)
📄
ebtables-save
(851 B)
📄
editmap.sendmail
(95.55 KB)
📄
edquota
(83.09 KB)
📄
era_check
(1.23 MB)
📄
era_dump
(1.23 MB)
📄
era_invalidate
(1.23 MB)
📄
era_restore
(1.23 MB)
📄
ether-wake
(73.26 KB)
📄
ethtool
(293.87 KB)
📄
eventlogadm
(39.17 KB)
📄
exportfs
(76.91 KB)
📄
faillock
(15.02 KB)
📄
fancontrol
(14.01 KB)
📄
fatlabel
(52.23 KB)
📄
fcgistarter
(11 KB)
📄
fcgiwrap
(19.8 KB)
📄
fcnsq
(15.13 KB)
📄
fcoeadm
(48.52 KB)
📄
fcoemon
(69.21 KB)
📄
fcping
(31.52 KB)
📄
fcrls
(19.16 KB)
📄
fdformat
(11.27 KB)
📄
fdisk
(195.8 KB)
📄
fence_amt_ws
(8.77 KB)
📄
fence_apc
(7.49 KB)
📄
fence_apc_snmp
(6.28 KB)
📄
fence_bladecenter
(3.09 KB)
📄
fence_brocade
(2.45 KB)
📄
fence_cisco_mds
(2.62 KB)
📄
fence_cisco_ucs
(5.53 KB)
📄
fence_compute
(16.43 KB)
📄
fence_drac5
(5 KB)
📄
fence_eaton_snmp
(6.66 KB)
📄
fence_emerson
(1.85 KB)
📄
fence_eps
(3.52 KB)
📄
fence_evacuate
(13 KB)
📄
fence_heuristics_ping
(5.78 KB)
📄
fence_hpblade
(3.66 KB)
📄
fence_ibmblade
(1.96 KB)
📄
fence_idrac
(6.5 KB)
📄
fence_ifmib
(3.18 KB)
📄
fence_ilo
(4.42 KB)
📄
fence_ilo2
(4.42 KB)
📄
fence_ilo3
(6.5 KB)
📄
fence_ilo3_ssh
(2.03 KB)
📄
fence_ilo4
(6.5 KB)
📄
fence_ilo4_ssh
(2.03 KB)
📄
fence_ilo5
(6.5 KB)
📄
fence_ilo5_ssh
(2.03 KB)
📄
fence_ilo_moonshot
(1.56 KB)
📄
fence_ilo_mp
(1.29 KB)
📄
fence_ilo_ssh
(2.03 KB)
📄
fence_imm
(6.5 KB)
📄
fence_intelmodular
(2.43 KB)
📄
fence_ipdu
(3.86 KB)
📄
fence_ipmilan
(6.5 KB)
📄
fence_kdump
(23.4 KB)
📄
fence_mpath
(9.98 KB)
📄
fence_redfish
(5.34 KB)
📄
fence_rhevm
(6.4 KB)
📄
fence_rsa
(1.76 KB)
📄
fence_rsb
(2.22 KB)
📄
fence_sbd
(11.11 KB)
📄
fence_scsi
(15.95 KB)
📄
fence_virt
(57.66 KB)
📄
fence_vmware_rest
(5.61 KB)
📄
fence_vmware_soap
(8.44 KB)
📄
fence_wti
(7.53 KB)
📄
fence_xvm
(57.66 KB)
📄
filefrag
(15.23 KB)
📄
findfs
(11.2 KB)
📄
fipvlan
(40.16 KB)
📄
firewalld
(6.87 KB)
📄
firstboot
(6.45 KB)
📄
fixfiles
(11.03 KB)
📄
fixparts
(61.65 KB)
📄
fsadm
(23.97 KB)
📄
fsck
(32.12 KB)
📄
fsck.btrfs
(1.16 KB)
📄
fsck.cramfs
(19.57 KB)
📄
fsck.ext2
(250.55 KB)
📄
fsck.ext3
(250.55 KB)
📄
fsck.ext4
(250.55 KB)
📄
fsck.fat
(56.24 KB)
📄
fsck.minix
(73.32 KB)
📄
fsck.msdos
(56.24 KB)
📄
fsck.vfat
(56.24 KB)
📄
fsck.xfs
(433 B)
📄
fsfreeze
(11.23 KB)
📄
fstrim
(40.59 KB)
📄
ftpscrub
(16.47 KB)
📄
ftpshut
(10.98 KB)
📄
fuser
(32.34 KB)
📄
fxload
(19.26 KB)
📄
gdisk
(184.49 KB)
📄
gdm
(430.45 KB)
📄
genhomedircon
(23.77 KB)
📄
genhostid
(6.94 KB)
📄
genl
(52.81 KB)
📄
genl-ctrl-list
(11.27 KB)
📄
genrandom
(11.16 KB)
📄
getcap
(11.13 KB)
📄
getenforce
(7.01 KB)
📄
getpcaps
(7.07 KB)
📄
getsebool
(11.13 KB)
📄
glibc_post_upgrade.i686
(700.2 KB)
📄
glibc_post_upgrade.x86_64
(772.05 KB)
📄
gluster
(465.84 KB)
📄
groupadd
(85.65 KB)
📄
groupdel
(77.38 KB)
📄
groupmems
(55.97 KB)
📄
groupmod
(85.66 KB)
📄
grpck
(59.93 KB)
📄
grpconv
(51.73 KB)
📄
grpunconv
(51.73 KB)
📄
grub2-bios-setup
(1.03 MB)
📄
grub2-get-kernel-settings
(2.08 KB)
📄
grub2-install
(1.28 MB)
📄
grub2-macbless
(1.01 MB)
📄
grub2-mkconfig
(7.63 KB)
📄
grub2-ofpathname
(225.54 KB)
📄
grub2-probe
(1.03 MB)
📄
grub2-reboot
(4 KB)
📄
grub2-rpm-sort
(258.52 KB)
📄
grub2-set-default
(3.46 KB)
📄
grub2-setpassword
(2.96 KB)
📄
grub2-sparc64-setup
(1.03 MB)
📄
grubby
(71.27 KB)
📄
gssproxy
(130.64 KB)
📄
halt
(704.8 KB)
📄
handle-sshpw
(2.35 KB)
📄
hardlink
(15.29 KB)
📄
htcacheclean
(31.16 KB)
📄
httpd
(511.44 KB)
📄
hwclock
(48.44 KB)
📄
hwloc-dump-hwdata
(15.32 KB)
📄
hypervfcopyd
(11.18 KB)
📄
hypervkvpd
(27.38 KB)
📄
hypervvssd
(15.23 KB)
📄
iconvconfig
(22.15 KB)
📄
iconvconfig.i686
(21.44 KB)
📄
iconvconfig.x86_64
(22.15 KB)
📄
ifcfg
(2.99 KB)
📄
ifconfig
(80.05 KB)
📄
ifdown
(1.61 KB)
📄
ifenslave
(19.74 KB)
📄
ifstat
(40.6 KB)
📄
ifup
(4.89 KB)
📄
in.proftpd
(988.23 KB)
📄
init
(1.56 MB)
📄
insmod
(143.24 KB)
📄
install-info
(110.42 KB)
📄
installkernel
(2.69 KB)
📄
intel-microcode2ucode
(11.1 KB)
📄
ip
(459.59 KB)
📄
ip6tables
(91.52 KB)
📄
ip6tables-restore
(91.52 KB)
📄
ip6tables-save
(91.52 KB)
📄
ipmaddr
(19.33 KB)
📄
ipmievd
(488.98 KB)
📄
iprconfig
(394.37 KB)
📄
iprdbg
(135.94 KB)
📄
iprdump
(123.67 KB)
📄
iprinit
(123.64 KB)
📄
iprsos
(2.18 KB)
📄
iprupdate
(123.64 KB)
📄
ipsec
(14.96 KB)
📄
ipset
(7.02 KB)
📄
iptables
(91.52 KB)
📄
iptables-restore
(91.52 KB)
📄
iptables-save
(91.52 KB)
📄
iptunnel
(23.33 KB)
📄
irqbalance
(48.5 KB)
📄
isadump
(15.02 KB)
📄
isaset
(10.98 KB)
📄
isc-hmac-fixup
(11.2 KB)
📄
iscsi-iname
(11.01 KB)
📄
iscsiadm
(794.39 KB)
📄
iscsid
(819.81 KB)
📄
iscsistart
(361.05 KB)
📄
iscsiuio
(182.09 KB)
📄
iso8601
(16.04 KB)
📄
iw
(157.97 KB)
📄
jk_check
(11.2 KB)
📄
jk_chrootlaunch
(20.77 KB)
📄
jk_chrootsh
(32.73 KB)
📄
jk_cp
(4.12 KB)
📄
jk_init
(9.68 KB)
📄
jk_jailuser
(11.81 KB)
📄
jk_list
(4.93 KB)
📄
jk_lsh
(24.66 KB)
📄
jk_socketd
(29.05 KB)
📄
jk_update
(9.11 KB)
📄
kexec
(166.06 KB)
📄
key.dns_resolver
(19.45 KB)
📄
killall5
(23.17 KB)
📄
kpartx
(39.47 KB)
📄
kpatch
(14.53 KB)
📄
ksmtuned
(3.36 KB)
📄
lchage
(15.41 KB)
📄
ldattach
(27.93 KB)
📄
ldconfig
(952.08 KB)
📄
ledctl
(61.97 KB)
📄
ledmon
(62.15 KB)
📄
lgroupadd
(11.28 KB)
📄
lgroupdel
(11.26 KB)
📄
lgroupmod
(15.44 KB)
📄
libvirtd
(506.11 KB)
📄
lid
(15.4 KB)
📄
liveinst
(5.83 KB)
📄
lldpad
(402.72 KB)
📄
lldptool
(96.02 KB)
📄
lnewusers
(15.46 KB)
📄
lnstat
(20.09 KB)
📄
load_policy
(10.97 KB)
📄
loaderinfo
(40.91 KB)
📄
lockdev
(10.95 KB)
📄
logrotate
(68.61 KB)
📄
logsave
(11.27 KB)
📄
losetup
(82.45 KB)
📄
lpadmin
(27.09 KB)
📄
lpasswd
(15.5 KB)
📄
lpc
(15.07 KB)
📄
lpc.cups
(15.07 KB)
📄
lpinfo
(14.96 KB)
📄
lpmove
(10.98 KB)
📄
lsmod
(143.24 KB)
📄
lsof
(150.57 KB)
📄
lspci
(73.67 KB)
📄
luseradd
(15.38 KB)
📄
luserdel
(11.3 KB)
📄
lusermod
(19.43 KB)
📄
lvchange
(2.15 MB)
📄
lvconvert
(2.15 MB)
📄
lvcreate
(2.15 MB)
📄
lvdisplay
(2.15 MB)
📄
lvextend
(2.15 MB)
📄
lvm
(2.15 MB)
📄
lvmconf
(12.55 KB)
📄
lvmconfig
(2.15 MB)
📄
lvmdiskscan
(2.15 MB)
📄
lvmdump
(10.07 KB)
📄
lvmetad
(71.66 KB)
📄
lvmpolld
(64.07 KB)
📄
lvmsadc
(2.15 MB)
📄
lvmsar
(2.15 MB)
📄
lvreduce
(2.15 MB)
📄
lvremove
(2.15 MB)
📄
lvrename
(2.15 MB)
📄
lvresize
(2.15 MB)
📄
lvs
(2.15 MB)
📄
lvscan
(2.15 MB)
📄
lwresd
(768.03 KB)
📄
mailstats
(79.11 KB)
📄
makedumpfile
(376.52 KB)
📄
makemap.sendmail
(95.63 KB)
📄
matchpathcon
(11.19 KB)
📄
mcelog
(152.67 KB)
📄
mdadm
(593.45 KB)
📄
mdmon
(331.55 KB)
📄
mii-diag
(20.08 KB)
📄
mii-tool
(19.51 KB)
📄
milter-greylist
(253.3 KB)
📄
mkdict
(246 B)
📄
mkdosfs
(28.05 KB)
📄
mkdumprd
(13.99 KB)
📄
mke2fs
(94.08 KB)
📄
mkfs
(11.25 KB)
📄
mkfs.btrfs
(366.45 KB)
📄
mkfs.cramfs
(36.16 KB)
📄
mkfs.ext2
(94.08 KB)
📄
mkfs.ext3
(94.08 KB)
📄
mkfs.ext4
(94.08 KB)
📄
mkfs.fat
(28.05 KB)
📄
mkfs.minix
(36.27 KB)
📄
mkfs.msdos
(28.05 KB)
📄
mkfs.vfat
(28.05 KB)
📄
mkfs.xfs
(359.8 KB)
📄
mkhomedir_helper
(19.05 KB)
📄
mklost+found
(11.11 KB)
📄
mkswap
(69.64 KB)
📄
modinfo
(143.24 KB)
📄
modprobe
(143.24 KB)
📄
mount.cifs
(40.05 KB)
📄
mount.fuse
(11.1 KB)
📄
mount.nfs
(114.68 KB)
📄
mount.nfs4
(114.68 KB)
📄
mountstats
(40.59 KB)
📄
mpathconf
(10.6 KB)
📄
mpathpersist
(27.91 KB)
📄
mtr
(83.18 KB)
📄
mtx
(49.87 KB)
📄
multipath
(22.99 KB)
📄
multipathd
(84.37 KB)
📄
named
(768.03 KB)
📄
named-checkconf
(32.25 KB)
📄
named-checkzone
(32.06 KB)
📄
named-compilezone
(32.06 KB)
📄
named-journalprint
(11.13 KB)
📄
nameif
(15.32 KB)
📄
netreport
(10.96 KB)
📄
netscsid
(19.55 KB)
📄
new-kernel-pkg
(24.96 KB)
📄
newusers
(93.45 KB)
📄
nfsdcltrack
(40.11 KB)
📄
nfsidmap
(19.32 KB)
📄
nfsiostat
(23.64 KB)
📄
nfsstat
(29.84 KB)
📄
nl-class-add
(11.7 KB)
📄
nl-class-delete
(11.55 KB)
📄
nl-class-list
(11.48 KB)
📄
nl-classid-lookup
(11.29 KB)
📄
nl-cls-add
(11.76 KB)
📄
nl-cls-delete
(11.68 KB)
📄
nl-cls-list
(11.58 KB)
📄
nl-link-list
(11.52 KB)
📄
nl-pktloc-lookup
(11.36 KB)
📄
nl-qdisc-add
(11.6 KB)
📄
nl-qdisc-delete
(11.54 KB)
📄
nl-qdisc-list
(11.63 KB)
📄
nmbd
(249.07 KB)
📄
nologin
(7.01 KB)
📄
nsec3hash
(11.13 KB)
📄
nstat
(23.88 KB)
📄
ntpdate
(107.58 KB)
📄
ntsysv
(36.24 KB)
📄
ocft
(22.04 KB)
📄
oddjobd
(72.11 KB)
📄
opendkim
(158.3 KB)
📄
opendkim-default-keygen
(1.4 KB)
📄
opendkim-genkey
(6.29 KB)
📄
opendkim-genzone
(66.68 KB)
📄
opendkim-reportstats
(14.16 KB)
📄
opendkim-testkey
(70.98 KB)
📄
opendkim-testmsg
(15.27 KB)
📄
osd_login
(2.55 KB)
📄
ownership
(15.04 KB)
📄
pacemakerd
(59.74 KB)
📄
packer
(11.06 KB)
📄
pam_console_apply
(39.69 KB)
📄
pam_tally2
(15.05 KB)
📄
pam_timestamp_check
(10.97 KB)
📄
paperconfig
(4.07 KB)
📄
parted
(77.22 KB)
📄
partprobe
(11.23 KB)
📄
partx
(86.55 KB)
📄
pcs
(292 B)
📄
pdata_tools
(1.23 MB)
📄
pethtool
(8.94 KB)
📄
php-fpm
(5.03 MB)
📄
pidof
(23.17 KB)
📄
pifconfig
(3.03 KB)
📄
ping6
(64.63 KB)
📄
pivot_root
(11.19 KB)
📄
plipconfig
(11.06 KB)
📄
pluginviewer
(15.23 KB)
📄
plymouth-set-default-theme
(6.21 KB)
📄
plymouthd
(84.22 KB)
📄
pm-hibernate
(2.86 KB)
📄
pm-powersave
(2.09 KB)
📄
pm-suspend
(2.86 KB)
📄
pm-suspend-hybrid
(2.86 KB)
📄
pm-utils-bugreport-info.sh
(1.47 KB)
📄
portrelease
(15.02 KB)
📄
portreserve
(15.02 KB)
📄
postalias
(253.87 KB)
📄
postcat
(136.08 KB)
📄
postconf
(363.19 KB)
📄
postdrop
(213.44 KB)
📄
postfix
(119.17 KB)
📄
postgrey
(37.94 KB)
📄
postgreyreport
(23.8 KB)
📄
postkick
(131.43 KB)
📄
postlock
(127.38 KB)
📄
postlog
(119.38 KB)
📄
postmap
(257.69 KB)
📄
postmulti
(135.89 KB)
📄
postqueue
(257.94 KB)
📄
postsuper
(139.95 KB)
📄
poweroff
(704.8 KB)
📄
ppp-watch
(23.2 KB)
📄
pppd
(372.98 KB)
📄
pppdump
(52.77 KB)
📄
pppoe-discovery
(18.04 KB)
📄
pppstats
(14.99 KB)
📄
praliases
(95.64 KB)
📄
proftpd
(988.23 KB)
📄
pvchange
(2.15 MB)
📄
pvck
(2.15 MB)
📄
pvcreate
(2.15 MB)
📄
pvdisplay
(2.15 MB)
📄
pvmove
(2.15 MB)
📄
pvremove
(2.15 MB)
📄
pvresize
(2.15 MB)
📄
pvs
(2.15 MB)
📄
pvscan
(2.15 MB)
📄
pwck
(51.71 KB)
📄
pwconv
(47.57 KB)
📄
pwhistory_helper
(15.44 KB)
📄
pwmconfig
(22.92 KB)
📄
pwunconv
(47.59 KB)
📄
qb-blackbox
(7.02 KB)
📄
quot
(70.66 KB)
📄
quotacheck
(107.29 KB)
📄
quotaoff
(75.03 KB)
📄
quotaon
(75.03 KB)
📄
quotastats
(14.03 KB)
📄
radvd
(101.59 KB)
📄
radvdump
(23.64 KB)
📄
raid-check
(3.7 KB)
📄
ras-mc-ctl
(38.48 KB)
📄
rasdaemon
(185.11 KB)
📄
rdisc
(23.17 KB)
📄
rdma
(73.42 KB)
📄
rdma-ndd
(15.36 KB)
📄
readprofile
(15.46 KB)
📄
realm
(138.77 KB)
📄
reboot
(704.8 KB)
📄
regdbdump
(7.12 KB)
📄
reject
(10.95 KB)
📄
repquota
(75.16 KB)
📄
request-key
(19.41 KB)
📄
resize2fs
(48.41 KB)
📄
resizepart
(32.36 KB)
📄
restorecon
(27.16 KB)
📄
rfkill
(11.29 KB)
📄
rmmod
(143.24 KB)
📄
rndc
(35.88 KB)
📄
rndc-confgen
(19.44 KB)
📄
rngd
(42.39 KB)
📄
rotatelogs
(19.04 KB)
📄
route
(66.6 KB)
📄
routef
(173 B)
📄
routel
(1.59 KB)
📄
rpc.gssd
(88.73 KB)
📄
rpc.idmapd
(48.13 KB)
📄
rpc.mountd
(128.91 KB)
📄
rpc.nfsd
(40.2 KB)
📄
rpc.rquotad
(78.95 KB)
📄
rpc.statd
(97.59 KB)
📄
rpcbind
(60.07 KB)
📄
rpcdebug
(18.05 KB)
📄
rpcinfo
(27.3 KB)
📄
rsyslogd
(648.45 KB)
📄
rtacct
(41.93 KB)
📄
rtcwake
(31.96 KB)
📄
rtkitctl
(10.88 KB)
📄
rtmon
(48.67 KB)
📄
rtpr
(37 B)
📄
rtstat
(20.09 KB)
📄
runlevel
(704.8 KB)
📄
runuser
(32.21 KB)
📄
sa
(36.77 KB)
📄
safe_finger
(11.08 KB)
📄
saned
(47.41 KB)
📄
sasl2-shared-mechlist
(10.98 KB)
📄
saslauthd
(92.59 KB)
📄
sasldblistusers2
(19.26 KB)
📄
saslpasswd2
(15.09 KB)
📄
scsieject
(41.07 KB)
📄
scsitape
(45.38 KB)
📄
sedispatch
(15.56 KB)
📄
sefcontext_compile
(60.53 KB)
📄
selabel_digest
(11.17 KB)
📄
selabel_lookup
(11.14 KB)
📄
selabel_lookup_best_match
(11.16 KB)
📄
selabel_partial_match
(11.09 KB)
📄
selinux_restorecon
(15.21 KB)
📄
selinuxconlist
(11.1 KB)
📄
selinuxdefcon
(11.12 KB)
📄
selinuxenabled
(6.98 KB)
📄
selinuxexeccon
(7.09 KB)
📄
semanage
(42.76 KB)
📄
semodule
(23.77 KB)
📄
sendmail
(242.11 KB)
📄
sendmail.postfix
(242.11 KB)
📄
sendmail.sendmail
(817.3 KB)
📄
sensors-detect
(207.11 KB)
📄
service
(3.17 KB)
📄
sestatus
(15.02 KB)
📄
setcap
(11.13 KB)
📄
setenforce
(7.05 KB)
📄
setfiles
(27.16 KB)
📄
setpci
(23.4 KB)
📄
setquota
(83.16 KB)
📄
setregdomain
(1.7 KB)
📄
setroubleshootd
(3.22 KB)
📄
setsebool
(14.99 KB)
📄
setup
(15.38 KB)
📄
sfdisk
(83.25 KB)
📄
sgdisk
(168.33 KB)
📄
sgpio
(15.63 KB)
📄
showmount
(19.56 KB)
📄
shutdown
(704.8 KB)
📄
skdump
(15.2 KB)
📄
sktest
(6.98 KB)
📄
slattach
(42.4 KB)
📄
sln
(743.78 KB)
📄
sm-notify
(68.43 KB)
📄
smartctl
(864.48 KB)
📄
smartd
(670.63 KB)
📄
smbd
(91.84 KB)
📄
smrsh
(74.97 KB)
📄
smtp-sink
(90.91 KB)
📄
smtp-source
(77.79 KB)
📄
sosreport
(561 B)
📄
spice-vdagentd
(43.73 KB)
📄
ss
(128.44 KB)
📄
sshd
(832.9 KB)
📄
sshd-keygen
(3.53 KB)
📄
start-statd
(842 B)
📄
stinit
(35.52 KB)
📄
stonith_admin
(25.69 KB)
📄
suexec
(15.01 KB)
📄
sulogin
(40.53 KB)
📄
sushell
(67 B)
📄
swaplabel
(15.31 KB)
📄
swapoff
(15.53 KB)
📄
swapon
(53.29 KB)
📄
switch_root
(15.35 KB)
📄
sys-unconfig
(184 B)
📄
sysctl
(23.57 KB)
📄
tapeinfo
(45 KB)
📄
tc
(384.66 KB)
📄
tcpd
(36.62 KB)
📄
tcpdmatch
(40.83 KB)
📄
tcpdump
(920.16 KB)
📄
tcpslice
(23.64 KB)
📄
tcsd
(300.27 KB)
📄
telinit
(704.8 KB)
📄
testsaslauthd
(15.09 KB)
📄
thin_check
(1.23 MB)
📄
thin_delta
(1.23 MB)
📄
thin_dump
(1.23 MB)
📄
thin_ls
(1.23 MB)
📄
thin_metadata_size
(1.23 MB)
📄
thin_repair
(1.23 MB)
📄
thin_restore
(1.23 MB)
📄
thin_rmap
(1.23 MB)
📄
thin_trim
(1.23 MB)
📄
tracepath
(15.05 KB)
📄
tracepath6
(15.05 KB)
📄
try-from
(23.47 KB)
📄
tsig-keygen
(19.44 KB)
📄
tune2fs
(69.41 KB)
📄
tuned
(3.29 KB)
📄
tuned-adm
(5.22 KB)
📄
udevadm
(414.27 KB)
📄
umount.nfs
(114.68 KB)
📄
umount.nfs4
(114.68 KB)
📄
umount.udisks2
(10.98 KB)
📄
unbound-anchor
(55.62 KB)
📄
unix_chkpwd
(35.42 KB)
📄
unix_update
(35.42 KB)
📄
update-alternatives
(27.61 KB)
📄
update-pciids
(1.71 KB)
📄
update-smart-drivedb
(14.34 KB)
📄
usb_modeswitch
(57.61 KB)
📄
usb_modeswitch_dispatcher
(236.66 KB)
📄
usbmuxd
(69.72 KB)
📄
useradd
(134.39 KB)
📄
userdel
(93.5 KB)
📄
userhelper
(39.38 KB)
📄
usermod
(130.33 KB)
📄
usernetctl
(11.03 KB)
📄
vdptool
(48.96 KB)
📄
vgcfgbackup
(2.15 MB)
📄
vgcfgrestore
(2.15 MB)
📄
vgchange
(2.15 MB)
📄
vgck
(2.15 MB)
📄
vgconvert
(2.15 MB)
📄
vgcreate
(2.15 MB)
📄
vgdisplay
(2.15 MB)
📄
vgexport
(2.15 MB)
📄
vgextend
(2.15 MB)
📄
vgimport
(2.15 MB)
📄
vgimportclone
(2.15 MB)
📄
vgmerge
(2.15 MB)
📄
vgmknodes
(2.15 MB)
📄
vgreduce
(2.15 MB)
📄
vgremove
(2.15 MB)
📄
vgrename
(2.15 MB)
📄
vgs
(2.15 MB)
📄
vgscan
(2.15 MB)
📄
vgsplit
(2.15 MB)
📄
vigr
(62.54 KB)
📄
vipw
(62.54 KB)
📄
virt-what
(11.57 KB)
📄
virtlockd
(723.38 KB)
📄
virtlogd
(719.13 KB)
📄
virtualmin
(1.3 KB)
📄
visudo
(200.89 KB)
📄
vmcore-dmesg
(19.28 KB)
📄
vpddecode
(15.33 KB)
📄
weak-modules
(31.9 KB)
📄
wipefs
(28.05 KB)
📄
wpa_cli
(128.06 KB)
📄
wpa_passphrase
(56.79 KB)
📄
wpa_supplicant
(1.93 MB)
📄
xfs_admin
(1.35 KB)
📄
xfs_bmap
(638 B)
📄
xfs_copy
(339.33 KB)
📄
xfs_db
(576.38 KB)
📄
xfs_estimate
(11.16 KB)
📄
xfs_freeze
(767 B)
📄
xfs_fsr
(31.83 KB)
📄
xfs_growfs
(327.2 KB)
📄
xfs_info
(472 B)
📄
xfs_io
(122.68 KB)
📄
xfs_logprint
(355.81 KB)
📄
xfs_mdrestore
(314.81 KB)
📄
xfs_metadump
(747 B)
📄
xfs_mkfile
(1007 B)
📄
xfs_ncheck
(650 B)
📄
xfs_quota
(84.88 KB)
📄
xfs_repair
(563.2 KB)
📄
xfs_rtcp
(15.25 KB)
📄
xfsdump
(291.69 KB)
📄
xfsinvutil
(61.87 KB)
📄
xfsrestore
(353.2 KB)
📄
xqmstats
(14.03 KB)
📄
xtables-multi
(91.52 KB)
📄
yum-complete-transaction
(9.22 KB)
📄
yumdb
(8.67 KB)
📄
zdump
(14.02 KB)
📄
zic
(50.02 KB)
📄
zramctl
(82.23 KB)
Editing: anaconda
#!/usr/bin/python # # anaconda: The Red Hat Linux Installation program # # Copyright (C) 1999-2013 # 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/>. # # Author(s): Brent Fox <bfox@redhat.com> # Mike Fulbright <msf@redhat.com> # Jakub Jelinek <jakub@redhat.com> # Jeremy Katz <katzj@redhat.com> # Chris Lumens <clumens@redhat.com> # Paul Nasrat <pnasrat@redhat.com> # Erik Troan <ewt@rpath.com> # Matt Wilson <msw@rpath.com> # # This toplevel file is a little messy at the moment... (2001-06-22) # ...still messy (2013-07-12) coverage = None proc_cmdline = open("/proc/cmdline", "r").read() proc_cmdline = proc_cmdline.split() if ("debug=1" in proc_cmdline) or ("debug" in proc_cmdline): import coverage cov = coverage.coverage(data_file="/mnt/sysimage/root/anaconda.coverage", branch=True, source=["/usr/sbin/anaconda", "pyanaconda"] ) cov.start() import atexit, sys, os, time, signal def exitHandler(rebootData, storage, payload, exitCode=None): # Clear the list of watched PIDs. iutil.unwatchAllProcesses() # stop and save coverage here b/c later the file system may be unavailable if coverage is not None: cov.stop() if os.path.isdir('/mnt/sysimage/root'): cov.save() if flags.usevnc: vnc.shutdownServer() if exitCode: anaconda.intf.shutdown() if "nokill" in flags.cmdline: iutil.vtActivate(1) print("anaconda halting due to nokill flag.") print("The system will be rebooted when you press Ctrl-Alt-Delete.") while True: time.sleep(10000) payload.preShutdown() if image_count or flags.dirInstall: anaconda.storage.umountFilesystems(swapoff=False) devicetree = anaconda.storage.devicetree devicetree.teardownAll() for imageName in devicetree.diskImages: dev = devicetree.getDeviceByName(imageName) for loop in dev.parents: loop.controllable = True dev.deactivate(recursive=True) if anaconda.dbus_inhibit_id: from pyanaconda.screensaver import uninhibit_screensaver uninhibit_screensaver(anaconda.dbus_session_connection, anaconda.dbus_inhibit_id) anaconda.dbus_inhibit_id = None if not flags.imageInstall and not flags.livecdInstall \ and not flags.dirInstall: from pykickstart.constants import KS_SHUTDOWN, KS_WAIT if flags.eject or rebootData.eject: for cdrom in storage.devicetree.getDevicesByType("cdrom"): if iutil.get_mount_paths(cdrom.path): iutil.dracut_eject(cdrom.path) if flags.kexec: iutil.execWithRedirect("systemctl", ["--no-wall", "kexec"]) while True: time.sleep(10000) elif rebootData.action == KS_SHUTDOWN: iutil.execWithRedirect("systemctl", ["--no-wall", "poweroff"]) elif rebootData.action == KS_WAIT: iutil.execWithRedirect("systemctl", ["--no-wall", "halt"]) else: # reboot action is KS_REBOOT or None iutil.execWithRedirect("systemctl", ["--no-wall", "reboot"]) def startSpiceVDAgent(): status = iutil.execWithRedirect("spice-vdagent", []) if status: log.info("spice-vdagent exited with status %d", status) else: log.info("Started spice-vdagent.") def startX11(xtimeout): # Ignore stdout/stderr, since everything is logged to /tmp/X.log anyway xfd = open("/dev/null", "wb") # Start Xorg and wait for it become ready iutil.startX(["Xorg", "-br", "-logfile", "/tmp/X.log", ":%s" % constants.X_DISPLAY_NUMBER, "vt6", "-s", "1440", "-ac", "-nolisten", "tcp", "-dpi", "96", "-noreset"], output_redirect=xfd, timeout=xtimeout) # function to handle X startup special issues for anaconda def doStartupX11Actions(): """Start window manager""" # When metacity actually connects to the X server is unknowable, but # fortunately it doesn't matter. metacity does not need to be the first # connection to Xorg, and if anaconda starts up before metacity, metacity # will just take over and maximize the window and make everything right, # fingers crossed. # Add XDG_DATA_DIRS to the environment to pull in our overridden schema # files. datadir = os.environ.get('ANACONDA_DATADIR', '/usr/share/anaconda') if 'XDG_DATA_DIRS' in os.environ: xdg_data_dirs = datadir + '/window-manager:' + os.environ['XDG_DATA_DIRS'] else: xdg_data_dirs = datadir + '/window-manager:/usr/share' childproc = iutil.startProgram(["metacity", "--display", ":1", "--sm-disable"], env_add={'XDG_DATA_DIRS': xdg_data_dirs}) iutil.watchProcess(childproc, "metacity") def set_x_resolution(runres): if runres and opts.display_mode == 'g' and not flags.usevnc: try: log.info("Setting the screen resolution to: %s.", runres) iutil.execWithRedirect("xrandr", ["-d", ":1", "-s", runres]) except RuntimeError: log.error("The X resolution not set") iutil.execWithRedirect("xrandr", ["-d", ":1", "-q"]) def doExtraX11Actions(runres): """Perform X11 actions not related to startup""" set_x_resolution(runres) startSpiceVDAgent() def setupPythonUpdates(): from distutils.sysconfig import get_python_lib import gi.overrides # Temporary hack for F18 alpha to symlink updates and product directories # into tmpfs. To be removed after beta in order to directly use content # from /run/install/ -- JLK for dirname in ("updates", "product"): if os.path.exists("/run/install/%s" % dirname): if os.path.islink("/tmp/%s" % dirname): # Assume updates have already been setup return os.symlink("/run/install/%s" % dirname, "/tmp/%s" % dirname) if not os.path.exists("/tmp/updates"): return for pkg in os.listdir("/tmp/updates"): d = "/tmp/updates/%s" % pkg if not os.path.isdir(d): continue # See if the package exists in /usr/lib{64,}/python/?.?/site-packages. # If it does, we can set it up as an update. If not, the pkg is # likely a completely new directory and should not be looked at. dest = "%s/%s" % (get_python_lib(), pkg) if not os.access(dest, os.R_OK): dest = "%s/%s" % (get_python_lib(1), pkg) if not os.access(dest, os.R_OK): continue # Symlink over everything that's in the python libdir but not in # the updates directory. symlink_updates(dest, d) gi.overrides.__path__.insert(0, "/run/install/updates") import glob import shutil for rule in glob.glob("/tmp/updates/*.rules"): target = "/etc/udev/rules.d/" + rule.split('/')[-1] shutil.copyfile(rule, target) def symlink_updates(dest_dir, update_dir): contents = os.listdir(update_dir) for f in os.listdir(dest_dir): dest_path = os.path.join(dest_dir, f) update_path = os.path.join(update_dir, f) if f in contents: # recurse into directories, there might be files missing in updates if os.path.isdir(dest_path) and os.path.isdir(update_path): symlink_updates(dest_path, update_path) else: if f.endswith(".pyc") or f.endswith(".pyo"): continue os.symlink(dest_path, update_path) def getAnacondaVersionString(): # we are importing the startup module directly so that it can be replaced # by updates image, if it was replaced before the updates image can be # loaded, it could not be easily replaced from pyanaconda import startup_utils return startup_utils.get_anaconda_version_string() def parseArguments(argv=None, boot_cmdline=None): from argparse import Action from pyanaconda.anaconda_argparse import AnacondaArgumentParser from pyanaconda.anaconda_argparse import HelpTextParser from pyanaconda.constants import X_TIMEOUT datadir = os.environ.get("ANACONDA_DATADIR", "/usr/share/anaconda") # NOTE: for each long option (like '--repo'), AnacondaOptionParser # checks the boot arguments for bootarg_prefix+option ('inst.repo'). # If require_prefix is False, it also accepts the option without the # bootarg_prefix ('repo'). # See anaconda_optparse.py and BootArgs (in flags.py) for details. ap = AnacondaArgumentParser(bootarg_prefix="inst.", require_prefix=False) help_parser = HelpTextParser(os.path.join(datadir, "anaconda_options.txt")) # NOTE: store_false options will *not* get negated when the user does # "option=0" on the boot commandline (store_true options do, though). # Basically, don't use store_false unless the option starts with "no". # YET ANOTHER NOTE: If you change anything here: # a) document its usage in docs/boot-options.txt # b) be prepared to maintain it for a very long time # If this seems like too much trouble, *don't add a new option*! # Version ap.add_argument('--version', action='version', version="%(prog)s " + getAnacondaVersionString()) # Interface ap.add_argument("-C", "--cmdline", dest="display_mode", action="store_const", const="c", default="g", help=help_parser.help_text("cmdline")) ap.add_argument("-G", "--graphical", dest="display_mode", action="store_const", const="g", help=help_parser.help_text("graphical")) ap.add_argument("-T", "--text", dest="display_mode", action="store_const", const="t", help=help_parser.help_text("text")) # Network ap.add_argument("--proxy", metavar='PROXY_URL', help=help_parser.help_text("proxy")) ap.add_argument("--waitfornet", metavar="TIMEOUT_IN_SECONDS", help=help_parser.help_text("waitfornet")) # Method of operation ap.add_argument("-d", "--debug", dest="debug", action="store_true", default=False, help=help_parser.help_text("debug")) ap.add_argument("--ks", dest="ksfile", action="store_const", metavar="KICKSTART_URL", const="/run/install/ks.cfg", help=help_parser.help_text("ks")) ap.add_argument("--kickstart", dest="ksfile", metavar="KICKSTART_PATH", help=help_parser.help_text("kickstart")) ap.add_argument("--rescue", dest="rescue", action="store_true", default=False, help=help_parser.help_text("rescue")) ap.add_argument("--armplatform", dest="armPlatform", type=str, metavar="PLATFORM_ID", help=help_parser.help_text("armplatform")) ap.add_argument("--multilib", dest="multiLib", action="store_true", default=False, help=help_parser.help_text("multilib")) ap.add_argument("-m", "--method", dest="method", default=None, metavar="METHOD", help=help_parser.help_text("method")) ap.add_argument("--askmethod", dest="askmethod", action="store_true", default=False, help=help_parser.help_text("askmethod")) ap.add_argument("--repo", dest="method", default=None, metavar="REPO_URL", help=help_parser.help_text("repo")) ap.add_argument("--stage2", dest="stage2", default=None, metavar="STAGE2_URL", help=help_parser.help_text("stage2")) ap.add_argument("--noverifyssl", action="store_true", default=False, help=help_parser.help_text("noverifyssl")) ap.add_argument("--liveinst", action="store_true", default=False, help=help_parser.help_text("liveinst")) # Display ap.add_argument("--resolution", dest="runres", default=None, metavar="WIDTHxHEIGHT", help=help_parser.help_text("resolution")) ap.add_argument("--usefbx", dest="xdriver", action="store_const", const="fbdev", help=help_parser.help_text("usefbx")) ap.add_argument("--vnc", action="store_true", default=False, help=help_parser.help_text("vnc")) ap.add_argument("--vncconnect", metavar="HOST:PORT", help=help_parser.help_text("vncconnect")) ap.add_argument("--vncpassword", default="", metavar="PASSWORD", help=help_parser.help_text("vncpassword")) ap.add_argument("--xdriver", dest="xdriver", action="store", type=str, default=None, metavar="DRIVER", help=help_parser.help_text("xdriver")) ap.add_argument("--xtimeout", action="store", type=int, default=X_TIMEOUT, metavar="TIMEOUT_IN_SECONDS", help=help_parser.help_text("xtimeout")) # Language ap.add_argument("--keymap", metavar="KEYMAP", help=help_parser.help_text("keymap")) ap.add_argument("--lang", metavar="LANG", help=help_parser.help_text("lang")) ap.add_argument("--singlelang", action="store_true", default=False, help=help_parser.help_text("singlelang")) # Obvious ap.add_argument("--loglevel", metavar="LEVEL", help=help_parser.help_text("loglevel")) ap.add_argument("--syslog", metavar="HOST[:PORT]", help=help_parser.help_text("syslog")) from pykickstart.constants import SELINUX_DISABLED, SELINUX_ENFORCING from pyanaconda.constants import SELINUX_DEFAULT ap.add_argument("--noselinux", dest="selinux", action="store_const", const=SELINUX_DISABLED, default=SELINUX_DEFAULT, help=help_parser.help_text("noselinux")) ap.add_argument("--selinux", action="store_const", const=SELINUX_ENFORCING, help=help_parser.help_text("selinux")) ap.add_argument("--nompath", dest="mpath", action="store_false", default=True, help=help_parser.help_text("nompath")) ap.add_argument("--mpath", action="store_true", help=help_parser.help_text("mpath")) ap.add_argument("--nodmraid", dest="dmraid", action="store_false", default=True, help=help_parser.help_text("nodmraid")) ap.add_argument("--dmraid", action="store_true", help=help_parser.help_text("dmraid")) ap.add_argument("--noibft", dest="ibft", action="store_false", default=True, help=help_parser.help_text("noibft")) ap.add_argument("--ibft", action="store_true", help=help_parser.help_text("ibft")) ap.add_argument("--nonibftiscsiboot", action="store_true", default=False, help=help_parser.help_text("nonibftiscsiboot")) # Geolocation ap.add_argument("--geoloc", metavar="PROVIDER_ID", help=help_parser.help_text("geoloc")) ap.add_argument("--geoloc-use-with-ks", action="store_true", default=False, help=help_parser.help_text("geoloc-use-with-ks")) # Kickstart and log saving # - use a custom action to convert the values of the nosave option into appropriate flags class ParseNosave(Action): def __call__(self, parser, namespace, values, option_string=None): options = [] if values: options = values.split(",") if "all" in options: flags.nosave_input_ks = True flags.nosave_output_ks = True flags.nosave_logs = True else: if "all_ks" in options: flags.nosave_input_ks = True flags.nosave_output_ks = True else: if "input_ks" in options: flags.nosave_input_ks = True if "output_ks" in options: flags.nosave_output_ks = True if "logs" in options: flags.nosave_logs = True ap.add_argument("--nosave", action=ParseNosave, nargs="?", help=help_parser.help_text("nosave")) # Miscellaneous ap.add_argument("--nomount", dest="rescue_nomount", action="store_true", default=False, help=help_parser.help_text("nomount")) ap.add_argument("--updates", dest="updateSrc", action="store", type=str, metavar="UPDATES_URL", help=help_parser.help_text("updates")) ap.add_argument("--image", action="append", dest="images", default=[], metavar="IMAGE_SPEC", help=help_parser.help_text("image")) ap.add_argument("--dirinstall", nargs="?", const=True, default=False, help=help_parser.help_text("dirinstall")) ap.add_argument("--memcheck", action="store_true", default=True, help=help_parser.help_text("memcheck")) ap.add_argument("--nomemcheck", action="store_false", dest="memcheck", help=help_parser.help_text("nomemcheck")) ap.add_argument("--leavebootorder", action="store_true", default=False, help=help_parser.help_text("leavebootorder")) ap.add_argument("--noeject", action="store_false", dest="eject", default=True, help=help_parser.help_text("noeject")) ap.add_argument("--extlinux", action="store_true", default=False, help=help_parser.help_text("extlinux")) ap.add_argument("--nombr", action="store_true", default=False, help=help_parser.help_text("nombr")) ap.add_argument("--mpathfriendlynames", action="store_true", default=True, help=help_parser.help_text("mpathfriendlynames")) ap.add_argument("--kexec", action="store_true", default=False, help=help_parser.help_text("kexec")) # some defaults change based on cmdline flags if boot_cmdline is not None: if "console" in boot_cmdline: ap.set_defaults(display_mode="t") namespace = ap.parse_args(argv, boot_cmdline=boot_cmdline) return (namespace, ap.deprecated_bootargs) def setupPythonPath(): # First add our updates path sys.path.insert(0, '/tmp/updates/') from pyanaconda.constants import ADDON_PATHS # append ADDON_PATHS dirs at the end sys.path.extend(ADDON_PATHS) def setupEnvironment(): from pyanaconda.users import createLuserConf # This method is run before any threads are started, so this is the one # point where it's ok to modify the environment. # pylint: disable=environment-modify # Silly GNOME stuff if 'HOME' in os.environ and not "XAUTHORITY" in os.environ: os.environ['XAUTHORITY'] = os.environ['HOME'] + '/.Xauthority' os.environ['HOME'] = '/tmp' os.environ['LC_NUMERIC'] = 'C' os.environ["GCONF_GLOBAL_LOCKS"] = "1" # In theory, this gets rid of our LVM file descriptor warnings os.environ["LVM_SUPPRESS_FD_WARNINGS"] = "1" # make sure we have /sbin and /usr/sbin in our path os.environ["PATH"] += ":/sbin:/usr/sbin" # we can't let the LD_PRELOAD hang around because it will leak into # rpm %post and the like. ick :/ if "LD_PRELOAD" in os.environ: del os.environ["LD_PRELOAD"] # Go ahead and set $DISPLAY whether we're going to use X or not if 'DISPLAY' in os.environ: flags.preexisting_x11 = True else: os.environ["DISPLAY"] = ":%s" % constants.X_DISPLAY_NUMBER # Call createLuserConf now to setup $LIBUSER_CONF # the config file can change later but the environment variable cannot createLuserConf(iutil.getSysroot()) def setupLoggingFromOpts(options): if (options.debug or options.updateSrc) and not options.loglevel: # debugging means debug logging if an explicit level hasn't been st options.loglevel = "debug" if options.loglevel and options.loglevel in anaconda_log.logLevelMap: log.info("Switching logging level to %s", options.loglevel) level = anaconda_log.logLevelMap[options.loglevel] anaconda_log.logger.loglevel = level anaconda_log.setHandlersLevel(log, level) storage_log = logging.getLogger("storage") anaconda_log.setHandlersLevel(storage_log, level) packaging_log = logging.getLogger("packaging") anaconda_log.setHandlersLevel(packaging_log, level) if options.syslog: anaconda_log.logger.updateRemote(options.syslog) def gtk_warning(title, reason): import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk dialog = Gtk.MessageDialog(type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.CLOSE, message_format=reason) dialog.set_title(title) dialog.run() dialog.destroy() # pylint: disable=redefined-outer-name def check_memory(anaconda, options, display_mode=None): from pyanaconda import isys reason_strict = _("%(product_name)s requires %(needed_ram)s MB of memory to " "install, but you only have %(total_ram)s MB on this machine.\n") reason_graphical = _("The %(product_name)s graphical installer requires %(needed_ram)s " "MB of memory, but you only have %(total_ram)s MB\n.") reboot_extra = _('\n' 'Press <return> to reboot your system.\n') livecd_title = _("Not enough RAM") livecd_extra = _(" Try the text mode installer by running:\n\n" "'/usr/bin/liveinst -T'\n\n from a root " "terminal.") nolivecd_extra = _(" Starting text mode.") if options.rescue: return if not display_mode: display_mode = anaconda.displayMode reason = reason_strict total_ram = int(isys.total_memory() / 1024) needed_ram = int(isys.MIN_RAM) graphical_ram = int(isys.MIN_GUI_RAM) # count the squashfs.img in if it is kept in RAM if not iutil.persistent_root_image(): needed_ram += isys.SQUASHFS_EXTRA_RAM graphical_ram += isys.SQUASHFS_EXTRA_RAM log.info("check_memory(): total:%s, needed:%s, graphical:%s", total_ram, needed_ram, graphical_ram) if not options.memcheck: log.warning("CHECK_MEMORY DISABLED") return reason_args = {"product_name": product.productName, "needed_ram": needed_ram, "total_ram": total_ram} if needed_ram > total_ram: if options.liveinst: # pylint: disable=logging-not-lazy stdoutLog.warning(reason % reason_args) gtk_warning(livecd_title, reason % reason_args) else: reason += reboot_extra print(reason % reason_args) print(_("The installation cannot continue and the system will be rebooted")) print(_("Press ENTER to continue")) input() iutil.ipmi_report(constants.IPMI_ABORTED) sys.exit(1) # override display mode if machine cannot nicely run X if display_mode not in ('t', 'c', 's') and not flags.usevnc: needed_ram = graphical_ram reason_args["needed_ram"] = graphical_ram reason = reason_graphical if needed_ram > total_ram: if options.liveinst: reason += livecd_extra # pylint: disable=logging-not-lazy stdoutLog.warning(reason % reason_args) title = livecd_title gtk_warning(title, reason % reason_args) iutil.ipmi_report(constants.IPMI_ABORTED) sys.exit(1) else: reason += nolivecd_extra # pylint: disable=logging-not-lazy stdoutLog.warning(reason % reason_args) anaconda.displayMode = 't' time.sleep(2) # pylint: disable=redefined-outer-name def setupDisplay(anaconda, options, addons=None): from pyanaconda.ui.tui.simpleline import App from pyanaconda.ui.tui.spokes.askvnc import AskVNCSpoke from pykickstart.constants import DISPLAY_MODE_TEXT from pyanaconda.nm import nm_is_connected, nm_is_connecting from pyanaconda.constants import X_TIMEOUT from blivet import arch try: xtimeout = int(options.xtimeout) except ValueError: log.warning("invalid inst.xtimeout option value: %s", options.xtimeout) xtimeout = X_TIMEOUT graphical_failed = 0 vncS = vnc.VncServer() # The vnc Server object. vncS.anaconda = anaconda vncS.timeout = xtimeout anaconda.displayMode = options.display_mode anaconda.isHeadless = arch.isS390() if options.vnc: flags.usevnc = True anaconda.displayMode = 'g' vncS.password = options.vncpassword # Only consider vncconnect when vnc is a param if options.vncconnect: cargs = string.split(options.vncconnect, ":") vncS.vncconnecthost = cargs[0] if len(cargs) > 1 and len(cargs[1]) > 0: if len(cargs[1]) > 0: vncS.vncconnectport = cargs[1] if options.xdriver: anaconda.xdriver = options.xdriver anaconda.writeXdriver(root="/") if flags.rescue_mode: return if anaconda.ksdata.vnc.enabled: flags.usevnc = True anaconda.displayMode = 'g' if vncS.password == "": vncS.password = anaconda.ksdata.vnc.password if vncS.vncconnecthost == "": vncS.vncconnecthost = anaconda.ksdata.vnc.host if vncS.vncconnectport == "": vncS.vncconnectport = anaconda.ksdata.vnc.port if anaconda.displayMode == "g": import pkgutil import pyanaconda.ui mods = (tup[1] for tup in pkgutil.iter_modules(pyanaconda.ui.__path__, "pyanaconda.ui.")) if "pyanaconda.ui.gui" not in mods: stdoutLog.warning("Graphical user interface not available, falling back to text mode") anaconda.displayMode = "t" flags.usevnc = False flags.vncquestion = False # disable VNC over text question when not enough memory is available if blivet.util.total_memory() < isys.MIN_GUI_RAM: stdoutLog.warning("Not asking for VNC because current memory (%d) < MIN_GUI_RAM (%d)", blivet.util.total_memory(), isys.MIN_GUI_RAM) flags.vncquestion = False # disable VNC question if text mode is requested and this is a ks install if anaconda.displayMode == 't' and flags.automatedInstall: stdoutLog.warning("Not asking for VNC because of an automated install") flags.vncquestion = False # disable VNC question if we were explicitly asked for text in kickstart if anaconda.ksdata.displaymode.displayMode == DISPLAY_MODE_TEXT: stdoutLog.warning("Not asking for VNC because text mode was explicitly asked for in kickstart") flags.vncquestion = False # disable VNC question if we don't have network if not nm_is_connecting() and not nm_is_connected(): stdoutLog.warning("Not asking for VNC because we don't have a network") flags.vncquestion = False # disable VNC question if we don't have Xvnc if not os.access('/usr/bin/Xvnc', os.X_OK): stdoutLog.warning("Not asking for VNC because we don't have Xvnc") flags.vncquestion = False # Should we try to start Xorg? want_x = anaconda.displayMode == 'g' and \ not (flags.preexisting_x11 or flags.usevnc) # X on a headless (e.g. s390) system? Nonsense! if want_x and anaconda.isHeadless: stdoutLog.warning(_("DISPLAY variable not set. Starting text mode.")) anaconda.displayMode = 't' graphical_failed = 1 time.sleep(2) want_x = False # Is Xorg is actually available? if want_x and not os.access("/usr/bin/Xorg", os.X_OK): stdoutLog.warning(_("Graphical installation is not available. " "Starting text mode.")) time.sleep(2) anaconda.displayMode = 't' want_x = False if anaconda.displayMode == 't' and flags.vncquestion: #we prefer vnc over text mode, so ask about that message = _("Text mode provides a limited set of installation " "options. It does not offer custom partitioning for " "full control over the disk layout. Would you like " "to use VNC mode instead?") app = App("VNC Question") spoke = AskVNCSpoke(app, anaconda.ksdata, message=message) app.schedule_screen(spoke) app.run() if anaconda.ksdata.vnc.enabled: anaconda.displayMode = 'g' flags.usevnc = True vncS.password = anaconda.ksdata.vnc.password else: # user has explicitly specified text mode flags.vncquestion = False log.info("Display mode = %s", anaconda.displayMode) check_memory(anaconda, options) # check_memory may have changed the display mode want_x = want_x and (anaconda.displayMode == "g") if want_x: try: startX11(xtimeout) doStartupX11Actions() except (OSError, RuntimeError) as e: log.warning("X startup failed: %s", e) stdoutLog.warning("X startup failed, falling back to text mode") anaconda.displayMode = 't' graphical_failed = 1 time.sleep(2) if not graphical_failed: doExtraX11Actions(options.runres) if anaconda.displayMode == 't' and graphical_failed and \ flags.vncquestion and not anaconda.ksdata.vnc.enabled: app = App("VNC Question") spoke = AskVNCSpoke(app, anaconda.ksdata) app.schedule_screen(spoke) app.run() if anaconda.ksdata.vnc.enabled: anaconda.displayMode = 'g' flags.usevnc = True vncS.password = anaconda.ksdata.vnc.password # if they want us to use VNC do that now if anaconda.displayMode == 'g' and flags.usevnc: vncS.startServer() doStartupX11Actions() # with X running we can initialize the UI interface anaconda.initInterface(addons) anaconda.instClass.configure(anaconda) # report if starting the GUI failed anaconda.gui_startup_failed = bool(graphical_failed) def prompt_for_ssh(): # Do some work here to get the ip addr / hostname to pass # to the user. import socket ip = network.get_default_device_ip() or network.getFirstRealIP() if not ip: stdoutLog.error("No IP addresses found, cannot continue installation.") iutil.ipmi_report(constants.IPMI_ABORTED) sys.exit(1) ipstr = ip try: hinfo = socket.gethostbyaddr(ipstr) except socket.herror as e: stdoutLog.debug("Exception caught trying to get host name of %s: %s", ipstr, e) name = network.getHostname() else: if len(hinfo) == 3: name = hinfo[0] if ip.find(':') != -1: ipstr = "[%s]" % (ip,) if (name is not None) and (not name.startswith('localhost')) and (ipstr is not None): connxinfo = "%s (%s)" % (socket.getfqdn(name=name), ipstr,) elif ipstr is not None: connxinfo = "%s" % (ipstr,) else: connxinfo = None if connxinfo: stdoutLog.info(_("Please ssh install@%s to begin the install."), connxinfo) else: stdoutLog.info(_("Please ssh install@<host> to continue installation.")) def cleanPStore(): """remove files stored in nonvolatile ram created by the pstore subsystem""" # files in pstore are linux (not distribution) specific, but we want to # make sure the entirity of them are removed so as to ensure that there # is sufficient free space on the flash part. On some machines this will # take effect immediately, which is the best case. Unfortunately on some, # an intervening reboot is needed.""" iutil.dir_tree_map("/sys/fs/pstore", os.unlink, files=True, dirs=False) if __name__ == "__main__": # check if the CLI help is requested and return it at once, # without importing random stuff and spamming stdout if ("--help" in sys.argv) or ("-h" in sys.argv) or ("--version" in sys.argv): # we skip the full logging initialisation, but we need to do at least # this much (redirect any log messages to stdout) to get rid of the # harmless but annoying "no handlers found" message on stdout import logging log = logging.getLogger("anaconda") log.addHandler(logging.StreamHandler(stream=sys.stdout)) parseArguments() print("Starting installer, one moment...") # Allow a file to be loaded as early as possible try: # pylint: disable=import-error,unused-import import updates_disk_hook except ImportError: pass # this handles setting up updates for pypackages to minimize the set needed setupPythonUpdates() setupPythonPath() # init threading before Gtk can do anything and before we start using threads # initThreading initializes the threadMgr instance, import it afterwards from pyanaconda.threads import initThreading, AnacondaThread initThreading() from pyanaconda.threads import threadMgr import gettext _ = lambda x: gettext.ldgettext("anaconda", x) from pyanaconda import constants from pyanaconda.addons import collect_addon_paths from pyanaconda import geoloc from pyanaconda import iutil # do this early so we can set flags before initializing logging from pyanaconda.flags import flags, can_touch_runtime_system (opts, depr) = parseArguments(boot_cmdline=flags.cmdline) if opts.images: flags.imageInstall = True elif opts.dirinstall: flags.dirInstall = True # Set up logging as early as possible. import logging from pyanaconda import anaconda_log anaconda_log.init() anaconda_log.logger.setupVirtio() from pyanaconda import network network.setup_ifcfg_log() log = logging.getLogger("anaconda") stdoutLog = logging.getLogger("anaconda.stdout") if os.geteuid() != 0: stdoutLog.error("anaconda must be run as root.") sys.exit(1) # check if input kickstart should be saved if flags.nosave_input_ks: log.warning("Input kickstart will not be saved to the installed system due to the nosave option.") iutil.touch('/tmp/NOSAVE_INPUT_KS') # check if logs should be saved if flags.nosave_logs: log.warning("Installation logs will not be saved to the installed system due to the nosave option.") iutil.touch('/tmp/NOSAVE_LOGS') # see if we're on s390x and if we've got an ssh connection uname = os.uname() if uname[4] == 's390x': if 'TMUX' not in os.environ and 'ks' not in flags.cmdline and \ not flags.imageInstall and not flags.dirInstall and not opts.ksfile: prompt_for_ssh() sys.exit(0) log.info("%s %s", sys.argv[0], getAnacondaVersionString()) if os.path.exists("/tmp/updates"): log.info("Using updates in /tmp/updates/ from %s", opts.updateSrc) # TODO: uncomment this when we're sure that we're doing the right thing # with flags.cmdline *everywhere* it appears... #for arg in depr: # stdoutLog.warn("Boot argument '%s' is deprecated. " # "In the future, use 'inst.%s'.", arg, arg) # pull this in to get product name and versioning from pyanaconda import product from pyanaconda import isys import string iutil.ipmi_report(constants.IPMI_STARTED) if opts.images and opts.dirinstall: stdoutLog.error("--images and --dirinstall cannot be used at the same time") iutil.ipmi_report(constants.IPMI_ABORTED) sys.exit(1) elif opts.dirinstall: if opts.dirinstall is True: root_path = os.environ.get("ANACONDA_ROOT_PATH", "/mnt/sysimage") else: root_path = opts.dirinstall iutil.setTargetPhysicalRoot(root_path) iutil.setSysroot(root_path) from pyanaconda import vnc from pyanaconda import kickstart from pyanaconda import ntp from pyanaconda import keyboard from pyanaconda.iutil import ProxyString, ProxyStringError verdesc = "%s for %s %s" % (getAnacondaVersionString(), product.productName, product.productVersion) logs_note = " * installation log files are stored in /tmp during the installation" shell_and_tmux_note = " * shell is available on TTY2" shell_only_note = " * shell is available on TTY2 and in second TMUX pane (ctrl+b, then press 2)" tmux_only_note = " * shell is available in second TMUX pane (ctrl+b, then press 2)" text_mode_note = " * if the graphical installation interface fails to start, try again with the\n"\ " inst.text bootoption to start text installation" separate_attachements_note = " * when reporting a bug add logs from /tmp as separate text/plain attachments" if product.isFinal: print("anaconda %s started." % verdesc) else: print("anaconda %s (pre-release) started." % verdesc) # we are past the --version and --help shortcut so we can import Blivet # now without slowing down anything critical # pylint: disable=import-error from blivet import arch if not opts.images and not opts.dirinstall: print(logs_note) # no fancy stuff like TTYs on a s390... if not arch.isS390(): if "TMUX" in os.environ and os.environ.get("TERM") == "screen": print(shell_and_tmux_note) else: print(shell_only_note) # TMUX is not running # ...but there is apparently TMUX during the manual installation on s390! elif not opts.ksfile: print(tmux_only_note) # but not during kickstart installation # no need to tell users how to switch to text mode # if already in text mode if opts.display_mode == 'g': print(text_mode_note) print(separate_attachements_note) from pyanaconda.anaconda import Anaconda anaconda = Anaconda() iutil.setup_translations(gettext) # reset python's default SIGINT handler signal.signal(signal.SIGINT, signal.SIG_IGN) signal.signal(signal.SIGSEGV, isys.handleSegv) signal.signal(signal.SIGTERM, lambda num, frame: sys.exit(1)) setupEnvironment() # make sure we have /var/log soon, some programs fail to start without it iutil.mkdirChain("/var/log") pidfile = open("/var/run/anaconda.pid", "w") pidfile.write("%s\n" % (os.getpid(),)) del pidfile anaconda.opts = opts # check memory, just the text mode for now: check_memory(anaconda, opts, 't') # Now that we've got arguments, do some extra processing. setupLoggingFromOpts(opts) # Default is to prompt to mount the installed system. anaconda.rescue_mount = not opts.rescue_nomount # assign the other anaconda variables from options anaconda.proxy = opts.proxy anaconda.updateSrc = opts.updateSrc anaconda.methodstr = opts.method anaconda.stage2 = opts.stage2 flags.rescue_mode = opts.rescue if opts.liveinst: from pyanaconda.screensaver import inhibit_screensaver from pyanaconda import safe_dbus flags.livecdInstall = True try: anaconda.dbus_session_connection = safe_dbus.get_new_session_connection() except safe_dbus.DBusCallError as e: log.info("Unable to connect to DBus session bus: %s", e) else: anaconda.dbus_inhibit_id = inhibit_screensaver(anaconda.dbus_session_connection) elif "LIVECMD" in os.environ: log.warning("Running via liveinst, but not setting flags.livecdInstall - this is for testing only") # set flags flags.noverifyssl = opts.noverifyssl flags.armPlatform = opts.armPlatform flags.extlinux = opts.extlinux flags.nombr = opts.nombr flags.mpathFriendlyNames = opts.mpathfriendlynames flags.debug = opts.debug flags.askmethod = opts.askmethod flags.dmraid = opts.dmraid flags.mpath = opts.mpath flags.ibft = opts.ibft flags.nonibftiscsiboot = opts.nonibftiscsiboot flags.selinux = opts.selinux flags.eject = opts.eject flags.kexec = opts.kexec flags.singlelang = opts.singlelang # Switch to tty1 on exception in case something goes wrong during X start. # This way if, for example, metacity doesn't start, we switch back to a # text console with a traceback instead of being left looking at a blank # screen. python-meh will replace this excepthook with its own handler # once it gets going. if can_touch_runtime_system("early exception handler"): def _earlyExceptionHandler(ty, value, traceback): iutil.ipmi_report(constants.IPMI_FAILED) iutil.vtActivate(1) return sys.__excepthook__(ty, value, traceback) sys.excepthook = _earlyExceptionHandler if can_touch_runtime_system("start audit daemon"): # auditd will turn into a daemon and exit. Ignore startup errors try: iutil.execWithRedirect("/sbin/auditd", []) except OSError: pass # setup links required for all install types for i in ("services", "protocols", "nsswitch.conf", "joe", "selinux", "mke2fs.conf"): try: if os.path.exists("/mnt/runtime/etc/" + i): os.symlink("../mnt/runtime/etc/" + i, "/etc/" + i) except OSError: pass log.info("anaconda called with cmdline = %s", sys.argv) log.info("Default encoding = %s ", sys.getdefaultencoding()) iutil.execWithRedirect("udevadm", ["control", "--env=ANACONDA=1"]) # Collect all addon paths addon_paths = collect_addon_paths(constants.ADDON_PATHS) # If we were given a kickstart file on the command line, parse (but do not # execute) that now. Otherwise, load in defaults from kickstart files # shipped with the installation media. ksdata = None if opts.ksfile and not opts.liveinst: if not os.path.exists(opts.ksfile): stdoutLog.error("Kickstart file %s is missing.", opts.ksfile) iutil.ipmi_report(constants.IPMI_ABORTED) sys.exit(1) flags.automatedInstall = True flags.eject = False ksFiles = [opts.ksfile] elif os.path.exists("/run/install/ks.cfg") and not opts.liveinst: # this is to handle such cases where a user has pre-loaded a # ks.cfg onto an OEMDRV labeled device flags.automatedInstall = True flags.eject = False ksFiles = ["/run/install/ks.cfg"] else: ksFiles = ["/tmp/updates/interactive-defaults.ks", "/usr/share/anaconda/interactive-defaults.ks"] for ks in ksFiles: if not os.path.exists(ks): continue kickstart.preScriptPass(ks) log.info("Parsing kickstart: " + ks) ksdata = kickstart.parseKickstart(ks) # Only load the first defaults file we find. break if not ksdata: ksdata = kickstart.AnacondaKSHandler(addon_paths["ks"]) # Pick up any changes from interactive-defaults.ks that would # otherwise be covered by the dracut KS parser. if ksdata.bootloader.extlinux: flags.extlinux = True if ksdata.rescue.rescue: flags.rescue_mode = True # reboot with kexec if ksdata.reboot.kexec: flags.kexec = True # Some kickstart commands must be executed immediately, as they affect # how anaconda operates. ksdata.logging.execute() anaconda.ksdata = ksdata # setup keyboard layout from the command line option and let # it override from kickstart if/when X is initialized if opts.keymap: if not ksdata.keyboard.keyboard: ksdata.keyboard.keyboard = opts.keymap if ksdata.keyboard.keyboard: if can_touch_runtime_system("activate keyboard"): keyboard.activate_keyboard(ksdata.keyboard) else: # at least make sure we have all the values keyboard.populate_missing_items(ksdata.keyboard) # Some post-install parts of anaconda are implemented as kickstart # scripts. Add those to the ksdata now. kickstart.appendPostScripts(ksdata) # cmdline flags override kickstart settings if anaconda.proxy: ksdata.method.proxy = anaconda.proxy # Setup proxy environmental variables so that pre/post scripts use it # as well as libreport try: proxy = ProxyString(anaconda.proxy) except ProxyStringError as e: log.info("Failed to parse proxy \"%s\": %s", anaconda.proxy, e) else: # Set environmental variables to be used by pre/post scripts iutil.setenv("PROXY", proxy.noauth_url) iutil.setenv("PROXY_USER", proxy.username or "") iutil.setenv("PROXY_PASSWORD", proxy.password or "") # Variables used by curl, libreport, etc. iutil.setenv("http_proxy", proxy.url) iutil.setenv("ftp_proxy", proxy.url) iutil.setenv("HTTPS_PROXY", proxy.url) # only some installations methods support --noverifyssl option if flags.noverifyssl and hasattr(ksdata.method, "noverifyssl"): ksdata.method.noverifyssl = flags.noverifyssl if opts.multiLib: # sets yum's multilib_policy to "all" (as opposed to "best") ksdata.packages.multiLib = opts.multiLib # set ksdata.method based on anaconda.method if it isn't already set if anaconda.methodstr and not ksdata.method.seen: if anaconda.methodstr.startswith("cdrom"): ksdata.method.method = "cdrom" elif anaconda.methodstr.startswith("nfs"): ksdata.method.method = "nfs" (nfsOptions, server, path) = iutil.parseNfsUrl(anaconda.methodstr) ksdata.method.server = server ksdata.method.dir = path ksdata.method.opts = nfsOptions elif anaconda.methodstr.startswith("hd:"): ksdata.method.method = "harddrive" url = anaconda.methodstr.split(":", 1)[1] url_parts = url.split(":") device = url_parts[0] path = "" if len(url_parts) == 2: path = url_parts[1] elif len(url_parts) == 3: fstype = url_parts[1] # XXX not used path = url_parts[2] ksdata.method.partition = device ksdata.method.dir = path elif anaconda.methodstr.startswith("http") or \ anaconda.methodstr.startswith("ftp") or \ anaconda.methodstr.startswith("file"): ksdata.method.method = "url" ksdata.method.url = anaconda.methodstr # installation source specified by bootoption # overrides source set from kickstart; # the kickstart might have specified a mirror list, # so we need to clear it here if plain url source is provided # by a bootoption, because having both url & mirror list # set at once is not supported and breaks Yum in # unpredictable ways ksdata.method.mirrorlist = None elif anaconda.methodstr.startswith("livecd"): ksdata.method.method = "harddrive" device = anaconda.methodstr.split(":", 1)[1] ksdata.method.partition = os.path.normpath(device) elif anaconda.methodstr.startswith("hmc"): ksdata.method.method = "hmc" else: log.error("Unknown method: %s", anaconda.methodstr) # Enable SE/HMC if it was selected as an installation source. if ksdata.method.method == "hmc": flags.hmc = True # Override the selinux state from kickstart if set on the command line if flags.selinux != constants.SELINUX_DEFAULT: ksdata.selinux.selinux = flags.selinux from pyanaconda import localization # Set the language before loading an interface, when it may be too late. # If the language was set on the command line, copy that to kickstart if opts.lang: ksdata.lang.lang = opts.lang ksdata.lang.seen = True # Setup the locale environment if ksdata.lang.seen: locale_option = ksdata.lang.lang else: locale_option = None localization.setup_locale_environment(locale_option, opts.display_mode != "g") # Now that LANG is set, do something with it localization.setup_locale(os.environ["LANG"], ksdata.lang, opts.display_mode != "g") import blivet blivet.enable_installer_mode() # Initialize the network now, in case the display needs it from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread, wait_for_connected_NM networkInitialize(ksdata) # If required by user, wait for connection before starting the installation. if opts.waitfornet: try: timeout = int(opts.waitfornet) except ValueError as e: log.warning("invalid inst.waitfornet option value: %s", opts.waitfornet) else: if timeout > 0: log.info("network: waiting for network connection (timeout=%d)", timeout) wait_for_connected_NM(timeout=timeout) else: log.warning("invalid inst.waitfornet option value: %s", opts.waitfornet) # In any case do some actions only after NM finishes its connecting. threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,))) # initialize the screen access manager before launching the UI from pyanaconda import screen_access screen_access.initSAM() # try to open any existing config file # (might be created by pre-anaconda helper tools, injected during image # generation, etc.) screen_access.sam.open_config_file() # now start the interface setupDisplay(anaconda, opts, addon_paths) if anaconda.gui_startup_failed: # we need to reinitialize the locale if GUI startup failed, # as we might now be in text mode, which might not be able to display # the characters from our current locale log.warning("reinitializing locale due to failed attempt to start the GUI") localization.setup_locale(os.environ["LANG"], ksdata.lang, anaconda.displayMode != "g") # we now know in which mode we are going to run so store the information from pykickstart.constants import DISPLAY_MODE_GRAPHICAL, DISPLAY_MODE_CMDLINE, DISPLAY_MODE_TEXT mode_char_to_const = {'g': DISPLAY_MODE_GRAPHICAL, 't': DISPLAY_MODE_TEXT, 'c': DISPLAY_MODE_CMDLINE} ksdata.displaymode.displayMode = mode_char_to_const[anaconda.displayMode] # if we're in text mode, the resulting system should be too # ...unless the kickstart specified otherwise if anaconda.displayMode != 'g' and not anaconda.ksdata.xconfig.startX: anaconda.ksdata.skipx.skipx = True # Set flag to prompt for missing ks data if anaconda.displayMode == 'c': flags.ksprompt = False # Set minimal ram size to the storage checker. from pyanaconda.storage_utils import storage_checker storage_checker.add_constraint("min_ram", isys.MIN_GUI_RAM if anaconda.displayMode == 'g' else isys.MIN_RAM) anaconda.instClass.setStorageChecker(storage_checker) from pyanaconda.anaconda_argparse import name_path_pairs image_count = 0 try: for (name, path) in name_path_pairs(opts.images): log.info("naming disk image '%s' '%s'", path, name) anaconda.storage.config.diskImages[name] = path image_count += 1 flags.imageInstall = True except ValueError as e: stdoutLog.error("error specifying image file: %s", e) iutil.ipmi_abort(scripts=ksdata.scripts) sys.exit(1) if image_count: anaconda.storage.setupDiskImages() # Ignore disks labeled OEMDRV from pyanaconda.storage_utils import device_matches matched = device_matches("LABEL=OEMDRV", disks_only=True) for oemdrv_disk in matched: if oemdrv_disk not in ksdata.ignoredisk.ignoredisk: ksdata.ignoredisk.ignoredisk.append(oemdrv_disk) log.info("Adding disk %s labeled OEMDRV to ignored disks", oemdrv_disk) from blivet import storageInitialize from pyanaconda.packaging import payloadMgr from pyanaconda.timezone import time_initialize if not flags.dirInstall: threadMgr.add(AnacondaThread(name=constants.THREAD_STORAGE, target=storageInitialize, args=(anaconda.storage, ksdata, anaconda.protected))) if not flags.dirInstall and not flags.imageInstall: threadMgr.add(AnacondaThread(name=constants.THREAD_TIME_INIT, target=time_initialize, args=(ksdata.timezone, anaconda.storage, anaconda.bootloader))) if flags.rescue_mode: from pyanaconda.ui.tui.simpleline import App from pyanaconda.rescue import RescueMode app = App("Rescue Mode") spoke = RescueMode(app, anaconda.ksdata, anaconda.storage) app.schedule_screen(spoke) app.run() else: cleanPStore() from pyanaconda import exception anaconda.mehConfig = exception.initExceptionHandling(anaconda) # add our own additional signal handlers signal.signal(signal.SIGUSR1, lambda signum, frame: exception.test_exception_handling()) signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState()) atexit.register(exitHandler, ksdata.reboot, anaconda.storage, anaconda.payload) # Fallback to default for interactive or for a kickstart with no installation method. fallback = not (flags.automatedInstall and ksdata.method.method) payloadMgr.restartThread(anaconda.storage, ksdata, anaconda.payload, anaconda.instClass, fallback=fallback) # check if geolocation should be enabled for this installation run geoloc.set_geolocation_enabled(options_override=opts.geoloc_use_with_ks, install_class_override=anaconda.instClass.use_geolocation_with_kickstart) # start geolocation if enabled if geoloc.geolocation_enabled: geoloc.init_geolocation(geoloc_option_value=opts.geoloc) geoloc.refresh() # setup ntp servers and start NTP daemon if not requested otherwise if can_touch_runtime_system("start chronyd"): if anaconda.ksdata.timezone.ntpservers: ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers) if not anaconda.ksdata.timezone.nontp: iutil.start_service("chronyd") # Create pre-install snapshots from pykickstart.constants import SNAPSHOT_WHEN_PRE_INSTALL from pyanaconda.kickstart import check_kickstart_error if ksdata.snapshot.has_snapshot(SNAPSHOT_WHEN_PRE_INSTALL): with check_kickstart_error(): ksdata.snapshot.pre_setup(anaconda.storage, ksdata, anaconda.instClass) ksdata.snapshot.pre_execute(anaconda.storage, ksdata, anaconda.instClass) # FIXME: This will need to be made cleaner once this file starts to take # shape with the new UI code. anaconda._intf.setup(ksdata) anaconda._intf.run() # vim:tw=78:ts=4:et:sw=4
Upload File
Create Folder