From 43e8530e93493bb978c446a2023134bdd4277e50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 19:14:45 +0200 Subject: Adding upstream version 7.4. Signed-off-by: Daniel Baumann --- os_darwin/pkg/Distribution.in | 21 ++++++++++++ os_darwin/pkg/PackageInfo.in | 6 ++++ os_darwin/pkg/installer/README.html | 26 ++++++++++++++ .../pkg/root/usr/local/sbin/smart-pkg-uninstall | 40 ++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 os_darwin/pkg/Distribution.in create mode 100644 os_darwin/pkg/PackageInfo.in create mode 100644 os_darwin/pkg/installer/README.html create mode 100755 os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall (limited to 'os_darwin/pkg') 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 @@ + + + + + + + + S.M.A.R.T. disk monitoring tools + + + + + + + + + @pkgname@ + + + + 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 @@ + + + + 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 @@ + + +

About this package

+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. +

Installing

+To install package click on the smartmontools.pkg icon and follow installation process. Files will be installed to the /usr/local/ directory. +

Usage

+ If you are having trouble understanding the output of smartctl or smartd, please first read the manual pages installed on your system: +
+  man 8 smartctl
+  man 8 smartd
+  man 8 update-smart-drivedb
+  man 5 smartd.conf
+
+To use smartmontools with USB drives please download and install +Max OS X kernel driver for providing access to external drive SMART data. 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 DriveDx web site. +

+More information could be found on the www.smartmontools.org website. +

Uninstalling

+If you want to uninstall already installed package run 'sudo smart-pkg-uninstall' in the terminal. + + 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" -- cgit v1.2.3