Guest User

NCentral Passwords Hashes

a guest
Feb 14th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.66 KB | None | 0 0
  1. install
  2. lang en_US
  3. keyboard --vckeymap=us
  4. rootpw --iscrypted $6$YRAXZQzRZiNOAKTA$QR5GS7fZtCSu12tm4INLfZMGzUDCE90..P3MNiQgi7SU4cmamjh3f7qJY7WFYLfBWJ9BK5m4gtntZWSWsE0h31
  5. sshpw --username=root --iscrypted $6$YRAXZQzRZiNOAKTA$QR5GS7fZtCSu12tm4INLfZMGzUDCE90..P3MNiQgi7SU4cmamjh3f7qJY7WFYLfBWJ9BK5m4gtntZWSWsE0h31
  6. sshpw --username=admin --iscrypted $6$485Sl9PbOA0A0mdc$spYYSMQlkSH93gtbtjWmePYKAtMQ0dmvl4fIZywDNtkGfkPyJucwIEH7JrFStVkl/GBS5sPC/J.1TEFd45Msz.
  7. sshpw --username=install --iscrypted $6$485Sl9PbOA0A0mdc$spYYSMQlkSH93gtbtjWmePYKAtMQ0dmvl4fIZywDNtkGfkPyJucwIEH7JrFStVkl/GBS5sPC/J.1TEFd45Msz.
  8. firewall --disabled
  9. auth --useshadow --passalgo=sha512
  10. skipx
  11. selinux --disabled
  12. user --name=admin --password=$6$485Sl9PbOA0A0mdc$spYYSMQlkSH93gtbtjWmePYKAtMQ0dmvl4fIZywDNtkGfkPyJucwIEH7JrFStVkl/GBS5sPC/J.1TEFd45Msz. --iscrypted --uid=500 --gid=500
  13. user --name=config --password=$6$FYIe22HWzKaqeMMk$UA/A7uSPbu6m9py6..zvLjxqJ1/fMxLAOMKLmJfifvi7UdGd9USKddIb3sqrUhVjYnbMeTqntOm6oajIjOmGt1 --iscrypted --uid=501 --gid=501
  14. user --name=saveme --password=$6$ob7aul1FbRkm59MO$jent.miffmXL/hQPCiQMrZ/Pxn5ffJuTXfKbajj8wLKGT1bFaTkU3eMIBXoDcaEWxQueQPaS2AIVfBNg0UiTo1 --iscrypted --uid=502 --gid=502
  15. user --name=nable --shell=/sbin/nologin --uid=503 --gid=503 --lock
  16. reboot --eject
  17.  
  18. bootloader --location=mbr --append="modprobe.blacklist=floppy consoleblank=0" --iscrypted --password=grub.pbkdf2.sha512.10000.90A45AF1862AD593958F332D0883997726D8C63B379954F8B41E953FFE2E17D120E8F83577AA9477554F9DDF8D4F2D6D2F45AABC15F77282B80E625C6FD25382.CCD29256C7E19CDB60FF052107643EB7DC93E447F16F7EE5E7EF6FA426F3A3211F14356497399F28E2313F13182D3232C8A95D78FA7E5432136ED8A3AFFB6BA0
  19. %include /tmp/timezone
  20. %include /tmp/network
  21. %include /tmp/partinfo
  22.  
  23. %pre --interpreter=/usr/bin/python --erroronfail --log=/tmp/kspre.log
  24. """Configure Kickstart parameters that vary on disk size and devmode install."""
  25. import math
  26. import os
  27. import stat
  28. import subprocess
  29. import sys
  30. import parted
  31. import multiprocessing
  32.  
  33. def check_device(device):
  34. """Check for valid Device types for disk storage."""
  35. if stat.S_ISBLK(os.stat(device.path).st_mode):
  36. # exclude device mapper devices
  37. if device.type == parted.DEVICE_DM:
  38. return False
  39. # Include common and AWS disks.
  40. elif device.path in ('/dev/hda', '/dev/sda', '/dev/xvda', '/dev/nvme0n1', '/dev/vda'):
  41. return True
  42. # the remaining block devices should be fine
  43. return False
  44. # ignore everything that is not a block device
  45. return False
  46.  
  47. CPU_COUNT = multiprocessing.cpu_count()
  48. TOT_MEM = (os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')/(1024.**3))
  49. DEVICES = filter(check_device, parted.getAllDevices())
  50. DEV_LEN = len(DEVICES)
  51.  
  52. if DEV_LEN == 0:
  53. ## Hyper-V may have hidden itself as a USB drive
  54. DEVICES = [DEV for DEV in parted.getAllDevices() if DEV.readOnly is False and DEV.model == "Msft Virtual Disk"] # pylint: disable=line-too-long
  55.  
  56. if DEV_LEN != 1:
  57. print("Detected %i hard drive types, SolarWinds N-central can only be installed on systems with one hard drive type (SAS/SATA/SCSI, NVMe, IDE, Virtual Disk, etc.)." % DEV_LEN) # pylint: disable=line-too-long
  58. ERR_CMD = "/usr/bin/openvt -f -c 7 -w -s -- " \
  59. + "/bin/bash -c \"/usr/bin/dialog --create-rc $HOME/.dialogrc && " \
  60. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,RED,ON)/g\' $HOME/.dialogrc && " \
  61. + "chvt 7 && " \
  62. + "/usr/bin/dialog --msgbox \'Detected " \
  63. + str(DEV_LEN) \
  64. + " hard drives,\\n\\nN-central can only be installed on systems with one hard drive.\' 10 50 >/dev/tty7 && " \
  65. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,YELLOW,ON)/g\' $HOME/.dialogrc && " \
  66. + "/usr/bin/dialog --pause \'Rebooting in 60 seconds.\' 10 50 60 >/dev/tty7 && " \
  67. + "chvt 1\""
  68. subprocess.call(str(ERR_CMD), shell=True)
  69. print("Rebooting")
  70. os.system('reboot')
  71. sys.exit(1)
  72. else:
  73. DEV = DEVICES[0]
  74.  
  75. DEV_NAME = DEVICES[0].path.split("/", 2)[-1]
  76. DISK_GB = (DEV.getSize()/(1024))
  77. SIZE_MB = DEV.getSize() - 10
  78. SIZE_MB_I = int(math.floor(SIZE_MB))
  79. BACKUP_SIZE = int(math.floor(float(SIZE_MB * .15)))
  80.  
  81. if int(math.floor(float(SIZE_MB * .05))) < 1024:
  82. LOG_SIZE = 1024
  83. elif int(math.floor(float(SIZE_MB * .05))) > 5192:
  84. LOG_SIZE = 5192
  85. else:
  86. LOG_SIZE = int(math.floor(float(SIZE_MB * .05)))
  87.  
  88. print("/var/log size is %i " % LOG_SIZE)
  89. print("/backup size is %i " % BACKUP_SIZE)
  90. ROOT_SIZE = (SIZE_MB_I - BACKUP_SIZE - LOG_SIZE - 1034 - 2048 - 200) # Extra 200MB is for the EFI partition.
  91. print("/ size is %i " % ROOT_SIZE)
  92. PTEXT = """zerombr
  93. clearpart --all --initlabel
  94. part /boot/efi --fstype=efi --size=200 --ondisk=%s --fsoptions=umask=0077,shortname=winnt
  95. part /boot --fstype=xfs --size=1034 --ondisk=%s
  96. part pv.01 --size=1 --grow --ondisk=%s
  97. volgroup VolGroup pv.01
  98. logvol /backup --vgname=VolGroup --fstype=xfs --size=%i --name=lv_backup
  99. logvol /var/log --vgname=VolGroup --fstype=xfs --size=%i --name=lv_log
  100. logvol swap --vgname=VolGroup --fstype=swap --size=2048 --name=lv_swap
  101. logvol / --vgname=VolGroup --fstype=xfs --size=%i --name=lv_root --grow
  102. """ % (DEV_NAME, DEV_NAME, DEV_NAME, BACKUP_SIZE, LOG_SIZE, ROOT_SIZE)
  103. print(PTEXT)
  104. PART_INFO = open("/tmp/partinfo", 'w')
  105. PART_INFO.write(PTEXT)
  106. PART_INFO.close()
  107.  
  108. CMDLINE = open("/proc/cmdline").read().split()
  109. if 'devmode' in CMDLINE:
  110. F = open("/tmp/network", 'w')
  111. F.write("network --device=eth0 --bootproto=dhcp --ipv6=auto\n")
  112. F.close()
  113. F = open("/tmp/timezone", 'w')
  114. F.write("timezone America/New_York --isUtc\n")
  115. F.close()
  116. else:
  117. if DISK_GB < 75:
  118. print("Detected %i GB hard drive, N-central can only be installed on systems with at least a 75 GB hard drive." % DISK_GB) # pylint: disable=line-too-long
  119. ERR_CMD = "/usr/bin/openvt -f -c 7 -w -s -- " \
  120. + "/bin/bash -c \"/usr/bin/dialog --create-rc $HOME/.dialogrc && " \
  121. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,RED,ON)/g\' $HOME/.dialogrc && " \
  122. + "chvt 7 && " \
  123. + "/usr/bin/dialog --msgbox \'Detected " \
  124. + str(DISK_GB) \
  125. + " GB hard drive,\\n\\nN-central can only be installed on systems with at least a 75 GB hard drive.\' 10 50 >/dev/tty7 && " \
  126. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,YELLOW,ON)/g\' $HOME/.dialogrc && " \
  127. + "/usr/bin/dialog --pause \'Rebooting in 60 seconds.\' 10 50 60 >/dev/tty7 && " \
  128. + "chvt 1\""
  129. subprocess.call(str(ERR_CMD), shell=True)
  130. print("Rebooting")
  131. os.system('reboot')
  132. sys.exit(1)
  133. else:
  134. print("Minimum Disk space requirements met.")
  135.  
  136. if CPU_COUNT < 2:
  137. print("Detected %i CPU cores, N-central can only be installed on systems with at least 2 CPU cores." % CPU_COUNT)
  138. ERR_CMD = "/usr/bin/openvt -f -c 7 -w -s -- " \
  139. + "/bin/bash -c \"/usr/bin/dialog --create-rc $HOME/.dialogrc && " \
  140. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,RED,ON)/g\' $HOME/.dialogrc && " \
  141. + "chvt 7 && " \
  142. + "/usr/bin/dialog --msgbox \'Detected " \
  143. + str(CPU_COUNT) \
  144. + " CPU cores,\\n\\nN-central can only be installed on systems with at least 2 CPU cores.\' 10 50 >/dev/tty7 && " \
  145. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,YELLOW,ON)/g\' $HOME/.dialogrc && " \
  146. + "/usr/bin/dialog --pause \'Rebooting in 60 seconds.\' 10 50 60 >/dev/tty7 && " \
  147. + "chvt 1\""
  148. subprocess.call(str(ERR_CMD), shell=True)
  149. print("Rebooting")
  150. os.system('reboot')
  151. sys.exit(1)
  152. else:
  153. print("Minimum CPU requirements met.")
  154.  
  155. if TOT_MEM < 3.6:
  156. print("Detected %.2f GB Total RAM, N-central can only be installed on systems with at least 4 GB total RAM." % TOT_MEM)
  157. ERR_CMD = "/usr/bin/openvt -f -c 7 -w -s -- " \
  158. + "/bin/bash -c \"/usr/bin/dialog --create-rc $HOME/.dialogrc && " \
  159. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,RED,ON)/g\' $HOME/.dialogrc && " \
  160. + "chvt 7 && " \
  161. + "/usr/bin/dialog --msgbox \'Detected " \
  162. + "{:.2f}".format(TOT_MEM) \
  163. + " GB Total RAM,\\n\\nN-central can only be installed on systems with at least 4 GB total RAM.\' 10 50 >/dev/tty7 && " \
  164. + "sed -i \'s/^screen_color.*$/screen_color = (WHITE,YELLOW,ON)/g\' $HOME/.dialogrc && " \
  165. + "/usr/bin/dialog --pause \'Rebooting in 60 seconds.\' 10 50 60 >/dev/tty7 && " \
  166. + "chvt 1\""
  167. subprocess.call(str(ERR_CMD), shell=True)
  168. print("Rebooting")
  169. os.system('reboot')
  170. sys.exit(1)
  171. else:
  172. print("Minimum RAM requirements met.")
  173.  
  174. subprocess.check_output("/usr/bin/openvt -f -c 7 -w -s -- bash /run/install/repo/configure.sh", shell=True) # pylint: disable=line-too-long
  175.  
  176. %end
  177.  
  178. %packages --ignoremissing
  179. @Core
  180. %end
  181.  
  182. %post --interpreter=/usr/bin/bash --log=/tmp/kspost.log
  183. set -x
  184.  
  185. touch /tmp/initial_install
  186.  
  187. # For QA Installs from .iso
  188. if grep -q devmode /proc/cmdline; then
  189. mkdir /home/admin/.ssh
  190. cat <<EODM >>/home/admin/.ssh/authorized_keys
  191. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2fXUvNunHyGbs1R1oGGuWEWsT3mCocraoDc2jp2dn8+AAz+LNyN5sjo2bdTzQS5tJMbvScCWV+AcFxa7TX+T8Mn6H31nHhfMHQPR87yuX60H3F1Bqd4dDDkYXlPwfP1gWX+CMLHlKf6EiaNcp5DkUngupamUX8Docj3IFFGCy9U/sfYL75vH1hw2FapO1/9nJvUhON/vxPBwTNQIzLmPccfe9YoiSUKTwjEi1nTGwzYNfoWilXw66sAqQ5TbtbzheoMRd4bzAaZSS/xSV7rF+ZLZ3K4RjcNxcVSljn0sq+Y3TM+4pss7WATWPcU+VSWHLP/n/gJEdcsI0yyLkPRPt MSPEngTeam@solarwinds.com
  192. EODM
  193. chown -R admin:admin /home/admin/.ssh
  194. chmod 600 /home/admin/.ssh/authorized_keys
  195. chmod 700 /home/admin/.ssh
  196. echo "admin ALL = (ALL) NOPASSWD: ALL" >/etc/sudoers.d/QA-Internal
  197. chown root:root /etc/sudoers.d/QA-Internal
  198. chmod 0644 /etc/sudoers.d/QA-Internal
  199. while IFS= read -r line; do
  200. for param in $line; do
  201. if [[ "$param" =~ ^email=.* ]]; then
  202. echo "${param//email=/}" >/var/tmp/email_internal
  203. fi
  204. done
  205. done < <(cat /proc/cmdline)
  206. touch /var/tmp/internal
  207. sed -i s/^DS$/DSsmtp.swdev.local/ /etc/mail/sendmail.cf
  208. touch /tmp/jetty_debug
  209. HP_TOTAL=0
  210. fi
  211.  
  212. # Add config to load the connection tracking module.
  213. echo "ip_conntrack" >/etc/modules-load.d/n-central.conf
  214.  
  215. # Link OpenJDK to expected location for Oracle Java.
  216. if [[ ! -d /usr/java ]]; then
  217. mkdir /usr/java
  218. fi
  219. ln -s /etc/alternatives/java_sdk /usr/java/current
  220.  
  221. ### Initialize the postgresql database and log to /var/log/postgres.log
  222. ln -sf /usr/lib/systemd/system/postgresql-10.service /usr/lib/systemd/system/postgresql.service
  223. ln -sf /usr/lib/systemd/system/postgresql-10.service /usr/lib/systemd/system/postgresql-current.service
  224. ln -sf /usr/pgsql-10 /usr/pgsql-current
  225. ln -sf /var/lib/pgsql/10 /var/lib/pgsql/current
  226.  
  227. cat <<EOSyslog >/etc/rsyslog.d/postgresql.conf
  228. local2.* -/var/log/postgres.log
  229. EOSyslog
  230.  
  231. # Add pg logging to logrotate
  232. if ! grep -q postgres.log /etc/logrotate.d/syslog; then
  233. sed -i -e '1s!^!/var/log/postgres.log\n!' /etc/logrotate.d/syslog
  234. fi
  235. sed -i -e 's/\(*.info;mail.none;authpriv.none;cron.none\)/\1;local2.none/' /etc/rsyslog.conf
  236.  
  237. # Configure NTP
  238. {
  239. echo "0.pool.ntp.org"
  240. echo "1.pool.ntp.org"
  241. echo "2.pool.ntp.org"
  242. } >>/etc/ntp/step-tickers
  243.  
  244. cat >>/etc/N-OS-version <<ENDOFPART
  245. SVNREV
  246. ENDOFPART
  247.  
  248. printf "N-centralOS Linux 7 (Core)\\nPlease go to:\\nhttps://%s/ to configure N-central\\n" "$(ip addr show eth0 | grep "inet " | awk '{print $2}' | sed -e 's/\/.*$//g')" >/etc/issue
  249.  
  250. cat >/etc/dhcp/dhclient-exit-hooks.d/N-central.sh <<'EODHC'
  251. #!/usr/bin/env bash
  252.  
  253. printf "N-centralOS Linux 7 (Core)\\nPlease go to:\\nhttps://%s/ to configure N-central\\n" "$(ip addr show eth0 | grep "inet " | awk '{print $2}' | sed -e 's/\/.*$//g')" >/etc/issue
  254.  
  255. EODHC
  256.  
  257. chmod 755 /etc/dhcp/dhclient-exit-hooks.d/N-central.sh
  258.  
  259. # Network Manager doesn't play nice with DHCP exit hooks.
  260. cat >>/etc/NetworkManager/dispatcher.d/11-dhclient <<'EONM'
  261. #!/usr/bin/env bash
  262.  
  263. if [ "$2" = "up" ]; then
  264. /bin/bash /etc/dhcp/dhclient-exit-hooks.d/N-central.sh
  265. elif [ "$2" = "dhcp4-change" ]; then
  266. /bin/bash /etc/dhcp/dhclient-exit-hooks.d/N-central.sh
  267. fi
  268.  
  269. EONM
  270.  
  271. touch /tmp/started
  272.  
  273. mkdir -p /opt/nable/etc/logrotate.d/
  274. mkdir -p /opt/nable/etc/rc.d/init.d/
  275.  
  276. cat >>/etc/sysconfig/init <<'EOIN'
  277. JAVA_HOME=/usr/java/current
  278. PATH="$PATH":"$JAVA_HOME"bin:"$JAVA_HOME"lib:/opt/nable/sbin:/opt/nable/usr/sbin
  279. EOIN
  280.  
  281. rm -rf /var/log/btmp
  282.  
  283. cat >/etc/profile.d/nable.sh <<'EONS'
  284. #!/usr/bin/env bash
  285.  
  286. JAVA_HOME=/usr/java/current/
  287. export JAVA_HOME
  288. PATH="$PATH":"$JAVA_HOME"bin:"$JAVA_HOME"lib:/opt/nable/sbin:/opt/nable/usr/sbin:/usr/pgsql-current/bin
  289. export PATH
  290. JAVA_OPTS="-Xmx512m -Xms512m -Djava.awt.headless=true"
  291. export JAVA_OPTS
  292. if [ -e /opt/nable/etc/n-central-release ]; then
  293. PS1="[\\u@\\h $(cut -d"-" -f1 </opt/nable/etc/n-central-release) \\W]\\$ "
  294. export PS1
  295. fi
  296. if [ -e /opt/nable/etc/last-upgrade-failed ]; then
  297. echo '*** ERROR: The last N-central Install or Upgrade FAILED. ***'
  298. fi
  299. export HISTTIMEFORMAT="%y/%m/%d %T "
  300. shopt -s histappend
  301.  
  302. EONS
  303.  
  304. sed -rie 's/com2sec\s+notConfigUser\s+default\s+public/com2sec notConfigUser default N-central_SNMP/g' /etc/snmp/snmpd.conf
  305.  
  306. mkdir -p /var/log/n-central/install/
  307.  
  308. # Bug in CentOS 7 where base install tries to install kernel-firmware before coreutils is installed. Simply reinstall it here.
  309. ## Not as easy as just pulling the file, we are in a chroot. We need to mount the cd first.
  310. mount /dev/cdrom /mnt
  311. rpm -ivh --force /mnt/Packages/linux-firmware-*.rpm 2>/dev/null
  312. umount /mnt
  313.  
  314. # Disable the "piix4_smbus 0000:00:07.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr" error on VMs.
  315. if [[ $(virt-what | wc -l) -gt 0 ]]; then
  316. echo "blacklist i2c_piix4" >/etc/modprobe.d/blacklist-smbus.conf
  317. fi
  318.  
  319. # Fix an issue with Dracut on Hyper-V Gen2 UEFI VMs. CentOS bug 0014409.
  320. cat <<EODRACUT >>/lib/dracut/dracut.conf.d/55-n-central-uefi.conf
  321. # Missing dracut module needed for Hyper-V Gen2 devices.
  322.  
  323. add_dracutmodules+=" uefi-lib "
  324. EODRACUT
  325.  
  326. kVer="$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}\\n" kernel)"
  327. for kv in $kVer; do
  328. depmod "$kv" &>/dev/null || :
  329. dracut --force --kver "$kv" &>/dev/null || :
  330. done
  331.  
  332. # Bootloder installs after grub2 theme and packages. Rebuild the custom config here.
  333. if [ -e /etc/default/grub ]; then
  334. sed -i 's/GRUB_TERMINAL_OUTPUT="console"/GRUB_TERMINAL_OUTPUT="gfxterm"/g' /etc/default/grub
  335. if [ "$(grep -c -e 'GRUB_THEME=' /etc/default/grub)" -ne 0 ]; then
  336. sed -i 's/^GRUB_THEME=.*/GRUB_THEME="\/boot\/efi\/EFI\/centos\/themes\/ncentral\/theme.txt"/g' /etc/default/grub
  337. else
  338. echo "GRUB_THEME=\"/boot/efi/EFI/centos/themes/ncentral/theme.txt\"" >>/etc/default/grub
  339. fi
  340. else
  341. echo "GRUB_TERMINAL_OUTPUT=\"gfxterm\"" >/etc/default/grub
  342. echo "GRUB_THEME=\"/boot/efi/EFI/centos/themes/ncentral/theme.txt\"" >>/etc/default/grub
  343. fi
  344. grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
  345. set +x
  346.  
  347. %end
  348.  
  349. %post --nochroot --interpreter=/usr/bin/bash --log=/mnt/sysimage/tmp/kspost-nochroot.log
  350. set -x
  351.  
  352. # Move the platform specific packages to the backup partition.
  353. mkdir $ANA_INSTALL_PATH/root/Platform
  354. cp -f /run/install/repo/Platform/*.rpm $ANA_INSTALL_PATH/root/Platform/
  355.  
  356. # Move the CentOS 7 Signing keys over.
  357. cp -f /run/install/repo/RPM-GPG-KEY-* $ANA_INSTALL_PATH/root/Platform/
  358. cp -f /run/install/repo/Platform/RPM-GPG-KEY-* $ANA_INSTALL_PATH/root/Platform/
  359.  
  360. # Move the platform specific repo configs over.
  361. cp -f /run/install/repo/Platform/*.repo $ANA_INSTALL_PATH/root/Platform/
  362.  
  363. # Move our custom dialogrc to the new system.
  364. cp /etc/dialogrc $ANA_INSTALL_PATH/etc/dialogrc
  365.  
  366. # From anaconda 99-copy-logs.ks
  367. NOSAVE_INPUT_KS_FILE=/tmp/NOSAVE_INPUT_KS
  368. NOSAVE_LOGS_FILE=/tmp/NOSAVE_LOGS
  369. PRE_ANA_LOGS=/tmp/pre-anaconda-logs
  370.  
  371. if [ -e ${NOSAVE_LOGS_FILE} ]; then
  372. rm -f ${NOSAVE_LOGS_FILE}
  373. else
  374. mkdir -p $ANA_INSTALL_PATH/var/log/anaconda
  375. for log in anaconda.log kspre.log kspost.log network syslog X.log partinfo program.log packaging.log storage.log timezone ifcfg.log lvm.log yum.log; do
  376. [ -e /tmp/$log ] && cp /tmp/$log $ANA_INSTALL_PATH/var/log/anaconda/
  377. done
  378. for log in anaconda.log kspre.log kspost.log network syslog X.log partinfo program.log packaging.log storage.log timezone ifcfg.log lvm.log yum.log; do
  379. [ -e $ANA_INSTALL_PATH/tmp/$log ] && mv $ANA_INSTALL_PATH/tmp/$log $ANA_INSTALL_PATH/var/log/anaconda/
  380. done
  381. [ -e /tmp/pre-anaconda-logs ] && mkdir -p $ANA_INSTALL_PATH/var/log/anaconda/pre && mv $PRE_ANA_LOGS/* $ANA_INSTALL_PATH/var/log/anaconda/pre
  382. cp /tmp/ks-script* $ANA_INSTALL_PATH/var/log/anaconda/
  383. mv $ANA_INSTALL_PATH/tmp/ks-script* $ANA_INSTALL_PATH/var/log/anaconda/
  384. journalctl -b >$ANA_INSTALL_PATH/var/log/anaconda/journal.log
  385. chmod -R 0600 $ANA_INSTALL_PATH/var/log/anaconda/*
  386.  
  387. # Copy over any rhsm logs
  388. if [ -d /var/log/rhsm ] && [ "$(find /var/log/anaconda/rhsm/ -type f 2>/dev/null | wc -l)" -gt 0 ]; then
  389. mkdir -p $ANA_INSTALL_PATH/var/log/anaconda/rhsm
  390. cp /var/log/rhsm/* $ANA_INSTALL_PATH/var/log/anaconda/rhsm/ &>/dev/null || :
  391. fi
  392. fi
  393.  
  394. if [ -e ${NOSAVE_INPUT_KS_FILE} ]; then
  395. rm -f ${NOSAVE_INPUT_KS_FILE}
  396. else
  397. [ -e /run/install/ks.cfg ] && cp /run/install/ks.cfg $ANA_INSTALL_PATH/var/log/anaconda/original-ks.cfg
  398. fi
  399.  
  400. "${ANA_INSTALL_PATH}"/bin/eject --force &>/dev/null || :
  401. set +x
  402.  
  403. %end
  404.  
  405. %addon com_redhat_kdump --disable --reserve-mb='auto'
  406.  
  407. %end
Add Comment
Please, Sign In to add comment