diff --git a/sysutils/Makefile b/sysutils/Makefile index 1475449425d7..a30a565d726b 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -850,6 +850,7 @@ SUBDIR += screen SUBDIR += screenfetch SUBDIR += screenie + SUBDIR += scterc SUBDIR += sdd SUBDIR += sdparm SUBDIR += searchmonkey diff --git a/sysutils/scterc/Makefile b/sysutils/scterc/Makefile new file mode 100644 index 000000000000..58c291cdda9c --- /dev/null +++ b/sysutils/scterc/Makefile @@ -0,0 +1,34 @@ +# Created by: Dmitry Marakasov +# $FreeBSD$ + +PORTNAME= scterc +PORTVERSION= 0.0.1 +CATEGORIES= sysutils + +MAINTAINER= amdmi3@FreeBSD.org +COMMENT= Configure SCT ERC for hard disks on system startup + +RUN_DEPENDS= ${LOCALBASE}/sbin/smartctl:${PORTSDIR}/sysutils/smartmontools + +USE_GITHUB= yes +GH_ACCOUNT= AMDmi3 +GH_PROJECT= ${PORTNAME}-rc.d +GH_COMMIT= c8dc8c1 + +NO_BUILD= yes +SUB_FILES= pkg-message + +PLIST_FILES= etc/rc.d/scterc +PORTDOCS= * + +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/scterc.sh + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/scterc.sh ${STAGEDIR}${PREFIX}/etc/rc.d/scterc + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/ + +.include diff --git a/sysutils/scterc/distinfo b/sysutils/scterc/distinfo new file mode 100644 index 000000000000..7edb9cd15596 --- /dev/null +++ b/sysutils/scterc/distinfo @@ -0,0 +1,2 @@ +SHA256 (scterc-0.0.1.tar.gz) = 14edaef5e3ab554f86f0284e771fa1347c9fb7e24c820a84459a4bf78890c9ef +SIZE (scterc-0.0.1.tar.gz) = 3145 diff --git a/sysutils/scterc/files/pkg-message.in b/sysutils/scterc/files/pkg-message.in new file mode 100644 index 000000000000..ae193fab9319 --- /dev/null +++ b/sysutils/scterc/files/pkg-message.in @@ -0,0 +1,15 @@ +To enable setting hard disk SCT ERC on system boot time, add the +following to your /etc/rc.conf: + + scterc_enable="YES" + + # specify hard disks to configure + scterc_disks="ada0 ada1" + + # specify read and write timeouts in tenths of second + # here each is set to 7.0 seconds, which is also the default + # for which you may omit these lines + scterc_read_timeout="70" + scterc_write_timeout="70" + +See %%DOCSDIR%%/README.md for more info. diff --git a/sysutils/scterc/pkg-descr b/sysutils/scterc/pkg-descr new file mode 100644 index 000000000000..b3927bc29a90 --- /dev/null +++ b/sysutils/scterc/pkg-descr @@ -0,0 +1,10 @@ +Modern hard drives allow to set the amount of time a hard disk is +allowed to spend recovering from a read or write error. This feature +is called ERC (error recovery control, usually in Seagate), TLER +(time-limited error recovery, usually on Western Digital) or CCLT +(command completion time limit, usually on Samsung or Hitachi). + +This rc.d script allows to set these valus on system startup to +tune disks for RAID usage. + +WWW: https://github.com/AMDmi3/scterc-rc.d