second_stage_install.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. # Copyright (C) 2017-2018 Daniel Tartavel-jeannot <contact@librepc.com>
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. /usr/bin/chown :shadow /etc/shadow /etc/gshadow /etc/login.defs /etc/pam.d/chage-chfn-chsh /etc/pam.d/chpasswd-newusers /etc/pam.d/system-auth /etc/pam.d/user-group-mod /bin/passwd /bin/chage
  17. /usr/bin/chown :systemd-journal -R /var/log/journal
  18. #Install all packages you need
  19. # No verifying rpm due to a bug in packages, some are not signed
  20. /usr/bin/dnf --nogpgcheck --assumeyes install basesystem chrony rng-tools man openssh-server rfkill wireless-tools bluez wpa_supplicant make binutils dracut u-boot rsync kernel-desktop-latest mlocate drakx-kbd-mouse-x11 glibc-i18ndata
  21. /usr/bin/chown :chrony -R /etc/chrony.keys /var/log/chrony
  22. /usr/bin/chown :daemon /etc/wpa_supplicant.conf
  23. /usr/bin/chown :tty /bin/write /bin/wall
  24. /usr/bin/chown :lock /sbin/lockdev
  25. /usr/bin/chown :bin /sbin/traceroute
  26. /usr/bin/chown polkitd /etc/polkit-1/rules.d
  27. KV=`basename /boot/vmlinuz-*`
  28. KV=${KV#vmlinuz-}
  29. dracut --kver $KV
  30. rm -f $0
  31. cp /boot/vmlinuz-* /boot/vmlinuz
  32. cp /boot/initrd-* /boot/initrd
  33. alternatives --set soundprofile /etc/sound/profiles/alsa