diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:14:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:14:45 +0000 |
commit | 43e8530e93493bb978c446a2023134bdd4277e50 (patch) | |
tree | e8c0d3c0c394b17381f48fb2d288f166b4f22440 /os_darwin/pkg | |
parent | Initial commit. (diff) | |
download | smartmontools-43e8530e93493bb978c446a2023134bdd4277e50.tar.xz smartmontools-43e8530e93493bb978c446a2023134bdd4277e50.zip |
Adding upstream version 7.4.upstream/7.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | os_darwin/pkg/Distribution.in | 21 | ||||
-rw-r--r-- | os_darwin/pkg/PackageInfo.in | 6 | ||||
-rw-r--r-- | os_darwin/pkg/installer/README.html | 26 | ||||
-rwxr-xr-x | os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall | 40 |
4 files changed, 93 insertions, 0 deletions
diff --git a/os_darwin/pkg/Distribution.in b/os_darwin/pkg/Distribution.in new file mode 100644 index 0000000..df3ec9c --- /dev/null +++ b/os_darwin/pkg/Distribution.in @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<installer-gui-script minSpecVersion="2"> + <allowed-os-versions> + <os-version min="10.5"/> + </allowed-os-versions> + <license file="license.txt" mime-type="text/plain"/> + <!-- <welcome file="welcome.rtf" mime-type="text/rtf"/> --> + <title>S.M.A.R.T. disk monitoring tools</title> + <pkg-ref id="com.smartmontools.pkg"/> + <choices-outline> + <line choice="default"> + <line choice="com.smartmontools.pkg"/> + </line> + </choices-outline> + <choice id="default"/> + <choice id="com.smartmontools.pkg" visible="false"> + <pkg-ref version="@version@" installKBytes="@size@" id="com.smartmontools.pkg">@pkgname@</pkg-ref> + </choice> + <domains enable_localSystem="true"/> + <options customize="never" rootVolumeOnly="true"/> +</installer-gui-script> diff --git a/os_darwin/pkg/PackageInfo.in b/os_darwin/pkg/PackageInfo.in new file mode 100644 index 0000000..92ea7a2 --- /dev/null +++ b/os_darwin/pkg/PackageInfo.in @@ -0,0 +1,6 @@ +<pkg-info format-version="2" identifier="com.smartmontools.pkg" version="@version@" install-location="/" auth="root"> +<payload installKBytes="@size@" numberOfFiles="@files@"/> +<!-- <scripts> + <postinstall file="./postinstall"/> +</scripts> --> +</pkg-info> diff --git a/os_darwin/pkg/installer/README.html b/os_darwin/pkg/installer/README.html new file mode 100644 index 0000000..6abdc80 --- /dev/null +++ b/os_darwin/pkg/installer/README.html @@ -0,0 +1,26 @@ +<html> +<body> +<h2>About this package</h2> +The smartmontools package contains two utility programs (smartctl and smartd) to control +and monitor storage systems using the Self-Monitoring, Analysis and Reporting +Technology System (SMART) built into most modern ATA and SCSI harddisks. +In many cases, these utilities will provide advanced warning of disk degradation and failure. +<h2>Installing</h2> +To install package click on the smartmontools.pkg icon and follow installation process. Files will be installed to the <b>/usr/local/</b> directory. +<h2>Usage</h2> + If you are having trouble understanding the output of smartctl or smartd, please first read the manual pages installed on your system: +<pre> + man 8 smartctl + man 8 smartd + man 8 update-smart-drivedb + man 5 smartd.conf +</pre> +To use smartmontools with USB drives please download and install +<a href="https://github.com/kasbert/OS-X-SAT-SMART-Driver">Max OS X kernel driver for providing access to external drive SMART data</a>. SAT SMART Driver is a free open source project (published under Apple Public Source License) by Jarkko Sonninen. +If you are using OS X El Capitan 10.11+ it is recommended to use signed version available from <a href="http://binaryfruit.com/drivedx/usb-drive-support/">DriveDx web site</a>. +<p> +More information could be found on the <a href="https://www.smartmontools.org">www.smartmontools.org</a> website. +<h2>Uninstalling</h2> +If you want to uninstall already installed package run <tt>'sudo smart-pkg-uninstall'</tt> in the terminal. +</body> +</html> diff --git a/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall b/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall new file mode 100755 index 0000000..72bb3fa --- /dev/null +++ b/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall @@ -0,0 +1,40 @@ +#!/bin/sh + +echo "Smartmontools package uninstaller:" + +# check if we are running with root uid +if [[ $EUID -ne 0 ]]; then + echo " Error: this script must be run as root" + exit 1 +fi + +# check if package is installed +pkgutil --info com.smartmontools.pkg > /dev/null 2>/dev/null +if [ $? -ne 0 ]; then + echo " Error: smartmontools package is not installed" + exit 1 +fi + +# smartmontools pkg could be installed only on system volume, so this should be safe +cd / + +echo " - removing files" +for str in `pkgutil --files com.smartmontools.pkg` +do + if [ -f "$str" ] + then + rm -f "$str" + fi +done +echo " - removing empty directories" +for str in `pkgutil --files com.smartmontools.pkg` +do + if [ -d "$str" ] + then + rmdir -p "$str" 2>/dev/null + fi +done + +echo " - removing package system entry" +pkgutil --forget com.smartmontools.pkg +echo "Done, smartmontolls package removed" |