Skip to content

Latest commit

 

History

History

pkgbuild

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
_nm() {
  echo "" > /etc/NetworkManager/NetworkManager.conf
  echo "[device]" >> /etc/NetworkManager/NetworkManager.conf
  echo "wifi.scan-rand-mac-address=no" >> /etc/NetworkManager/NetworkManager.conf
  echo "" >> /etc/NetworkManager/NetworkManager.conf
  echo "[main]" >> /etc/NetworkManager/NetworkManager.conf
  echo "dhcp=dhclient" >> /etc/NetworkManager/NetworkManager.conf
  # echo "dns=systemd-resolved" >> /etc/NetworkManager/NetworkManager.conf
}

post_install() {
  # cp -rf /etc/ctlos-system/bin/. /usr/local/bin
  # cp -rf /etc/ctlos-system/etc/. /etc
  # cp -rf /etc/ctlos-system/root/. /root
  # rm -rf /etc/ctlos-system

  # _nm

  echo "Enable services ctlos-system..."
  systemctl mask [email protected]
  systemctl mask systemd-rfkill.socket
  systemctl list-unit-files | grep haveged >/dev/null && systemctl enable haveged
  systemctl list-unit-files | grep pacman-init >/dev/null && systemctl enable pacman-init
  systemctl list-unit-files | grep choose-mirror >/dev/null && systemctl enable choose-mirror
  systemctl list-unit-files | grep ctlos-system >/dev/null && systemctl enable ctlos-system
  # systemctl enable systemd-networkd
  # systemctl enable systemd-resolved
  systemctl list-unit-files | grep cups >/dev/null && systemctl enable cups
  systemctl list-unit-files | grep avahi-daemon >/dev/null && systemctl enable avahi-daemon
  systemctl list-unit-files | grep systemd-timesyncd >/dev/null && systemctl enable systemd-timesyncd
  systemctl list-unit-files | grep ModemManager >/dev/null && systemctl enable ModemManager
  systemctl list-unit-files | grep NetworkManager >/dev/null && systemctl -f enable NetworkManager
  systemctl list-unit-files | grep iwd >/dev/null && systemctl enable iwd
  systemctl list-unit-files | grep reflector >/dev/null && systemctl enable reflector
  systemctl list-unit-files | grep sshd >/dev/null && systemctl enable sshd
  systemctl list-unit-files | grep sddm >/dev/null && systemctl enable sddm
  systemctl list-unit-files | grep lightdm >/dev/null && systemctl enable lightdm
  systemctl list-unit-files | grep lxdm >/dev/null && systemctl enable lxdm
  systemctl list-unit-files | grep gdm >/dev/null && systemctl enable gdm
  systemctl list-unit-files | grep graphical.target >/dev/null && systemctl set-default graphical.target
}

post_upgrade() {
  # echo "Enable services..."
  # systemctl -q is-active haveged || systemctl enable haveged
  # systemctl -q is-active pacman-init || systemctl enable pacman-init
  # systemctl -q is-active choose-mirror || systemctl enable choose-mirror
  # systemctl -q is-active ctlos-system || systemctl enable ctlos-system
  # systemctl -q is-active ModemManager || systemctl enable ModemManager
  # systemctl -q is-active NetworkManager || systemctl -f enable NetworkManager
  # systemctl -q is-active reflector || systemctl enable reflector
  # systemctl -q is-active sddm || systemctl enable sddm
  # systemctl -q is-active graphical.target || systemctl set-default graphical.target

  # echo "Updating font cache..."
  # mkfontscale /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
  # mkfontdir /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
  # fc-cache -s >/dev/null

  # echo "postinstall operations..."
  # glib-compile-schemas usr/share/glib-2.0/schemas
  # gtk-update-icon-cache -ftq usr/share/icons/hicolor
  # /bin/sh -c 'dconf update'

  echo "Done!"
}