Sha256: 45d74a9dd11aaef99aa057d6610cbf80dddac9880ba5a7fd4313d4c82cb383de
Contents?: true
Size: 977 Bytes
Versions: 2
Compression:
Stored size: 977 Bytes
Contents
module Specinfra module Command class Arch < Linux def check_access_by_user(file, user, access) "runuser -s /bin/sh -c \"test -#{access} #{file}\" #{user}" end def check_enabled(service, level) level = "multi-user.target" if level == 3 "systemctl --plain list-dependencies #{level} | grep '^#{escape(service)}.service$'" end def check_running(service) "systemctl is-active #{escape(service)}.service" end def check_installed(package,version=nil) if version "pacman -Q | grep #{escape(package)} #{escape(version)}" else "pacman -Q | grep #{escape(package)}" end end def sync_repos "pacman -Syy" end def install(package) "pacman -S --noconfirm #{package}" end def get_package_version(package, opts=nil) "pacman -Qi #{package} | grep Version | awk '{print $3}'" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
specinfra-2.0.0.beta6 | lib/specinfra/command/arch.rb |
specinfra-2.0.0.beta5 | lib/specinfra/command/arch.rb |