aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-sound/teamspeak-server-bin/Manifest8
-rw-r--r--media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc4
-rw-r--r--media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc4
-rw-r--r--media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r12
-rw-r--r--media-sound/teamspeak-server-bin/files/teamspeak3-server.rc4
-rw-r--r--net-analyzer/vnstat/Manifest2
-rw-r--r--net-analyzer/vnstat/files/vnstatd.initd-r144
-rw-r--r--net-dialup/openl2tp/Manifest2
-rw-r--r--net-dialup/openl2tp/files/openl2tpd.initd-296
-rw-r--r--net-firewall/iptables-nftables/Manifest4
-rw-r--r--net-firewall/iptables-nftables/files/iptables-1.4.13-r1.init118
-rwxr-xr-xnet-firewall/iptables-nftables/files/iptables.init118
-rw-r--r--net-misc/dhcp/Manifest2
-rw-r--r--net-misc/dhcp/files/dhcpd.init591
-rw-r--r--net-misc/minidlna/Manifest4
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.0-r3.initd37
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.2.initd37
-rw-r--r--sys-apps/tmpfs/Manifest2
-rw-r--r--sys-apps/tmpfs/files/tmpfs.init520
-rw-r--r--sys-fs/lvm2/Manifest14
-rw-r--r--sys-fs/lvm2/files/clvmd.rc-2.02.39108
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.105-r247
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.95-r228
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.97-r15
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.105-r235
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.1099
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.97-r17
-rw-r--r--sys-fs/mdadm/Manifest2
-rw-r--r--sys-fs/mdadm/files/mdraid.rc56
-rw-r--r--www-apps/rpi-monitor/Manifest2
-rw-r--r--www-apps/rpi-monitor/files/rpimonitor.initd47
-rw-r--r--x11-drivers/nvidia-drivers/Manifest2
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-smi.init10
33 files changed, 799 insertions, 672 deletions
diff --git a/media-sound/teamspeak-server-bin/Manifest b/media-sound/teamspeak-server-bin/Manifest
index 784f0969..4d6aef1b 100644
--- a/media-sound/teamspeak-server-bin/Manifest
+++ b/media-sound/teamspeak-server-bin/Manifest
@@ -1,10 +1,10 @@
AUX server.conf 501 SHA256 908af5130cf871b00f2c46aa88d2ad4d1b0873fa995cbeda03e3aa563230671d SHA512 c7f786e5dcb93029a444eb37eaa86ddbd6d5ace9c8c870ecc4b43bde3a313ceec88d6085f3a198ba4b12b7b626524bc74d19121660bfceb4025ba54b02dbc82a WHIRLPOOL 388feaa659bb1e7cccf9e40e288663a6c53711e3cc7f8c7b524a6e034a6dfbc66a3c0b7e80fd40e401c1939a63daeb08bd7d444ea0bf51bbcba55393ff0bb9d9
AUX systemd/teamspeak3.conf 133 SHA256 a3851323891a304e6fc5c53740c0e239f167a7c9251cfc8c7e8a4e1b1ac8a1d8 SHA512 49dab025ab37bb29e14a14fb070568c5710fe257a35fe6b887aa404847fc828e9ffecad7c5d10e987128934c433c3b464b8da0e4891ba3b48868b73abb4b9a4c WHIRLPOOL b7980faa9d5c0b83fa1d72eeb14745c050b01bec70a8cd0974157ce02eef06faafb4f7b35a0c4cff496b102817a9d8245237808557472f9452108f46ac9362ab
AUX systemd/teamspeak3.service 500 SHA256 d211157fd94480c2d4c21e797ba01e51d0ec1563f1a34cbcda503a7ef110ea8c SHA512 332486a1b456fecade65004384f032291ee3d6e55c5b347b7dc6e7a39f6a633e3a381922295a8e431810d425c77b645df42d916d51bc4a1118aff056b606f0a4 WHIRLPOOL 4314ea4a1ecc33164c10017a8ee4328fea22a16ef5a600ea84cd8ac54b9eec2bdd835e85a24c01552a46d78ff869f03c7ef0970d32eafa31a72000f07b780b6a
-AUX teamspeak-server-bin-3.0.7.1.rc 1220 SHA256 ae20d2a6bd7029a68dd56f91f44de88ea2ffdd55986e62134e1ff6c74eb77ebd SHA512 2281697f6d088a18f68a657c673c77ce14a923688e8731707e826f07918643d845df4243ec2b83ce1ce05b06551727c83517c363d72e8f6fc3ee223bd1fccdcf WHIRLPOOL 62421cfd9de9de9b1aa7ecb1e7031ae5f420a3e011907f9f4097feffabe0c9d05ad3dc556a4e0d03b3ec00f7e51c51fc8e6d7746f4c5f4a6c3c4464c57d52de3
-AUX teamspeak-server-bin-3.0.7.2.rc 1218 SHA256 279fef1542d433f311d0d7a688bbb9cf528ede9cc92586c275dc6af005b46d46 SHA512 91bcae4fe60185e865662082dd28d6eeb3a097743dcc1347362fcadcf20e560d2a4674cb1bdd529b61906a1f3745b08a2ea8c0d63b25b48cb1a76e3d3342120e WHIRLPOOL b5cbd2a571994431b8fc4c781791e612648d7727103fb17101b4520babd9338f36e3ee1ca7cbc98ffc3576e20994d3f70d0524a852296812b39de51b059112d6
-AUX teamspeak-server-bin-init-r1 1156 SHA256 4bf3c029f48ddc72c110d91e5a1770f936bc6a73dde6583bc7e9b658d32ce608 SHA512 509e3ce629a9696e0449b5270f39de7d9d3bbe28489265cac2167ac9b99273eff0e4542eed1f3acd02d1c0a4d0ad4900f0195de2c03d85e16c4a5a1b4dfff8a9 WHIRLPOOL 8e7cea78d3ccb4afa3e964fe00618deafb62377c3ad15a9889c74c3c013e6ab20dd2e6bad6337d2a3b307b388357619ef1575a2910a1c95237579f4d43e6a648
-AUX teamspeak3-server.rc 1214 SHA256 d5acf0bf2ea8ff988f9dc1a2ec70690fd7e160b6af1898e9bd75840cd3abc4b6 SHA512 f6cdb5a80347f103ab38fc89272cf4c2fb5f21612059295911c072a36b4e377c070db62e5a3d293e9131558fe7bb70ed95b3b1a2d112b6727b21b4e218bf3d3d WHIRLPOOL 52f4a7a7bff4dcabc7ee49d1b26ddd8a0f3a1b0206d3224ca8331c0c7f54f75365ab492bd5d47377a39873c60b168eba1deda8e419a2c54f3a4bd994f6c3e612
+AUX teamspeak-server-bin-3.0.7.1.rc 1216 SHA256 e9ab5ef17af40a5af1cb9e9683f2f8f0d2501f0e946dd8bff17b090fbe4f037b SHA512 32899ed2d10f96b0521282ee047366921029493dd5291a6add11e519290cf590d31a084fc32755ebd5115d902b1f7363fa3fe5440cfe26546be2f875367f61c1 WHIRLPOOL d99cf77baa3dc00cc561b9171367ac296d3c85c6c57b129d396525b9192948a17e197afb8a3ae0bd4b353fbf4949c973cd354a0f4ceb3045085690781c88463f
+AUX teamspeak-server-bin-3.0.7.2.rc 1214 SHA256 747df9f3d59c960e26dd8b7cd5998061cdd91dc8f7ec5e8b3c9abc341df8931e SHA512 433f847ae72924220af393e277e1d84e7579cbdb296eb6df35dca00719ba3e1a8893dcd6f552a2a62872c267b4f38f78dcedb87471451c2e9b0672ccaabb0130 WHIRLPOOL 275b3ef4baa94d94f18d82016fbfa551791f49538875bcf7a5349e4dbaf34a2697eca4bae2c39facff64c93bae32bb276ca3b3b3361af878e71624b3968888e5
+AUX teamspeak-server-bin-init-r1 1154 SHA256 436fe3b45c4fcbfc46c9e31796e45d1582d416b987bbe87cb357cd2be89f7812 SHA512 d22a9229e624db9cc7baec4a80a296c5546dee9ec76d67bd89ba3f19802142f510c655a927cfca26e692b6dc4bc8eca767bfc949319440f2ea417de6d504f113 WHIRLPOOL 296cbe2e06df9f44c09d782dc19e5748007b4947037435020c5a26f5faa0f324d88cca8fe34ca5db2837e0f86a87651d36835060126a6ac0eaf31a0ba092e632
+AUX teamspeak3-server.rc 1210 SHA256 3509833aba22b6ed5fb294e3a03486d150dabdc47d724e7ba2839d2cef02e156 SHA512 e24a486c95f36aa15295ef63cf8b7001192eb16a947be340fd26b6591c460c28b5ea859ea3b6093057035c78574e9a9ad06d73b57cccdcc9bd6650f81257e4f2 WHIRLPOOL 4bc7663aec37010d6cc627f1f0caef35b64005d458adea195fa41106c6e7f0772469f1105c33ce1fc74cb89ab5891e8d2441331f8e408f6f4972e4385c4711d0
AUX ts3db_mariadb.ini 98 SHA256 5b4cde4ed06bf831d6d3ed4bdffa2fd92fd47536a3d0f94352d01df91dcb7c76 SHA512 d2d1ef64c90638fde3cc587d351987b16e96d8cfc83672dee43c0294ab297b83106e682d834008f0213b67b975dadcd4f77c63332c39d155a4125a28206ba7d4 WHIRLPOOL fe8b108a563afafa57aa463b638353277f756ab3bfe858d742ab172cd0ea75d361a07f34f0d65e982e76022d7ce25aabe6c59c04b22958a66969b3c0fa68a7bd
AUX ts3db_mysql.ini 99 SHA256 57f81c410d7768a7550b1f01697bb65f2ea7cd4548cabf8ff75a352ea39d453d SHA512 60993fa58beb07f3304e7603abe91dba2e23e3f6868a6e2894bf55e1e79c358defd1a08523e6ade16d1eb1042aad1783c76c2dff8e6ce282d08d77800c3357db WHIRLPOOL b378b5b4bba9d71ac07b08bd3715aa388e3e378450dd2827497638859775c7364059880e7a64cf7525776a1b96aff497f40917aac0868ebaa6a79f5affcf7075
AUX ts3server 264 SHA256 fd640796c87ff8be2ee4992b5d05512fc39624f2bcf75adf3a25f4ca8deb585f SHA512 b839d393550f08e0b8e19d78879d2be13f47d8d8cd7a81106ca39ccf475be780cd2f07e7188945f8df1da443d3dffd2f948620b96a41e66aaf887111a22dd9ff WHIRLPOOL a466dcdcda46468d7e31e1a5be50e88b025a58c00ea1b84f54629810b3fae01025a5c4b9172719945fb2da7023c129f7533f42e92f5b20ceab67fa4a3d141db4
diff --git a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc
index 777ccf44..82bad08b 100644
--- a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc
+++ b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.1.rc
@@ -17,9 +17,9 @@ start() {
export LD_LIBRARY_PATH="${DIR}/lib:${LD_LIBRARY_PATH}"
# Temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
- [[ -e /dev/shm/7gbhujb54g8z9hu43jre8 ]] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+ [ -e /dev/shm/7gbhujb54g8z9hu43jre8 ] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
- [[ -d /var/run/teamspeak3 ]] || mkdir -p /var/run/teamspeak3
+ [ -d /var/run/teamspeak3 ] || mkdir -p /var/run/teamspeak3
chown teamspeak3:teamspeak3 /var/run/teamspeak3
start-stop-daemon --start --quiet --background \
diff --git a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc
index 2c194204..477af7f0 100644
--- a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc
+++ b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-3.0.7.2.rc
@@ -17,9 +17,9 @@ start() {
export LD_LIBRARY_PATH="${DIR}/lib:${LD_LIBRARY_PATH}"
# Temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
- [[ -e /dev/shm/7gbhujb54g8z9hu43jre8 ]] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+ [ -e /dev/shm/7gbhujb54g8z9hu43jre8 ] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
- [[ -d /var/run/teamspeak3 ]] || mkdir -p /var/run/teamspeak3
+ [ -d /var/run/teamspeak3 ] || mkdir -p /var/run/teamspeak3
chown teamspeak3:teamspeak3 /var/run/teamspeak3
start-stop-daemon --start --quiet --background \
diff --git a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1 b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1
index 05fe2e0c..c412a77b 100644
--- a/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1
+++ b/media-sound/teamspeak-server-bin/files/teamspeak-server-bin-init-r1
@@ -19,7 +19,7 @@ start_pre() {
export LD_LIBRARY_PATH="${DIR}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
# Temporary fix for EPERM bug (we still leave it here to make sure it is *really* not there)
- [[ -e /dev/shm/7gbhujb54g8z9hu43jre8 ]] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+ [ -e /dev/shm/7gbhujb54g8z9hu43jre8 ] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
checkpath -d --owner teamspeak3:teamspeak3 --mode 0700 "$( dirname "${pidfile}" )"
}
diff --git a/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc b/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc
index 454a2299..84b6030e 100644
--- a/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc
+++ b/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc
@@ -17,9 +17,9 @@ start() {
export LD_LIBRARY_PATH="${DIR}/lib:${LD_LIBRARY_PATH}"
# Temporay fix for EPERM bug (we still leave it here to make sure it is *really* not there)
- [[ -e /dev/shm/7gbhujb54g8z9hu43jre8 ]] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
+ [ -e /dev/shm/7gbhujb54g8z9hu43jre8 ] && rm -f /dev/shm/7gbhujb54g8z9hu43jre8
- [[ -d /var/run/teamspeak3 ]] || mkdir -p /var/run/teamspeak3
+ [ -d /var/run/teamspeak3 ] || mkdir -p /var/run/teamspeak3
chown teamspeak3:teamspeak3 /var/run/teamspeak3
start-stop-daemon --start --quiet --background \
diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest
index 62d2c3c2..e3ea6a8c 100644
--- a/net-analyzer/vnstat/Manifest
+++ b/net-analyzer/vnstat/Manifest
@@ -1,6 +1,6 @@
AUX vnstat.cron 220 SHA256 b6b437c680606061b98af19758cbacc3f883f73cd86f0bbfbcfe756c982cd3fd SHA512 c901385f97323d1a686cee63d015eaf9ad38ed195a1c0e25dae671dd7061ebc918498684c55b90b0674960891dfca4b83f458174892c1b9efb48cd362fdb8477 WHIRLPOOL 1432dfdfdf2f121deeff6f8147b344ff61838a8fe54d7bc5bb3ac6c1b9675a64b6e331bd3e33ee0e9fe2488bde42ad8c4e279ea3b1d1d5ed304b4b2ef4205429
AUX vnstatd.confd 378 SHA256 6fd24a1b464e678843808a7163abc66aeecde35138b68dec956e64a463cc7ab3 SHA512 68579739752af2349b7ab8ac0ae383b56558a44b4b661b4b152c480b8aad262921367d5f748594ded527aaea1ae3e8657a88d7e820b4a5d9c9ee20257ee8620c WHIRLPOOL a01f2d155748ef1c4f3af0808ec495b786c4878b1737469ac1eddaae7fc0a2a2384f9cadf4288b3d0df198ce52b06205bcab4af5934f245d1f205c6f28b6edce
-AUX vnstatd.initd-r1 2649 SHA256 d82285afb32062924ccb1293b40af518fc32fe906f43d60c6fd6f64315b58ed0 SHA512 7d5ee0833f6de3a327a16563c4ab96bc8352b9cde559b1782126f42da2d8826730f2a8167b0c1f1e906289d5819c9cc5e874eb0e69b726fa373c29104836d3ab WHIRLPOOL b926b04e90b85fb802abf62c9cf6bfc68063e4f69bb83348ac1dbcd3ea1067af0fcea04ad48e6c11b2e02cc8044197e547ece3a52469faf48880436b257cc19c
+AUX vnstatd.initd-r1 2730 SHA256 8953d2310dc2b4f113f8248f990900916cd28614fbf612bd8bb4bfc9d46003fb SHA512 e89da4d682da284c5f34a1bf73f3a264a81e3ecd128a74a0c099832504f10e830680d7d8a535963133082be75c53a1b65472c4db88ad4027453bd4a37d6ea24a WHIRLPOOL a339cc5505e307cb7c8beee4bdc8f699320f7cef5d2f9fd9c9b6a4db00245e3c59e2f61ea4149ba4f8f2ec84792289d15f4ae68ba491f00a86b6cd4e1ae4e2be
DIST vnstat-1.13.tar.gz 101568 SHA256 6f4e2599ebb195b25f499d3e2e865aa14da336dfc9cc03a79181aa71f7ed99cd SHA512 b9620349247db292b13cd06db1921b4e5921a473957ac387f6adfc21acdc441910f73b97dfa5f024d7ba7a6521d1d9d97e2b25337673f423bcdbd064207f01a4 WHIRLPOOL 6b9aeb96790eeef2b287cdffeb4d41b2db22803e7218dafb27944bb14acf255bf590dcb82220c72f388c8cc387045b87335a2e4973a07c5ef1e1c98c710e068d
DIST vnstat-1.14.tar.gz 103281 SHA256 f8462a47d85d0890493dc9eaeafbc725ae631aa5b103fb7f8af4ddb2314e8386 SHA512 a2aebcdd0c4aa4a821579b751af587af44a5c3f14864d3022a05f65c4df2b9ddece0ed414097346d95124a3ea5fb89ea26bf44c68d3c7ca7237573dd5f1e8239 WHIRLPOOL 1b8b6ac7eeaec936d7c8d17d6a384c13f8daa9ee8e451d94abffc1b373eb3b106ed2b4c95af9f833c4c6e732a4ebc0ccdb1544988da650012add99d7915fd068
EBUILD vnstat-1.13.ebuild 1392 SHA256 f71ecec1eed9c0f34c772ee1fd5f54ff3a3a03c6aa86b8b82cff23d72c3efa75 SHA512 ccc453686403d4f2e1b4168f07e48763b6506814b264fed77cd1fdd09852b6bc00cea2dadae8662b16d2be73b0dc7f56af1b233bf4c45a45499ca01eab24577c WHIRLPOOL fe4dd01ecc49414ee9031fa81d0f36d82505ec1bbc45b411cb23d43f9973538b23b601e11ba2fc91d0bdc8112518d08db7751886387476df815a11ddddd0754c
diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1
index 04838b07..db9eff59 100644
--- a/net-analyzer/vnstat/files/vnstatd.initd-r1
+++ b/net-analyzer/vnstat/files/vnstatd.initd-r1
@@ -11,45 +11,47 @@ depend() {
VNSTATD_CONFIG="${VNSTATD_CONFIG:-/etc/vnstat.conf}"
-if [[ -z "${VNSTATD_PIDFILE:-}" ]]; then
- VNSTATD_PIDFILE="$( grep '^\s*PidFile' < "${VNSTATD_CONFIG}" 2>/dev/null | sed -r 's/^\s*PidFile\s+"?([^"]+)"?\s*$/\1/' )"
+if [ -z "${VNSTATD_PIDFILE:-}" ]; then
+ VNSTATD_PIDFILE="$( grep '^\s*PidFile' "${VNSTATD_CONFIG}" 2>/dev/null | sed -r 's/^\s*PidFile\s+"?([^"]+)"?\s*$/\1/' )"
VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/var/run/vnstatd/vnstatd.pid}"
fi
start() {
- [[ -s "${VNSTATD_CONFIG}" ]] || {
+ local vnstatd_user vnstatd_group vnstatd_dbdir vnstatd_logmode vnstatd_logfile vnstatd_logdir vnstatd_piddir vnstatd_changeuser
+
+ if ! [ -s "${VNSTATD_CONFIG}" ]; then
eerror "Cannot read vnstatd configuration file '${VNSTATD_CONFIG}'"
return 1
- }
-
- ebegin "Starting vnstatd"
+ fi
- local vnstatd_user="$( grep '^\s*DaemonUser' < "${VNSTATD_CONFIG}" | sed -r 's/^\s*DaemonUser\s+"?([^"]+)"?\s*$/\1/' )"
- local vnstatd_group="$( grep '^\s*DaemonGroup' < "${VNSTATD_CONFIG}" | sed -r 's/^\s*DaemonGroup\s+"?([^"]+)"?\s*$/\1/' )"
- local vnstatd_dbdir="$( grep '^\s*DatabaseDir' < "${VNSTATD_CONFIG}" | sed -r 's/^\s*DatabaseDir\s+"?([^"]+)"?\s*$/\1/' )"
- local vnstatd_logmode="$( grep '^\s*UseLogging' < "${VNSTATD_CONFIG}" | sed -r 's/^\s*UseLogging\s+"?([^"]+)"?\s*$/\1/' )"
- if [[ "${vnstatd_logmode:-}" == "1" ]]; then
- local vnstatd_logfile="$( grep '^\s*LogFile' < "${VNSTATD_CONFIG}" | sed -r 's/^\s*LogFile\s+"?([^"]+)"?\s*$/\1/' )"
- local vnstatd_logdir="$( dirname "${vnstatd_logfile:-}" )"
+ vnstatd_user="$( grep '^\s*DaemonUser' "${VNSTATD_CONFIG}" | sed -r 's/^\s*DaemonUser\s+"?([^"]+)"?\s*$/\1/' )"
+ vnstatd_group="$( grep '^\s*DaemonGroup' "${VNSTATD_CONFIG}" | sed -r 's/^\s*DaemonGroup\s+"?([^"]+)"?\s*$/\1/' )"
+ vnstatd_dbdir="$( grep '^\s*DatabaseDir' "${VNSTATD_CONFIG}" | sed -r 's/^\s*DatabaseDir\s+"?([^"]+)"?\s*$/\1/' )"
+ vnstatd_logmode="$( grep '^\s*UseLogging' "${VNSTATD_CONFIG}" | sed -r 's/^\s*UseLogging\s+"?([^"]+)"?\s*$/\1/' )"
+ if [ "${vnstatd_logmode:-}" = "1" ]; then
+ vnstatd_logfile="$( grep '^\s*LogFile' "${VNSTATD_CONFIG}" | sed -r 's/^\s*LogFile\s+"?([^"]+)"?\s*$/\1/' )"
+ vnstatd_logdir="$( dirname "${vnstatd_logfile:-}" )"
fi
- local vnstatd_piddir="$( dirname "${VNSTATD_PIDFILE}" )"
- local vnstatd_changeuser=""
- if [[ -z "${vnstatd_user:-}" && -z "${vnstatd_group:-}" ]]; then
+ vnstatd_piddir="$( dirname "${VNSTATD_PIDFILE}" )"
+ vnstatd_changeuser=""
+ if [ -z "${vnstatd_user:-}" ] && [ -z "${vnstatd_group:-}" ]; then
vnstatd_changeuser="--user vnstat --group vnstat"
fi
- checkpath -q -d -m 755 -o ${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat} "${vnstatd_piddir:-/var/run/vnstatd}"
- checkpath -q -d -m 755 -o ${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat} "${vnstatd_dbdir:-/var/lib/vnstat}"
- if [[ "${vnstatd_logmode:-}" == "1" && "${vnstatd_logdir}" != "/var/log" ]]; then
- checkpath -q -d -m 755 -o ${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat} "${vnstatd_logdir:-/var/log/vnstatd}"
+ checkpath -q -d -m 755 -o "${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat}" "${vnstatd_piddir:-/var/run/vnstatd}"
+ checkpath -q -d -m 755 -o "${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat}" "${vnstatd_dbdir:-/var/lib/vnstat}"
+ if [ "${vnstatd_logmode:-}" = "1" ] && [ "${vnstatd_logdir}" != "/var/log" ]; then
+ checkpath -q -d -m 755 -o "${vnstatd_user:-vnstat}:${vnstatd_group:-vnstat}" "${vnstatd_logdir:-/var/log/vnstatd}"
fi
+ ebegin "Starting vnstatd"
+
start-stop-daemon --start --quiet \
--pidfile "${VNSTATD_PIDFILE}" \
${vnstatd_changeuser} \
--nicelevel ${VNSTATD_NICELEVEL:-0} \
--exec /usr/bin/vnstatd -- \
- -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
+ -d ${VNSTATD_EXTRAOPTS} -p "${VNSTATD_PIDFILE}"
eend $?
}
diff --git a/net-dialup/openl2tp/Manifest b/net-dialup/openl2tp/Manifest
index 1f808de9..b79aeb90 100644
--- a/net-dialup/openl2tp/Manifest
+++ b/net-dialup/openl2tp/Manifest
@@ -13,6 +13,6 @@ AUX openl2tp-1.8-pppd-2.patch 485 SHA256 5385e280d2c7db0b6bea1389295ae39b961f7cb
AUX openl2tp-1.8-setkey.patch 483 SHA256 66f7a8de192525a0eb538493465023ec4530215ef87ad0540eb644d4b1bbdc95 SHA512 da1935e969d8100230434cf6393696563220ecf3785712e1ceb0922e34034624e5a9999671721e530ad74368fab9d89d403677b417934e379fedd5060463e3ab WHIRLPOOL fb57255757e06e62bcd287a6d9caf1f5ff17bfb99b77d2a4b4eab40571712b09f6d9d2f56ad3415cc72ce0084c3d75ae9d2c7abfe1a1a841774f8d7f6719db65
AUX openl2tp-1.8-werror.patch 1466 SHA256 5da5272f697d803c71256f298070c3a9783c1e8e43c890576a4615a407e069aa SHA512 99967159458f9ee806b72372142a5895793daad46b4aa9a6f0876eafc9c89b2016d72883c6c77adee6cebd4126fb9ba463b2b8bf7119456a4ea72d86374fb10d WHIRLPOOL b376069cb8e219efcaf6f2547f8f6efd2f44217ba87b8276c3490c58cf575694b5de902bbed9b88abed5b22e70d51aac0861f31f1596bce9f16c7c4f78e0b3fb
AUX openl2tpd.confd 717 SHA256 30a62fc00e72f3e5220ea8505b7f5f009b18c793e3e24d48d96904d9267c378e SHA512 b120c80c352cfb810f808722a5fbbc63519e07b72f16a1b42f4e577da9a4607b24e8ce82bf25ccd90c69ad640ad929be89c7e1e3fb429c61088ce93ddab2ceb4 WHIRLPOOL cb6a8f2fea6bc01e41153c3fb82b8afe30696970e2cfa2713fd428471b11c75e2deab745342be179c9568e2d61f0e533e4e4ae8f75d29e905eff965f7f208ec3
-AUX openl2tpd.initd-2 1738 SHA256 cef03de0be9313be94f0581314fb83266e6a29c949ea5bbfbbd9480e89b0d95e SHA512 47ac334c2370681ee3c1e751fd54aa53f659e306bc160cd246bd602e912f219cc9eb3368c158f880c76dfd5a08dabcbfd26a43e236675ddac25e450ff11b86d6 WHIRLPOOL 21d8efe6d30c7c65451e20cb6d4ce9cda1ed203c809894e563a8558bfb1b962e3fa9b4282bafc0e0f03ea84291c81b30374a527180941a2cd86faa0eaf16b960
+AUX openl2tpd.initd-2 1731 SHA256 3b624bfe884d8cc34e05d41a7698f387b4229d348fdc15a6dc715ac8f7b14ece SHA512 028016c26c02e0b65039571a152abc0c6db3e164b3c53a4727ff420e788046d3bc9e06d77c4f8495e4a32b5df25473f31018910bc2348d3efe5d8b738117d550 WHIRLPOOL a8a51f8030107904d7ff49f5d1ed49f66eb22738864eb7d10b9da1396cd84871342ec87a652e7d4a34bcfd242fbe5418be0c2ade73a3e52d97a9db096aa15e5c
DIST openl2tp-1.8.tar.gz 491160 SHA256 1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f SHA512 360f9032b2bb104cfaa41a18fc37005510ab604b31a34a3412563e0de3e8dad946ca61840cd41a19f0202d92d758d812f45479659c9fa4d4e9e13dd226f03fda WHIRLPOOL 10988e77ede3574baf9b41ab9941f2caba60db3c27004173cac6947eab4bd85aceb62a15f8a60407c03e855a81283bf06c193c5c1e10843fbe8ff711bff934e2
EBUILD openl2tp-1.8-r6.ebuild 3193 SHA256 7c52f3d3c93738cf98262a4d0f42ba9000382fe4bdbccfbc57a99734d5187497 SHA512 12bb6d42a371a29e2b2e34380c058a3901a07ef11e363faf2337d704b77c3951261e410b5d4cd72ae3492919ff75060eed01079e76c1a6ed8ee352c6327b706a WHIRLPOOL e7494d075dab408fab65733a09a10e12c506e7ca36fc8a509a22444f529afe1cb3af17d905b21f6c65e626593cc5c2ef9eb2160580cb963c06a228f6124ece74
diff --git a/net-dialup/openl2tp/files/openl2tpd.initd-2 b/net-dialup/openl2tp/files/openl2tpd.initd-2
index 55d78766..7bcf1ad6 100644
--- a/net-dialup/openl2tp/files/openl2tpd.initd-2
+++ b/net-dialup/openl2tp/files/openl2tpd.initd-2
@@ -2,66 +2,74 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-userpc="yes"
+use_rpc="yes"
retry_count="40"
retry_delay="0.5"
-bin=/usr/sbin/openl2tpd
-pid=/var/run/openl2tpd.pid
-[[ -z "${OPENL2TPD_CONFIG_FILE}" ]] && OPENL2TPD_CONFIG_FILE="/etc/openl2tpd.conf"
+bin="/usr/sbin/openl2tpd"
+pid="/var/run/openl2tpd.pid"
+[ -z "${OPENL2TPD_CONFIG_FILE:-}" ] && OPENL2TPD_CONFIG_FILE="/etc/openl2tpd.conf"
depend() {
- need net
- [[ $userpc == "yes" ]] && need portmap
- use dns ipsec racoon ippoold
+ need net
+ [ "${use_rpc}" = "yes" ] && need portmap
+ use dns ipsec racoon ippoold
}
check_module () {
- if ! [[ -f /proc/net/pppol2tp ]]; then
- ebegin "Loading l2tp module"
- # try both new and old module names
- modprobe l2tp_ppp 2>/dev/null || modprobe pppol2tp 2>/dev/null
- eend $?
- fi
+ if ! [ -f /proc/net/pppol2tp ]; then
+ ebegin "Loading l2tp module"
+ # try both new and old module names
+ modprobe l2tp_ppp 2>/dev/null || modprobe pppol2tp 2>/dev/null
+ eend $?
+ fi
}
start() {
- check_module
- ebegin "Starting openl2tpd"
- # if rpc is enabled do not read config file by daemon (has bugs),
- # but read by l2tpconfig instead
- if [[ $userpc == "yes" ]]; then
- conf="/dev/null"
- else
- conf="${OPENL2TPD_CONFIG_FILE}"
- fi
+ local rc conf i
+ declare -i rc i
- start-stop-daemon --start --quiet --exec ${bin} --pidfile ${pid} \
- -- -c "$conf" ${OPENL2TPDARGS}
+ check_module
- # it is possible to not to have config at all
- if [[ $userpc == "yes" ]] && [[ -r "${OPENL2TPD_CONFIG_FILE}" ]]; then
- # on system startup it may take some time to load daemon
- for (( i=0; i<$retry_count; i++ )); do
- l2tpconfig config restore file="${OPENL2TPD_CONFIG_FILE}" >/dev/null 2>&1
- retcode=$?
- [[ $retcode == 0 ]] && break
- sleep $retry_delay
- done
- fi
- eend $retcode
+ ebegin "Starting openl2tpd"
+
+ # if rpc is enabled do not read config file by daemon (has bugs),
+ # but read by l2tpconfig instead
+ if [ "${use_rpc}" = "yes" ]; then
+ conf="/dev/null"
+ else
+ conf="${OPENL2TPD_CONFIG_FILE}"
+ fi
+
+ start-stop-daemon --start --quiet --pidfile ${pid} \
+ --exec "${bin}" -- -c "$conf" ${OPENL2TPDARGS}
+
+ # it is possible to not to have config at all
+ if [ "${use_rpc}" = "yes" ] && [ -r "${OPENL2TPD_CONFIG_FILE}" ]; then
+ # on system startup it may take some time to load daemon
+ : $(( i = 0 ))
+ while [ $(( i < retry_count )) -ne 0 ]; do
+ l2tpconfig config restore file="${OPENL2TPD_CONFIG_FILE}" >/dev/null 2>&1 ; rc=$?
+ [ "${rc}" = "0" ] && break
+ sleep ${retry_delay} 2>/dev/null || sleep 1
+ : $(( i = i + 1 ))
+ done
+ fi
+ eend ${rc}
}
stop() {
- local rc
- ebegin "Stopping openl2tpd"
- start-stop-daemon --stop --quiet --exec ${bin} --pidfile ${pid}
- rc=$?
+ local rc
+ declare -i rc
+
+ ebegin "Stopping openl2tpd"
+
+ start-stop-daemon --stop --quiet --exec "${bin}" --pidfile "${pid}" ; rc=$?
- if [[ ${RC_CMD} == "restart" ]]; then
- einfo "sleepinng for server to finalize connections"
- sleep 2
- fi
+ if [ "${RC_CMD}" = "restart" ]; then
+ einfo "Waiting for server to finalize connections ..."
+ sleep 2
+ fi
- eend ${rc}
+ eend ${rc}
}
diff --git a/net-firewall/iptables-nftables/Manifest b/net-firewall/iptables-nftables/Manifest
index e08f38cc..7c01d3df 100644
--- a/net-firewall/iptables-nftables/Manifest
+++ b/net-firewall/iptables-nftables/Manifest
@@ -1,9 +1,9 @@
AUX ip6tables-1.4.13.confd 690 SHA256 2938fe4206514d9868047bd8f888a699fa2097ca69edab176453436d4259abaa SHA512 8de9a5de4061bef217fbc07577688a8110f1116af7f3b936dfd18100a6a7a47ec6e70c456b24cf3432fb4f2034b741a487fe6af8d9740f174d51c6eb16945c6e WHIRLPOOL f2f4903812b5b97d5bdf9cb28f0bcb6f8c866f197b46a9128530721a8d9db1cdcedffe2512c9235391a67f494c2daf1266d7bc8a6185949756437221c3861a10
-AUX iptables-1.4.13-r1.init 3105 SHA256 3ddf8418a36b69aa2ab6ecc9321e794e734bf97830c0757ce2b97320787df33e SHA512 5a974e9e7378dcaf4f3c0ebac45c18bd8e6cd0ebf37b9a711ac3dd3ad4f5454395d8698309efcbe49dbd85a4f8be06bdb4989bfa84f9aab86891990e42e9f0f4 WHIRLPOOL c36466eaa01298570423503030e0f887369ab407ee3346336a8b99662fd4726f57cd69b0a7f188d59bfb1c7278f6bce35e06188ffaa7b05213b880d94746bd2c
+AUX iptables-1.4.13-r1.init 3225 SHA256 810403ff413a1feed28a2f877739d1fb151e2eadb165a7637f91bb3e8e21fa0e SHA512 16087ccb9b9a62b9ae212609ae650658fc7b59bcf360a14d0de328eb89ce190d899b5972777030d98bf79053598dbe895f375f98a1b5109a38536e042e62c743 WHIRLPOOL d75685a2e702fda20e099932e138d05f2c9fe18c19bb64dff60df326bf42df4981dd94e8ffb6ba98157b9bba127bc003ee46a3e526601332b7bc48ca0dedf5d4
AUX iptables-1.4.13.confd 687 SHA256 7e2341211ca14997b7a8a1f930f94db855291af597c568f680f80031c20d45b6 SHA512 bd67d53e997ea65755148ba071fe6e3856d6e604b9167c666900721bc3dc24f63d395bc33a1a34ae50f95e72760da630db1a8d35afc81ec5973e60ba5343dc70 WHIRLPOOL 111b809b3122b04cce8ac0e551cfcdec7fde1ad563e1001bbbb3dbb4cae0ddf13851ece1024e13fb26aab2fe306dfc4fd9e59ab5a10127b301bc7a65ec20486b
AUX iptables-1.4.21-configure.patch 1066 SHA256 73454c278b48fae5debcdb72ada8f2d60a36b5134cb1052b1a332b83169cbdc0 SHA512 45445d1460072ed19ba617be983be82094fdd0535a25de4f6159173de4a08be9bee9da13c7aeea419291beb92402ca25efba3a0e269510e221f7eacc8bcd5176 WHIRLPOOL 55c56c9e0711409c54b8635dc9b480be885c852b60ac336a32b3a48586c85ba5b7b9a0b4d2d427f7d646dfdc4d49c9fe6957ed39eac5cdd7de3526249f99e6ed
AUX iptables-1.4.21-static-connlabel-config.patch 2195 SHA256 e03de480a940b0ac386bba2ec681f724ba39f5e53153398e061f2d74ae491c49 SHA512 d838773bf2db9f97548d2f7eaab0ce3205265a7ec8b274df479fcecb474ba09ed061abae50534c0379a1290479c2e94927595eca0f4570b27744ec165348b6b1 WHIRLPOOL c1b79bb8e9a915d27940b443c564d0d00ccbd31728b8519bd18a6957ca7085c19dd09592d94a4aecee48102303a000130eba85710ad1de1533ef783ef1c28811
-AUX iptables.init 3029 SHA256 ed7831666a3b5c392a85db7bd6368cf5d1fa862c253e5f5fd3368a4517cdefa9 SHA512 c48b44e6f607166008ef46355f89480cdb625a820b04200a85126a138d15409e5cf37d34213e7ee6ef2fd7febb585c41ed26402e98bed17560f47a30a4c3688a WHIRLPOOL 8b73bcc40db23c6b1eedc2efe927ea82be8bb4b46652e7a2fa58ab9a0e98c978b0fb0fab3b1fef7d80904ce7b872255676f600300a73967987bee93f1b5ce836
+AUX iptables.init 3149 SHA256 374c4816a538bb2fbc95f36cfb4cb3c3ef563e4a1c4584f275e05fbc52d6816c SHA512 a9b95ed821ea6d83e85c39aa2cf9d8bc793119718b92ff71b270aaeb910212fa10ef263ad0b077bb4015b1997e0f5cc5a73dc629d426848706d8a7c99ac1e11d WHIRLPOOL 8bade5473e3269d940b022c835d5cd8533601bc49199da5dd20701c73ff919a05454e8e6513342c8ea68b51ad1e82d1c9451f420389d3affb317498f34855e12
AUX systemd/ip6tables-restore.service 395 SHA256 679ba8327bf037e991ff07d8cf910009c67026b0faf8112d75c945b64f4b64de SHA512 e41f7bc55b2b58452b993ccb42014b5bc2701aeeef46eee845a2b016b334299ff4e6d11ba22f3aaff47195f1049dc7fd4be41a7055911420230107b1ee4c6ba3 WHIRLPOOL 232d90f8591358fe853c8c4b569b2825ba02ced59d390232a7f7fb535e3bfbbcb70972938506cbead5e6b57845310f5a91c1fd225898f185cffb96ba7d4d97f3
AUX systemd/ip6tables-store.service 243 SHA256 ce93fc2ba81f7693877479ddc75cdec94627c302a140bd27ff30656fad78e72b SHA512 7cee224f91d4c8348606ba176d0d689749a59229958cfdf4e75451d77271363e7cff71dbb7e30dbc4a5a837363a72d70d6960d2dfb218f3ad16456ae109cba10 WHIRLPOOL d84687a142843fa9cd930171e817652afb22b950214349ca156ba6da174312989973d17fed04cd129c18d4d6fbd5ad3124b9afa0d105d128333248c90fdb4ca6
AUX systemd/ip6tables.service 133 SHA256 1b8d342ffdf471ef25e365dacf106e1899b438dad4bf9154cfad2d5217c3a019 SHA512 f871e694a8c666a59840c4c7ae1f355dc47f481501b3472601b65460c1d6e163a7e33f7a6c42a84ac33131ddb96170b316e83507a43f1ede54d61446f81950dc WHIRLPOOL 24140e7398cfa494210b8d3b773bdca5ee1abbbdb29c2921e84ff025848e26844b5c20fadefa9b961ce14564ce8daa9b8e9f197b7d7ec70c26bb6609b74b10d0
diff --git a/net-firewall/iptables-nftables/files/iptables-1.4.13-r1.init b/net-firewall/iptables-nftables/files/iptables-1.4.13-r1.init
index 7818c48f..baf1c46e 100644
--- a/net-firewall/iptables-nftables/files/iptables-1.4.13-r1.init
+++ b/net-firewall/iptables-nftables/files/iptables-1.4.13-r1.init
@@ -6,18 +6,25 @@
extra_commands="check save panic"
extra_started_commands="reload"
-iptables_name=${SVCNAME}
-case ${iptables_name} in
-iptables|ip6tables) ;;
-*) iptables_name="iptables" ;;
+iptables_name="${SVCNAME}"
+case "${iptables_name}" in
+ iptables|ip6tables)
+ ;;
+ *)
+ iptables_name="iptables"
+ ;;
esac
iptables_bin="/sbin/${iptables_name}"
-case ${iptables_name} in
- iptables) iptables_proc="/proc/net/ip_tables_names"
- iptables_save=${IPTABLES_SAVE};;
- ip6tables) iptables_proc="/proc/net/ip6_tables_names"
- iptables_save=${IP6TABLES_SAVE};;
+case "${iptables_name}" in
+ iptables)
+ iptables_proc="/proc/net/ip_tables_names"
+ iptables_save="${IPTABLES_SAVE}"
+ ;;
+ ip6tables)
+ iptables_proc="/proc/net/ip6_tables_names"
+ iptables_save="${IP6TABLES_SAVE}"
+ ;;
esac
depend() {
@@ -26,29 +33,32 @@ depend() {
}
set_table_policy() {
- local chains table=$1 policy=$2
- case ${table} in
- nat) chains="PREROUTING POSTROUTING OUTPUT";;
- mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";;
- filter) chains="INPUT FORWARD OUTPUT";;
- *) chains="";;
+ local chain chains table policy
+ table="${1}"
+ policy="${2}"
+
+ case "${table}" in
+ nat) chains="PREROUTING POSTROUTING OUTPUT" ;;
+ mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING" ;;
+ filter) chains="INPUT FORWARD OUTPUT" ;;
+ *) chains="" ;;
esac
- local chain
for chain in ${chains} ; do
- ${iptables_bin} -w -t ${table} -P ${chain} ${policy}
+ "${iptables_bin}" -w -t "${table}" -P "${chain}" "${policy}"
done
}
checkkernel() {
- if [ ! -e ${iptables_proc} ] ; then
+ if [ ! -e "${iptables_proc}" ] ; then
eerror "Your kernel lacks ${iptables_name} support, please load"
eerror "appropriate modules and try again."
return 1
fi
return 0
}
+
checkconfig() {
- if [ ! -f ${iptables_save} ] ; then
+ if [ ! -f "${iptables_save}" ] ; then
eerror "Not starting ${iptables_name}. First create some rules then run:"
eerror "/etc/init.d/${iptables_name} save"
return 1
@@ -58,41 +68,51 @@ checkconfig() {
start() {
checkconfig || return 1
- if [[ -x /sbin/setsystz ]] && grep -i " time " "${iptables_save}" >/dev/null 2>&1; then
+
+ if [ -x /sbin/setsystz ] && grep -qi ' time ' "${iptables_save}"; then
ebegin "Setting kernel timezone (for -m TIME rules)"
/sbin/setsystz
- eend $? "setsystz failed"
+ eend ${?} "setsystz failed"
fi
ebegin "Loading ${iptables_name} state and starting firewall"
- ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"
+ "${iptables_bin}-restore" ${SAVE_RESTORE_OPTIONS:-} < "${iptables_save}"
eend $?
}
stop() {
+ local a
+
if [ "${SAVE_ON_STOP}" = "yes" ] ; then
save || return 1
fi
+
checkkernel || return 1
+
ebegin "Stopping firewall"
- local a
- for a in $(cat ${iptables_proc}) ; do
- set_table_policy $a ACCEPT
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
+ for a in $( cat "${iptables_proc}" ) ; do
+ set_table_policy "${a}" ACCEPT
+
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
done
- eend $?
+
+ eend ${?}
}
reload() {
+ local a
+
checkkernel || return 1
checkrules || return 1
+
ebegin "Flushing firewall"
- local a
- for a in $(cat ${iptables_proc}) ; do
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
+
+ for a in $( cat "${iptables_proc}" ) ; do
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
done
+
eend $?
start
@@ -100,8 +120,10 @@ reload() {
checkrules() {
ebegin "Checking rules"
- ${iptables_bin}-restore --test ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"
- eend $?
+
+ "${iptables_bin}-restore" --test ${SAVE_RESTORE_OPTIONS:-} < "${iptables_save}"
+
+ eend ${?}
}
check() {
@@ -111,25 +133,31 @@ check() {
save() {
ebegin "Saving ${iptables_name} state"
- checkpath -q -d "$(dirname "${iptables_save}")"
+
+ checkpath -q -d "$( dirname "${iptables_save}" )"
checkpath -q -m 0600 -f "${iptables_save}"
- ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}"
- eend $?
+ "${iptables_bin}-save" ${SAVE_RESTORE_OPTIONS:-} > "${iptables_save}"
+
+ eend ${?}
}
panic() {
+ local a
+
checkkernel || return 1
- if service_started ${iptables_name}; then
- rc-service ${iptables_name} stop
+
+ if service_started "${iptables_name}"; then
+ rc-service "${iptables_name}" stop
fi
- local a
ebegin "Dropping all packets"
- for a in $(cat ${iptables_proc}) ; do
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
- set_table_policy $a DROP
+ for a in $( cat "${iptables_proc}" ) ; do
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
+
+ set_table_policy "${a}" DROP
done
- eend $?
+
+ eend ${?}
}
diff --git a/net-firewall/iptables-nftables/files/iptables.init b/net-firewall/iptables-nftables/files/iptables.init
index 5a030d52..f85f9d77 100755
--- a/net-firewall/iptables-nftables/files/iptables.init
+++ b/net-firewall/iptables-nftables/files/iptables.init
@@ -6,18 +6,25 @@
extra_commands="check save panic"
extra_started_commands="reload"
-iptables_name=${SVCNAME}
-case ${iptables_name} in
-iptables|ip6tables) ;;
-*) iptables_name="iptables" ;;
+iptables_name="${SVCNAME}"
+case "${iptables_name}" in
+ iptables|ip6tables)
+ ;;
+ *)
+ iptables_name="iptables"
+ ;;
esac
iptables_bin="/sbin/${iptables_name}"
-case ${iptables_name} in
- iptables) iptables_proc="/proc/net/ip_tables_names"
- iptables_save=${IPTABLES_SAVE};;
- ip6tables) iptables_proc="/proc/net/ip6_tables_names"
- iptables_save=${IP6TABLES_SAVE};;
+case "${iptables_name}" in
+ iptables)
+ iptables_proc="/proc/net/ip_tables_names"
+ iptables_save="${IPTABLES_SAVE}"
+ ;;
+ ip6tables)
+ iptables_proc="/proc/net/ip6_tables_names"
+ iptables_save="${IP6TABLES_SAVE}"
+ ;;
esac
depend() {
@@ -26,29 +33,32 @@ depend() {
}
set_table_policy() {
- local chains table=$1 policy=$2
- case ${table} in
- nat) chains="PREROUTING POSTROUTING OUTPUT";;
- mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";;
- filter) chains="INPUT FORWARD OUTPUT";;
- *) chains="";;
+ local chain chains table policy
+ table="${1}"
+ policy="${2}"
+
+ case "${table}" in
+ nat) chains="PREROUTING POSTROUTING OUTPUT" ;;
+ mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING" ;;
+ filter) chains="INPUT FORWARD OUTPUT" ;;
+ *) chains="" ;;
esac
- local chain
for chain in ${chains} ; do
- ${iptables_bin} -w -t ${table} -P ${chain} ${policy}
+ "${iptables_bin}" -w -t "${table}" -P "${chain}" "${policy}"
done
}
checkkernel() {
- if [ ! -e ${iptables_proc} ] ; then
+ if [ ! -e "${iptables_proc}" ] ; then
eerror "Your kernel lacks ${iptables_name} support, please load"
eerror "appropriate modules and try again."
return 1
fi
return 0
}
+
checkconfig() {
- if [ ! -f ${iptables_save} ] ; then
+ if [ ! -f "${iptables_save}" ] ; then
eerror "Not starting ${iptables_name}. First create some rules then run:"
eerror "/etc/init.d/${iptables_name} save"
return 1
@@ -58,41 +68,51 @@ checkconfig() {
start() {
checkconfig || return 1
- if [[ -x /sbin/setsystz ]] && grep -i " time " "${iptables_save}" >/dev/null 2>&1; then
+
+ if [ -x /sbin/setsystz ] && grep -qi ' time ' "${iptables_save}"; then
ebegin "Setting kernel timezone (for -m TIME rules)"
/sbin/setsystz
- eend $? "setsystz failed"
+ eend ${?} "setsystz failed"
fi
ebegin "Loading ${iptables_name} state and starting firewall"
- ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"
+ "${iptables_bin}-restore" ${SAVE_RESTORE_OPTIONS:-} < "${iptables_save}"
eend $?
}
stop() {
+ local a
+
if [ "${SAVE_ON_STOP}" = "yes" ] ; then
save || return 1
fi
+
checkkernel || return 1
+
ebegin "Stopping firewall"
- local a
- for a in $(cat ${iptables_proc}) ; do
- set_table_policy $a ACCEPT
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
+ for a in $( cat "${iptables_proc}" ) ; do
+ set_table_policy "${a}" ACCEPT
+
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
done
- eend $?
+
+ eend ${?}
}
reload() {
+ local a
+
checkkernel || return 1
checkrules || return 1
+
ebegin "Flushing firewall"
- local a
- for a in $(cat ${iptables_proc}) ; do
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
+
+ for a in $( cat "${iptables_proc}" ) ; do
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
done
+
eend $?
start
@@ -100,8 +120,10 @@ reload() {
checkrules() {
ebegin "Checking rules"
- ${iptables_bin}-restore --test ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"
- eend $?
+
+ "${iptables_bin}-restore" --test ${SAVE_RESTORE_OPTIONS:-} < "${iptables_save}"
+
+ eend ${?}
}
check() {
@@ -111,25 +133,31 @@ check() {
save() {
ebegin "Saving ${iptables_name} state"
- checkpath -q -d "$(dirname "${iptables_save}")"
+
+ checkpath -q -d "$( dirname "${iptables_save}" )"
checkpath -q -m 0600 -f "${iptables_save}"
- ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}"
- eend $?
+ "${iptables_bin}-save" ${SAVE_RESTORE_OPTIONS:-} > "${iptables_save}"
+
+ eend ${?}
}
panic() {
+ local a
+
checkkernel || return 1
- if service_started ${iptables_name}; then
- rc-service ${iptables_name} stop
+
+ if service_started "${iptables_name}"; then
+ rc-service "${iptables_name}" stop
fi
- local a
ebegin "Dropping all packets"
- for a in $(cat ${iptables_proc}) ; do
- ${iptables_bin} -w -F -t $a
- ${iptables_bin} -w -X -t $a
- set_table_policy $a DROP
+ for a in $( cat "${iptables_proc}" ) ; do
+ "${iptables_bin}" -w -F -t "${a}"
+ "${iptables_bin}" -w -X -t "${a}"
+
+ set_table_policy "${a}" DROP
done
- eend $?
+
+ eend ${?}
}
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index fbffced2..69018f03 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -12,7 +12,7 @@ AUX dhcp-4.2.5-bindtodevice-inet6.patch 826 SHA256 482dea1517e3d7a22c0469908c41c
AUX dhcp-4.2.5-iproute2-path.patch 340 SHA256 a6c25d408ca1bac5180151ff2955807017c386c06fc162395dcd71040900f59b SHA512 4a5c4f3b1af93fa137d94fd860689919b83de5885198e48eb89678379a59a7c9d90f8a3f558ddf9d442130abb127a460928a85c0646c4ad0984827ccd9e08852 WHIRLPOOL d54ba0f4c3da34375ab0f1fa98368ad4ec4f6ff79a131638a3d6540a4c2fa62e83cb45f946518b114793ad8e868b6cef9ec9338a4930080623439e7692386d77
AUX dhcp-4.3.1-dhclient-resolvconf.patch 14574 SHA256 9f1d8d987e62679d246c70dbc5149090ce1c382b7256c003f2852dd6617a335b SHA512 0cad400e5517ad9b66fc9aa09b2455809205eeb686dce6c7cc4efb8ea655d8de436f47b91ccf8fbd2c4286ecbb2b9d761b7e60e72ab7456794f3028739d80efe WHIRLPOOL 3a021da8fd0069e668ea79d13e496f40976202dcdfa95e78ef3182a6aafa787cd1cafaaa99c1a8e3655f8d15e989d771173c8add54f93b4b332426cd5863e63f
AUX dhcpd.conf2 1165 SHA256 ff4271ad8c220943d136a1ac44b851cf42939aa25e1cb3e4e4d17484971651d5 SHA512 46981a5c1e16ea44152f10ae488fa90b839a7f2f8567e20c3324bcd3a9deb2c905dfdd057ee10c33bd807ee0915170d2d8794ab8fa76ef35a25ef8e23ef1d69a WHIRLPOOL 86a3a26ba96415991f1251c2c9e04fbddd7a6b761453b403e0a549c180055de93d2331de3c0d8d1e27fece752a8d2d3f345a25b973696060f1ec09531cbca16a
-AUX dhcpd.init5 4801 SHA256 7af765b86eb3ec7882058ff6dc199524c889ac45b556deb50549c7e0cb63dce5 SHA512 27c93386226ef923b9027e7cde777d8f5536787a23c4eab9e5b18faef8e17e5b47c05b40657bc9630193ad5f3dcaf7c58edc1529216c330f4bea73723afdf615 WHIRLPOOL be942285c39bd674bb0c0b3f8dd52ff77a518a99fdb0c7b450700706f9339dbaf0772f1200408123606882d14b1b6c5e0fb72bb32a526f7b6cf433456fff7b97
+AUX dhcpd.init5 4946 SHA256 4ccb10c88924ebff1495cbb5bcfffd539b33e525400891ee571e6ff82ac1119e SHA512 1fad1db7b46424e140de20a3f69514857622458bb4289b029b0869fee172cfe753b2462950cd64e5ffd1113c20ce72c61e7707cd8644eb43d969bf60ef1c79bf WHIRLPOOL 78de655019969ab2c2320551a1b81ca8578d1c5c8c409239e10a7d2a2291e058ed3809d25ac3b0049ce46e18279871e135d39e61678568352ce815e0c03b70a2
AUX dhcpd.tmpfiles 75 SHA256 bb344a11fadedaec33ba3c504cc04adba34b15aeb07a640dab6da255de97728a SHA512 0c34ab0ef8618e6792ba8bda797877ce2e6c4fa433b4944dbc03cc4fc69efe26ce4b5e4dec661fbb2b7ae4173d908de02f4e86f8539364789a23f36cfd8edacb WHIRLPOOL fd4450a697cfbdca4db49eb433c7f67e7a9051541f4ab6e2633659435a504b051aad6338257ece4e5fc950c46f9fa7d5c5820f750440325fc62cae79dff2cfb0
AUX dhcpd4.service 264 SHA256 174e1a7dab5b23bbbd73a9fe16d3907923c21d2802c51dc1096c9e24bfa9fda3 SHA512 e340311fb890c5fc2f5836cc8d10ea3e4bb34bb5e96e7231798e7d960f05886478bf28305828fbd851080baadafe7d3fd2c7f30a81dcbc68d6368e8b4bd0de71 WHIRLPOOL 121ed7c50b179a7d09f53c758e5d44cd9e91451ca7b577d9b058d8097473df421715018986c314d633a599541d422cbda276831ba8c192c2a8762608fc5f2a3b
AUX dhcpd6.service 270 SHA256 82efa0887779b8c0f5c33ab77274ff9617f8cca0f59816e0e9425e368f1a1824 SHA512 2898f0dfa56ecb590c25a1f0e44446a83d1d9118e691c9a7680250a9e47f4dec2b36195dbda8259292d93a31bf0e1230b9f39ad93f2b0a9280e8cc4d77b50bae WHIRLPOOL 3040add013f776f1c91624c916456f68307321bd2e2cf69616ac2343743d65dfb9e940bffff089c0c45912d7498c666fcff77b4250ef3c533e1028270d9a4c55
diff --git a/net-misc/dhcp/files/dhcpd.init5 b/net-misc/dhcp/files/dhcpd.init5
index 20fc86a4..ecf45f14 100644
--- a/net-misc/dhcp/files/dhcpd.init5
+++ b/net-misc/dhcp/files/dhcpd.init5
@@ -13,8 +13,9 @@ depend() {
}
get_var() {
- local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")"
- echo ${var:-$2}
+ local var
+ var="$( sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}" )"
+ printf '%s' "${var:-${2}}"
}
setup_opts() {
@@ -33,16 +34,20 @@ setup_opts() {
}
checkconfig() {
+ local rc
+ declare -i rc
+
set -- ${DHCPD_OPTS} ${DHCPD_CHROOT:+-chroot "${DHCPD_CHROOT:-/}"} -t
- dhcpd "$@" 1>/dev/null 2>&1
- local ret=$?
- if [ ${ret} -ne 0 ] ; then
+ dhcpd "${@}" >/dev/null 2>&1
+ rc=${?}
+
+ if [ ${rc} -ne 0 ] ; then
eerror "${SVCNAME} has detected a syntax error in your configuration files:"
- dhcpd "$@"
+ dhcpd "${@}"
fi
- return ${ret}
+ return ${rc}
}
configtest() {
@@ -50,14 +55,14 @@ configtest() {
ebegin "Checking ${SVCNAME} configuration"
checkconfig
- eend $?
+ eend ${?}
}
start() {
- local chroot="${DHCPD_CHROOT:-}"
- local git=""
+ local chroot="${DHCPD_CHROOT:-}" git=""
setup_opts
+
if [ -n "${DHCPD_USE_GIT:-}" ] && [ "${DHCPD_USE_GIT}" != "0" ]; then
type -pf git >/dev/null 2>&1 && git="git"
fi
@@ -80,24 +85,30 @@ start() {
checkpath -d -o dhcp:dhcp "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp
- local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)"
+ local leasefile
+ leasefile="$( get_var 'lease-file-name' "/var/lib/dhcp/${SVCNAME}.leases" )"
checkpath -f -o dhcp:dhcp "${chroot}${leasefile}"
if [ -n "${chroot:-}" ] && [ -d "${chroot}" ] ; then
+ local lib name
+
ebegin "Populating chroot directory"
+
mkdir -p "${chroot}"/lib "${chroot}"/usr/sbin "${chroot}"/usr/lib
checkpath -d -o root:root -m 0755 "${chroot}"/usr "${chroot}"/usr/sbin
+
${git:-} rm "${chroot}"/lib/*.so* "${chroot}"/usr/lib/*.so* 2>/dev/null
cp -a /usr/sbin/dhcpd "${chroot}"/usr/sbin/
- for LIB in $( ldd /usr/sbin/dhcpd | grep '=>' | sed 's/^.*=>//' | cut -d" " -f 2 | grep -v "^$" ) /lib/libresolv.so.2 /lib/libnss_dns.so.2; do
- cp "$LIB" "${chroot}"/"$LIB" || { eerror "Cannot copy \"$LIB\" to \"${chroot}\"" ; return 1 ; }
+ for lib in $( ldd /usr/sbin/dhcpd | grep '=>' | sed 's/^.*=>//' | cut -d" " -f 2 | grep -v "^$" ) /lib/libresolv.so.2 /lib/libnss_dns.so.2; do
+ cp "${lib}" "${chroot}"/"${lib}" || { eerror "Cannot copy \"$lib\" to \"${chroot}\"" ; return 1 ; }
done
find "${chroot}"/lib -type l -delete
- for LIB in libresolv.so libnss_dns.so; do
- NAME="$( readlink -e /lib/"$LIB"* )"
- cp "$NAME" "${chroot}"/lib/ || { eerror "Cannot copy \"$LIB\" to \"${chroot}\"" ; return 1 ; }
- ln -s "$( basename "$NAME" )" "${chroot}"/lib/"$LIB" || { eerror "Cannot create \"$NAME\" symlink" ; return 1 ; }
+ for lib in libresolv.so libnss_dns.so; do
+ name="$( readlink -e /lib/"${lib}"* )"
+ cp "${name}" "${chroot}"/lib/ || { eerror "Cannot copy \"${lib}\" to \"${chroot}\"" ; return 1 ; }
+ ln -s "$( basename "${name}" )" "${chroot}"/lib/"${lib}" || { eerror "Cannot create \"${name}\" symlink" ; return 1 ; }
done
+
eend 0
checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc
@@ -130,40 +141,42 @@ start() {
fi
fi
- local pidfile="$(get_var pid-file-name /var/run/dhcp/${SVCNAME}.pid)"
+ local pidfile
+ pidfile="$( get_var 'pid-file-name' "/var/run/dhcp/${SVCNAME}.pid" )"
ebegin "Starting ${chroot:+chrooted }${SVCNAME}"
- start-stop-daemon --start --exec /usr/sbin/dhcpd \
- --pidfile "${chroot}/${pidfile}" \
- -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \
- -user dhcp -group dhcp \
- ${chroot:+-chroot "${chroot:-/}"} ${DHCPD_IFACE}
- eend ${?} &&
- {
- save_options dhcpd_chroot "${chroot}" &&
- save_options pidfile "${pidfile}"
- } ||
- {
- set -o xtrace
- /usr/sbin/dhcpd ${DHCPD_OPTS} -pf "${pidfile}" -lf "${leasefile}" -user dhcp -group dhcp ${chroot:+-chroot "${chroot:-/}"} ${DHCPD_IFACE}
- #set +o xtrace
- }
+ start-stop-daemon --start --pidfile "${chroot}/${pidfile}" \
+ --exec /usr/sbin/dhcpd -- ${DHCPD_OPTS} -q -pf "${pidfile}" \
+ -lf "${leasefile}" -user dhcp -group dhcp \
+ ${chroot:+-chroot "${chroot:-/}"} ${DHCPD_IFACE:-}
+ if eend ${?}; then
+ save_options 'dhcpd_chroot' "${chroot}" &&
+ save_options 'pidfile' "${pidfile}"
+ else
+ set -o xtrace
+ /usr/sbin/dhcpd ${DHCPD_OPTS} -pf "${pidfile}" -lf "${leasefile}" -user dhcp -group dhcp ${chroot:+-chroot "${chroot:-/}"} ${DHCPD_IFACE:-}
+ #set +o xtrace
+ fi
}
stop() {
- local chroot="$(get_options dhcpd_chroot)"
- [ -z "${chroot}" ] && chroot="$(get_options chroot)"
+ local chroot rc
+ declare -i rc
+
+ chroot="$( get_options 'dhcpd_chroot' )"
+ [ -z "${chroot:-}" ] && chroot="$( get_options 'chroot' )"
ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
+
start-stop-daemon --stop --exec /usr/sbin/dhcpd \
- --pidfile "${chroot}/$(get_options pidfile)"
- res=$?
+ --pidfile "${chroot}/$( get_options 'pidfile' )"
+ rc=${?}
- if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then
+ if [ ${rc} -eq 0 ] && [ -n "${chroot}" ] ; then
if mountinfo -q "${chroot}/proc" ; then
umount "${chroot}/proc"
fi
fi
- eend ${res}
+ eend ${rc}
}
diff --git a/net-misc/minidlna/Manifest b/net-misc/minidlna/Manifest
index cc40a6eb..8bca7df2 100644
--- a/net-misc/minidlna/Manifest
+++ b/net-misc/minidlna/Manifest
@@ -1,7 +1,7 @@
AUX minidlna-1.0.25.confd 313 SHA256 67603d65c6bd3918255f050cb5cfd6fc1373b024bca1ce728f03491a90d79e19 SHA512 e209848af0d79069ac989ad61d3be610b4c0c2783a207a50463a25ec3811b04d1da3a2acde54749878bec44e1567874ede827b978d5472c00f6a855663e5cbf8 WHIRLPOOL f749a75ee70cc63eb5221770a17b5df6deadc87f4258b8cb418478f09e92084fce0c3d815be83ec2205a88ac4c43e9a88df28f92fd7e9b093f42f2a858e2812e
-AUX minidlna-1.1.0-r3.initd 1233 SHA256 a43968690df0c3c5a6805fe430dce08dde1581b634d93d11314c3f45d439fc17 SHA512 ca938e90b0d80843981971f01167b846333a715989a296396608b07884e8cf9c10db48e02dc26d86cbf87f47289266f64b1dcb0c094bb56cbf052de23d56e9ae WHIRLPOOL 67eb763c62c6b6ea9fe76f1d1b7a75b3a1946d400dcc42289f94349a632be32219b9e45a6f2a7716d32bc82b6c192264c4862668467991c20e4e260935af4a7a
+AUX minidlna-1.1.0-r3.initd 1279 SHA256 a553b271237b255e3a954a40ee64674eb02b93fa5c5f93d5a85a265aed0b6257 SHA512 a9d6c68650069f78080f6f587b19f8c123d0cd618f8d473337a9fed3059c35da0d93bcef8e2b687d3ed38238524657a1bedef1160afcbd00de5f5ed9086a6ef1 WHIRLPOOL e4aeb51b552d2ac80494334f38960a25561908714d63582269f7ce405a45e38b6c08b87bfdb04913a21bebdf8832feabe690c02ab6250a93b3c079cf2661dd47
AUX minidlna-1.1.0-r3.service 291 SHA256 ae2bef5cb3a888ce6530136551d2b9f53ceecae3b227cbd02579974ef9ce710c SHA512 12bda630d52b6793067548e97f51e9a9d7722ec78f86f8e06d3968b702f22d7032875bd5265ed49639b58653300a729172d38a74cf1d59ef2ba085a1eb9274b1 WHIRLPOOL fac2513cb219a79fffa52fc37fda88af01bad96a456fb96fb69720058e8243e0de0845148a7fdd189d9bc81e1849661e35649d68273622ec75e555b3432fb7f1
-AUX minidlna-1.1.2.initd 1234 SHA256 11c8e98776a6b13198c868f78b52814ea0d6a1be02f4f6338f918a2d5668be58 SHA512 c134cfafbfe2106a1d3b6ffdddec73a69d2331033390e0da4e07dba7a201160759fbb23de13069290e5f81bf0b941e411a9696732e2d28cbf25c4b7d06cec2a7 WHIRLPOOL 01637178aee8190ac5402d13fe84f2d18b47c6b28527814e7c70a7c5856acfad01ca8a5b8200b5445bf800cc48269a650f8ccb8154fe96e24b9780ae9553927a
+AUX minidlna-1.1.2.initd 1280 SHA256 0208aa0248eb25c90e121c879a18d5960545e3bc8b77ba8e9ab06867ee921672 SHA512 c561392f88c932a8469782fd500528763ca5635b2f6af37d863d1166833fbfa313becee46670e424463f4debc51298d0444985d65bad384ac0b0dabefe4d065f WHIRLPOOL bdf1df44968907f67dafba99428362bd3cf592214ab64e6029c571bc7ffb34f635e9fe9833ead993b2a00ce4f035cac5c09d605d49ff586b9c7826d0223580e6
AUX minidlna-1.1.2.service 234 SHA256 47d56bfb45709bfe5e2341068f8a980c3881f1ceaed41c9c4a979670205f692a SHA512 3142906fc795d1435071f47b0ba424be2a112b8ce515756f18612fef751b95ef9bfa3cd60d83bf36ed80944738e8a56383ddff2a2ea09af1d9e800f6063736f0 WHIRLPOOL 2ace2c3f73c2f745217017e988899285f74b87882d6dd20ab878845cf4e88d3e5bda60ca203e48c67d9cf1cc459944d8a815eeff9ea94ce7c8737c17a766cd9f
DIST minidlna-1.1.0.tar.gz 423555 SHA256 c2ef2ebe4311d08a60a87ec0c86fbe5e7f4fd25b947841f1d71b0508c60a90e2 SHA512 9240d857fc3927c06183c04c4d657c1b2b0596f63dbc549f331b52032698349e82244870f2ebf6f8bc8bf0ff5f2ff88df69b53d280f5e5f9b618a5de58ac6f57 WHIRLPOOL 6c59fa9f4e05fcd0ca2a7fb23058edb5f86d32a93fbae6791f9224e18bba742997fe140082fadcd95b993041db3ef8c597e820d6fd21b3c873b6ac9db6f8688e
DIST minidlna-1.1.2.tar.gz 671295 SHA256 97e2e9141c1190d76ad97f0da083874bccf9f9590841be9eb7668bcf695b7204 SHA512 bfaf99dc5a59635c4cd10bcd9d2668736318b7840d97761fce96cfe78e00bb8e06ab23945126ba8d06d43fb99855ece7d2cd4f96c2c25a5b4f4a2c3697339e26 WHIRLPOOL c5b03d20992439e38b87eb160197f1ba5eff74bc133a280c01597ce06bd574dab6571daf5605b65b971dedd1a4d6af98423f6986b9b54d7168ad3a467e4fb58c
diff --git a/net-misc/minidlna/files/minidlna-1.1.0-r3.initd b/net-misc/minidlna/files/minidlna-1.1.0-r3.initd
index 9bb47766..4bd5a6d1 100644
--- a/net-misc/minidlna/files/minidlna-1.1.0-r3.initd
+++ b/net-misc/minidlna/files/minidlna-1.1.0-r3.initd
@@ -8,31 +8,33 @@ depend() {
}
start() {
- ebegin "Starting MiniDLNA"
- local params=""
- local stop=0
+ local params
+ local stop
+ declare -i stop
- checkpath -q -d -m 0755 -o ${M_USER:-minidlna}:${M_GROUP:-minidlna} /var/run/minidlna
+ ebegin "Starting MiniDLNA"
- params="$params -P /var/run/minidlna/minidlna.pid"
+ checkpath -q -d -m 0755 -o "${M_USER:-minidlna}:${M_GROUP:-minidlna}" '/var/run/minidlna'
- if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
- params="$params -R"
+ params='-P /var/run/minidlna/minidlna.pid'
+ if [ "${RESCAN}" = 'true' ] || [ "${RESCAN}" = 'yes' ]; then
+ params="${params} -R"
fi
- #set the config file and check if it exists
+ stop=0
+ # Set the config file and check if it exists
if [ -z "${CONFIG}" ]; then
- if [ ! -f "/etc/minidlna.conf" ]; then
+ if [ ! -f '/etc/minidlna.conf' ]; then
ewarn "You did not set the config file correctly"
stop=1
fi
- params="$params -f /etc/minidlna.conf"
+ params="${params} -f /etc/minidlna.conf"
else
if [ ! -f "${CONFIG}" ]; then
ewarn "The specified config file does not exist"
stop=1
fi
- params="$params -f ${CONFIG}"
+ params="${params} -f ${CONFIG}"
fi
@@ -40,14 +42,17 @@ start() {
eend 1
else
start-stop-daemon --start \
- --user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna} \
- --exec /usr/sbin/minidlnad -- ${params}
- eend $?
+ --user "${M_USER:-minidlna}" \
+ --group "${M_GROUP:-minidlna}" \
+ --exec '/usr/sbin/minidlnad' -- ${params}
+ eend ${?}
fi
}
stop() {
ebegin "Stopping MiniDLNA"
- start-stop-daemon --stop --quiet --exec /usr/sbin/minidlnad
- eend $?
+
+ start-stop-daemon --stop --quiet --exec '/usr/sbin/minidlnad'
+
+ eend ${?}
}
diff --git a/net-misc/minidlna/files/minidlna-1.1.2.initd b/net-misc/minidlna/files/minidlna-1.1.2.initd
index f5715bae..1c596b63 100644
--- a/net-misc/minidlna/files/minidlna-1.1.2.initd
+++ b/net-misc/minidlna/files/minidlna-1.1.2.initd
@@ -8,31 +8,33 @@ depend() {
}
start() {
- ebegin "Starting MiniDLNA"
- local params=""
- local stop=0
+ local params
+ local stop
+ declare -i stop
- checkpath -q -d -m 0755 -o ${M_USER:-minidlna}:${M_GROUP:-minidlna} /var/run/minidlna
+ ebegin "Starting MiniDLNA"
- params="$params -P /var/run/minidlna/minidlna.pid"
+ checkpath -q -d -m 0755 -o "${M_USER:-minidlna}:${M_GROUP:-minidlna}" '/var/run/minidlna'
- if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
- params="$params -R"
+ params='-P /var/run/minidlna/minidlna.pid'
+ if [ "${RESCAN}" = 'true' ] || [ "${RESCAN}" = 'yes' ]; then
+ params="${params} -R"
fi
- #set the config file and check if it exists
+ stop=0
+ # Set the config file and check if it exists
if [ -z "${CONFIG}" ]; then
- if [ ! -f "/etc/minidlna.conf" ]; then
+ if [ ! -f '/etc/minidlna.conf' ]; then
ewarn "You did not set the config file correctly"
stop=1
fi
- params="$params -f /etc/minidlna.conf"
+ params="${params} -f /etc/minidlna.conf"
else
if [ ! -f "${CONFIG}" ]; then
ewarn "The specified config file does not exist"
stop=1
fi
- params="$params -f ${CONFIG}"
+ params="${params} -f ${CONFIG}"
fi
@@ -40,14 +42,17 @@ start() {
eend 1
else
start-stop-daemon --start \
- --user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna} \
- --exec /usr/sbin/minidlnad -- ${params}
- eend $?
+ --user "${M_USER:-minidlna}" \
+ --group "${M_GROUP:-minidlna}" \
+ --exec '/usr/sbin/minidlnad' -- ${params}
+ eend ${?}
fi
}
stop() {
ebegin "Stopping MiniDLNA"
- start-stop-daemon --stop --quiet --exec /usr/sbin/minidlnad
- eend $?
+
+ start-stop-daemon --stop --quiet --exec '/usr/sbin/minidlnad'
+
+ eend ${?}
}
diff --git a/sys-apps/tmpfs/Manifest b/sys-apps/tmpfs/Manifest
index 137fb8f6..5cabcefc 100644
--- a/sys-apps/tmpfs/Manifest
+++ b/sys-apps/tmpfs/Manifest
@@ -1,4 +1,4 @@
AUX tmpfs.conf 2102 SHA256 4c973eb015791a1d2b61037cb072e173a4122104152ca8ffa7110fad4488bbf0 SHA512 4f9696e418ba0e90074714ab64a976163d49ba8b9b48c3cecb177630d25c144e226637bef8e2bad261952995fadb415092c96e84a60dd1cc6684af2186ecaf4f WHIRLPOOL 40b2cbce83e051f2fab32d55135cd106b8ade1035d4cf3c0c3d41f3914ede82e7467d8075f536008c0779e685eaf97481b449d91170325ed5aff18048d60bfae
-AUX tmpfs.init 12416 SHA256 817660a531a24059fda87b9c09c400a364a444a780371b23ff731455960fe3a0 SHA512 9aae4e7c4b69a87777850428b22fbdb59b8ac07507e9fe91f460a98e100e91521cfde5e24e29550907b20c9a7eedef2f6ae2be7143df146d74929eb26b8cf5a0 WHIRLPOOL 711707bdff88d87009d3aeb119a550082f4bcd630df056214989da36c1f3ac356a04a835314faed86266923f045778817bab0f6394d5f814c9b04eff1b338447
+AUX tmpfs.init 13537 SHA256 dc90371a714d3a918b87fd641a1aac55b0e3a371c4448a5097aa2ccf23b753af SHA512 a8e90300e6d3ea1366cde83358bfd9127926554124f9d11c4fef1720d7db597c41481bb5d9bf4af7d85d7183f0a091c5ceeaad219d2b9d069aa9a1b7b3db1955 WHIRLPOOL df37ea2967654aaafe64f8c316664794ab074177dda89e8e2f8b073cc6f0a4a09745e2f409799924c12c2d98688a38976796e1c3e29d484f84cb64b1cfca7d52
AUX tmpfs.stop 570 SHA256 9fbaaf6b6d1d057174826f55787055b4acc8edce2d08328b2bdf4d0e9608f7a6 SHA512 1fedb5d90995474919d032a629363ac7fd72d0978c76b27e9d418ad99916b7af810c0e37778298fcd5556fecb96ea730aeb5379b6d589a3b8653b5605c3a9cb3 WHIRLPOOL 75bf02227022c95c83244a8bdedc90c1d02a615d6d93529f2f9c5c0378a79786cdc275507bdd7b3f316c797547dac6c91eaa9e73e47c5d5f0fddf74692607ae4
EBUILD tmpfs-1.0-r1.ebuild 1914 SHA256 4377a2af064863db330bcfe00d05494a5b6270af2dbfb71d90752f1a2e4bb5dc SHA512 125e9cd3237a5225d6c0a188a7f84ba9e29f838971424a32ed210631f4d1d38ee00af2ef37a9f189f8eb662a5d983f2990b90751e609616535644dca07230602 WHIRLPOOL 248364631b8a8aa76ef4d059f83e6438c4d681c15fdd39e8b5c774acf8d6a305b59ebf63f60660528084ba014476dae09b9cd134a98f83237dcbe0c4fce98a32
diff --git a/sys-apps/tmpfs/files/tmpfs.init b/sys-apps/tmpfs/files/tmpfs.init
index b52f20f9..3d4235ee 100644
--- a/sys-apps/tmpfs/files/tmpfs.init
+++ b/sys-apps/tmpfs/files/tmpfs.init
@@ -2,95 +2,97 @@
# Copyright (c) 2010-2013 Stuart Shelton
# Distributed under the terms of the GNU General Public License v2
-source /etc/conf.d/tmpfs
-
extra_commands="forceunmount forceumount commit"
OVERLAY_ROOT=""
-mp=""
+MP=""
+
+getconf() {
+ local svc x val
+ svc="${1}" ; shift
-function getconf() {
- local svc="$1" ; shift
+ [ -n "${svc:-}" ] || return 255
- [[ -n "$svc" ]] || return 255
+ [ "${DEBUG:-0}" != "0" ] && einfo "DEBUG: svc is '${svc}'"
- (( DEBUG )) && einfo "DEBUG: svc is '$svc'"
+ x="OVERLAY_ROOT_${svc}"
+ val="$( eval echo "\$${x}" )"
+ if [ -n "${val:-}" ]; then
+ OVERLAY_ROOT="${val}"
- local x="OVERLAY_ROOT_${svc}"
- if [[ -n "${!x}" ]]; then
- OVERLAY_ROOT="${!x}"
x="${svc}_PATH"
- if [[ -n "${!x}" ]]; then
- mp="${!x}"
+ val="$( eval echo "\$${x}" )"
+ if [ -n "${val:-}" ]; then
+ MP="${val}"
fi
fi
- if (( DEBUG )); then
- einfo "DEBUG: OVERLAY_ROOT is \"$OVERLAY_ROOT\""
- einfo "DEBUG: mp is \"$mp\""
+ if [ "${DEBUG:-0}" != "0" ]; then
+ einfo "DEBUG: OVERLAY_ROOT is '${OVERLAY_ROOT}'"
+ einfo "DEBUG: MP is '${MP}'"
fi
- if ! [[ -n "${mp}" && -d "/${mp}" ]]; then
- eerror "Cannot find directory \"${mp}\""
+ if ! [ -n "${MP}" ] && [ -d "/${MP}" ]; then
+ eerror "Cannot find directory '${MP}'"
return 1
fi
} # getconf
-function movesvcmount() {
- local action="$1" ; shift
- local dir="$1"; shift
- local code
+movesvcmount() {
+ local action dir code
+ action="${1}" ; shift
+ dir="${1}"; shift
- [[ -n "$svcdir" ]] || return 255
+ [ -n "${svcdir:-}" ] || return 255
- [[ -n "$action" && "$action" =~ (save|restore) ]] || return 255
- [[ "restore" == "$action" ]] && { [[ -n "$dir" && -d "$dir" ]] || return 255 ; }
+ { [ -n "${action:-}" ] && echo "${action}" | grep -Eq '(save|restore)' ; } || return 255
+ [ 'restore' = "${action}" ] && { { [ -n "${dir}" ] && [ -d "${dir}" ] ; } || return 255 ; }
- # OpenRC provides $svcmount...
+ # OpenRC provides ${svcmount}...
- case "$action" in
+ case "${action}" in
save)
- [[ -n "$mp" ]] || return 255
- [[ -n "$svcmount" ]] || return 255
+ [ -n "${MP:-}" ] || return 255
+ [ -n "${svcmount:-}" ] || return 255
- if grep -q "var" <<<"${mp}"; then
- (( DEBUG )) && einfo "DEBUG: /\$mp is /var or below ..." >&2
- if [[ "$svcmount" == "yes" ]]; then
- ebegin "Moving \"$svcdir\" mount" >&2
+ if echo "${MP}" | grep -q 'var'; then
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: /\$MP is /var or below ..." >&2
+ if [ "${svcmount}" = "yes" ]; then
+ ebegin "Moving '${svcdir}' mount" >&2
tmpdir="$( mktemp --tmpdir -d )"
- code=$?
- if (( code )); then
- eend $code "Could not create temporary directory: $code" >&2
- return $code
+ code=${?}
+ if [ $(( code )) -ne 0 ]; then
+ eend ${code} "Could not create temporary directory: ${code}" >&2
+ return ${code}
fi
-
- mount --move "$svcdir" "$tmpdir"
- code=$?
- if (( code )); then
- eend $code "Move failed: $code" >&2
- rmdir "$tmpdir" 2>/dev/null
- return $code
+
+ mount --move "${svcdir}" "${tmpdir}"
+ code=${?}
+ if [ $(( code )) -ne 0 ]; then
+ eend ${code} "Move failed: ${code}" >&2
+ rmdir "${tmpdir}" 2>/dev/null
+ return ${code}
fi
-
+
eend
fi
fi
-
- echo "$tmpdir"
+
+ echo "${tmpdir}"
return 0
;;
restore)
- ebegin "Moving \"$svcdir\" mount" >&2
- mkdir -p "$svcdir" >/dev/null
- mount --move "$dir" "$svcdir"
- code=$?
- eend $code "Move failed: $code" >&2
+ ebegin "Moving '${svcdir}' mount" >&2
+ mkdir -p "${svcdir}" >/dev/null
+ mount --move "${dir}" "${svcdir}"
+ code=${?}
+ eend ${code} "Move failed: ${code}" >&2
- rmdir "$tmpdir" 2>/dev/null
+ rmdir "${tmpdir}" 2>/dev/null
- return $code
+ return ${code}
;;
*)
@@ -102,101 +104,100 @@ function movesvcmount() {
return 254
} # movesvcmount
-function unbindtmpfs() {
- local code=1
+unbindtmpfs() {
+ local code=1 pid
+ declare -i pid
- [[ -n "$OVERLAY_ROOT" ]] || return 255
- [[ -n "$mp" ]] || return 255
+ [ -n "${OVERLAY_ROOT}" ] || return 255
+ [ -n "${MP}" ] || return 255
- ebegin "Unmounting \"/${mp}\" (\"${OVERLAY_ROOT}/${mp}\")"
+ ebegin "Unmounting '/${MP}' ('${OVERLAY_ROOT}/${MP}')"
- (( DEBUG )) && einfo "DEBUG: Current mounts" && mount
- umount -f "/${mp}" >/dev/null 2>&1
- (( DEBUG )) && einfo "DEBUG: New mounts" && mount
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: Current mounts" && mount
+ umount -f "/${MP}" >/dev/null 2>&1
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: New mounts" && mount
- if ! mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
+ if ! mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
code=0
else
- if ! [[ -x "$( type -pf lsof )" ]]; then
+ if ! [ -x "$( command -v lsof )" ]; then
code=1
else
- ewarn "umount failed; attempting to kill tasks locking \"/${mp}\""
+ ewarn "umount failed; attempting to kill tasks locking '/${MP}'"
local count=0
- while [[ -n "$( lsof -Xt "/${mp}" )" ]] && (( count < 5 )); do
- for pid in $( lsof -Xt "/${mp}" ); do
- ps $pid >/dev/null && kill -TERM $pid && (( DEBUG )) && einfo "Sending TERM signal to PID $pid"
+ while [ -n "$( lsof -Xt "/${MP}" )" ] && [ $(( count )) -lt 5 ]; do
+ for pid in $( lsof -Xt "/${MP}" ); do
+ ps ${pid} >/dev/null && kill -TERM ${pid} && [ $(( DEBUG )) -ne 0 ] && einfo "Sending TERM signal to PID ${pid}"
done
sleep 0.5
- (( count++ ))
+ : $(( count = count + 1 ))
done
count=0
- while [[ -n "$( lsof -Xt "/${mp}" )" ]] && (( count < 3 )); do
- for pid in $( lsof -Xt "/${mp}" ); do
- ps $pid >/dev/null && kill -KILL $pid && (( DEBUG )) && einfo "Sending KILL signal to PID $pid"
+ while [ -n "$( lsof -Xt "/${MP}" )" ] && [ $(( count )) -lt 3 ]; do
+ for pid in $( lsof -Xt "/${MP}" ); do
+ ps ${pid} >/dev/null && kill -KILL ${pid} && [ $(( DEBUG )) -ne 0 ] && einfo "Sending KILL signal to PID ${pid}"
done
sleep 1
- (( count++ ))
+ : $(( count = count + 1 ))
done
- umount -f "/${mp}" >/dev/null 2>&1
+ umount -f "/${MP}" >/dev/null 2>&1
- if mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
+ if mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
code=1
else
code=0
fi
fi
fi
- eend $code "umount failed: $code"
+ eend ${code} "umount failed: ${code}"
- return $code
+ return ${code}
} # unbindtmpfs
-function restoredata() {
- local destination="$1" ; shift
- local message="to" code=1
+restoredata() {
+ local destination="${1}" ; shift
+ local message="to" options="" code=1
- [[ -n "$OVERLAY_ROOT" ]] || return 255
- [[ -n "$mp" ]] || return 255
+ [ -n "${OVERLAY_ROOT}" ] || return 255
+ [ -n "${MP}" ] || return 255
- if [[ -z "$destination" ]]; then
- destination="/${mp}"
+ if [ -z "${destination}" ]; then
+ destination="/${MP}"
message="back to"
fi
- if ! [[ -d "${OVERLAY_ROOT}/${mp}" ]]; then
- eerror "\"${OVERLAY_ROOT}/${mp}\" does not exist or is not mounted"
- (( DEBUG )) && einfo "\"${OVERLAY_ROOT}/\" contains:" && ls -lAR "${OVERLAY_ROOT}/"
+ if ! [ -d "${OVERLAY_ROOT}/${MP}" ]; then
+ eerror "'${OVERLAY_ROOT}/${MP}' does not exist or is not mounted"
+ [ $(( DEBUG )) -ne 0 ] && einfo "'${OVERLAY_ROOT}/' contains:" && ls -lAR "${OVERLAY_ROOT}/"
code=1
else
# We won't process EXCLUDEs here - we always
# want to back-up *everything*...
- if [[ -x "$( type -pf rsync )" ]]; then
- ebegin "Synchronising \"${OVERLAY_ROOT}\" ${message} \"${destination}\""
- local options=""
- (( DEBUG )) && options="-vvn" || options="-q"
- rsync $options -caHAXSx --super --delete --delete-before "${OVERLAY_ROOT}/${mp}/" "${destination}/"
- eend $? "rsync failed: $?"
+ if [ -x "$( command -v rsync )" ]; then
+ ebegin "Synchronising '${OVERLAY_ROOT}' ${message} '${destination}'"
+ [ $(( DEBUG )) -ne 0 ] && options="-vvn" || options="-q"
+ rsync ${options} -caHAXSx --super --delete --delete-before "${OVERLAY_ROOT}/${MP}/" "${destination}/"
+ eend ${?} "rsync failed: ${?}"
else
- ebegin "Copying \"${OVERLAY_ROOT}\" ${message} \"${destination}\""
+ ebegin "Copying '${OVERLAY_ROOT}' ${message} '${destination}'"
mv "${destination}" "${destination}.old"
- local options=""
- (( DEBUG )) && options="-v"
- cp $options -ax --sparse=always "${OVERLAY_ROOT}/${mp}/" "${destination}"
- local code=$?
- eend $code "File-copy failed: $code"
+ [ $(( DEBUG )) -ne 0 ] && options="-v"
+ cp ${options} -ax --sparse=always "${OVERLAY_ROOT}/${MP}/" "${destination}"
+ code=${?}
+ eend ${code} "File-copy failed: ${code}"
- if (( code )); then
+ if [ $(( code )) -ne 0 ]; then
rm -rf "${destination}.old"
else
rm -rf "${destination}"
@@ -206,145 +207,151 @@ function restoredata() {
code=0
fi
- return $code
+ return ${code}
} # restoredata
depend() {
- local mp="${SVCNAME#*.}"
+ local mp="${SVCNAME#*.}" x svc
- config /etc/conf.d/tmpfs
+ . /etc/conf.d/tmpfs
before bootmisc
before logger
- #after localmount
need localmount
- source /etc/conf.d/tmpfs
-
- local x="RC_NEED_${mp}"
- [[ -n ${!x} ]] && need ${!x}
- local x="RC_USE_${mp}"
- [[ -n ${!x} ]] && use ${!x}
- local x="RC_AFTER_${mp}"
- [[ -n ${!x} ]] && after ${!x}
+ x="RC_NEED_${mp}"
+ svc="$( eval echo "\$${x}" )"
+ [ -n "${svc}" ] && need "${svc}"
+ x="RC_USE_${mp}"
+ svc="$( eval echo "\$${x}" )"
+ [ -n "${svc}" ] && use "${svc}"
+ x="RC_AFTER_${mp}"
+ svc="$( eval echo "\$${x}" )"
+ [ -n "${svc}" ] && after "${svc}"
}
start() {
case "${SVCNAME}" in
tmpfs)
- eerror "$SVCNAME is not meant to be called directly"
+ eerror "${SVCNAME} is not meant to be called directly"
return 1
;;
*)
- local exclude="" fstab="" fs="" fsmp="" fstype="" fsopt="" code=1
+ local x svc exclude="" fstab="" fs="" fsmp="" fstype="" fsopt="" code=1
- local x="${SVCNAME#*.}_EXCLUDE"
- if [[ -n "${!x}" ]]; then
- exclude="${!x}"
+ x="${SVCNAME#*.}_EXCLUDE"
+ svc="$( eval echo "\$${x}" )"
+ if [ -n "${svc}" ]; then
+ exclude="${svc}"
fi
x="${SVCNAME#*.}_FSTAB"
- if [[ -n "${!x}" ]]; then
- fstab="${!x}"
- if [[ -n "$fstab" ]]; then
- fs="$( cut -d' ' -f 1 <<<"$fstab" )"
- fsmp="$( cut -d' ' -f 2 <<<"$fstab" )"
- fstype="$( cut -d' ' -f 3 <<<"$fstab" )"
- fsopt="$( cut -d' ' -f 4 <<<"$fstab" )"
- if [[ -n "$fs" && -n "$fsmp" && -n "$fstype" ]]; then
- if ! mount | grep -q "^$fs on $fsmp type $fstype "; then
- ebegin "Mounting '$fs' on $fsmp"
- if [[ -n "$fsopt" ]]; then
- mount -t "$fstype" "$fs" "$fsmp" -o "$fsopt"
+ svc="$( eval echo "\$${x}" )"
+ if [ -n "${svc}" ]; then
+ fstab="${svc}"
+ if [ -n "${fstab}" ]; then
+ fs="$( printf '%s' "${fstab}" | cut -d' ' -f 1 )"
+ fsmp="$( printf '%s' "${fstab}" | cut -d' ' -f 2 )"
+ fstype="$( printf '%s' "${fstab}" | cut -d' ' -f 3 )"
+ fsopt="$( printf '%s' "${fstab}" | cut -d' ' -f 4 )"
+ if [ -n "${fs}" ] && [ -n "${fsmp}" ] && [ -n "${fstype}" ]; then
+ if ! mount | grep -q "^${fs} on ${fsmp} type ${fstype} "; then
+ ebegin "Mounting '${fs}' on ${fsmp}"
+ if [ -n "${fsopt}" ]; then
+ mount -t "${fstype}" "${fs}" "${fsmp}" -o "${fsopt}"
else
- mount -t "$fstype" "$fs" "$fsmp"
+ mount -t "${fstype}" "${fs}" "${fsmp}"
fi
- eend $?
+ eend ${?}
fi
fi
fi
fi
unset fsopt fstype fsmp fs fstab
- getconf "${SVCNAME#*.}" || return $?
+ getconf "${SVCNAME#*.}" || return ${?}
- if mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
- eerror "\"/${mp}\" is already mounted! "
+ if mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
+ eerror "'/${MP}' is already mounted! "
return 1
fi
- if ! [[ -d "${OVERLAY_ROOT}" ]]; then
- eerror "\"${OVERLAY_ROOT}\" does not exist or is not mounted"
+ if ! [ -d "${OVERLAY_ROOT}" ]; then
+ eerror "'${OVERLAY_ROOT}' does not exist or is not mounted"
else
- ebegin "Remounting \"/$mp\" to tmpfs"
+ ebegin "Remounting '/$MP' to tmpfs"
eindent
- if [[ -d "${OVERLAY_ROOT}/${mp}.old" ]]; then
- rm -rf "${OVERLAY_ROOT}/${mp}.old"
+ if [ -d "${OVERLAY_ROOT}/${MP}.old" ]; then
+ rm -rf "${OVERLAY_ROOT}/${MP}.old"
fi
- local tmpdir="$( movesvcmount save )"
- local movesvcdir=$?
+ local tmpdir movesvcdir
+ declare -i movesvcdir
- ebegin "Mirroring \"/${mp}\" to \"${OVERLAY_ROOT}\""
+ tmpdir="$( movesvcmount save )"
+ movesvcdir=${?}
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: movesvcdir is ${movesvcdir}"
- if [[ -x "$( type -pf rsync )" ]]; then
- if [[ -n "$exclude" ]]; then
+ ebegin "Mirroring '/${MP}' to '${OVERLAY_ROOT}'"
+
+ if [ -x "$( command -v rsync )" ]; then
+ if [ -n "${exclude}" ]; then
local element
for element in ${exclude}; do
- options="$options --exclude $element"
+ options="${options} --exclude ${element}"
done
unset element
fi
- if (( DEBUG )); then
- options="-vvn $options"
- einfo "Additional options are '$options'"
+ if [ $(( DEBUG )) -ne 0 ]; then
+ options="-vvn ${options}"
+ einfo "Additional options are '${options}'"
else
- options="-q $options"
+ options="-q ${options}"
fi
- mkdir -p "${OVERLAY_ROOT}/${mp}/"
- rsync -caHAXSx --super --delete --delete-before $options "/${mp}/" "${OVERLAY_ROOT}/${mp}/"
- code=$?
- eend $code "rsync failed: $code"
+ mkdir -p "${OVERLAY_ROOT}/${MP}/"
+ rsync -caHAXSx --super --delete --delete-before ${options} "/${MP}/" "${OVERLAY_ROOT}/${MP}/"
+ code=${?}
+ eend ${code} "rsync failed: ${code}"
else
- if [[ -d "${OVERLAY_ROOT}/${mp}" ]]; then
- mv "${OVERLAY_ROOT}/${mp}" "${OVERLAY_ROOT}/${mp}.old"
+ if [ -d "${OVERLAY_ROOT}/${MP}" ]; then
+ mv "${OVERLAY_ROOT}/${MP}" "${OVERLAY_ROOT}/${MP}.old"
fi
local options=""
- (( DEBUG )) && options="-v"
- cp $options -ax --sparse=always "/${mp}/" "${OVERLAY_ROOT}/${mp}"
- code=$?
- if [[ -n "$exclude" ]]; then
+ [ $(( DEBUG )) -ne 0 ] && options="-v"
+ cp ${options} -ax --sparse=always "/${MP}/" "${OVERLAY_ROOT}/${MP}"
+ code=${?}
+ if [ -n "${exclude}" ]; then
local element
for element in ${exclude}; do
# This is safe, as we've copied the original
# directory out of the way just above...
- if [[ -d "${OVERLAY_ROOT}/${mp}/${element#/}" ]]; then
- rm -r "${OVERLAY_ROOT}/${mp}/${element#/}"/* 2>/dev/null
- elif [[ -e "${OVERLAY_ROOT}/${mp}/${element#/}" ]]; then
- rm -r "${OVERLAY_ROOT}/${mp}/${element#/}" 2>/dev/null
+ if [ -d "${OVERLAY_ROOT}/${MP}/${element#/}" ]; then
+ rm -r "${OVERLAY_ROOT:?}/${MP:?}/${element#/}"/* 2>/dev/null
+ elif [ -e "${OVERLAY_ROOT}/${MP}/${element#/}" ]; then
+ rm -r "${OVERLAY_ROOT:?}/${MP:?}/${element#/}" 2>/dev/null
fi
done
unset element
fi
- eend $code "File-copy failed: $code"
+ eend ${code} "File-copy failed: ${code}"
fi
- if ! (( code )); then
- ebegin "Mounting \"${OVERLAY_ROOT}/${mp}\" on \"/${mp}\""
- mount --rbind "${OVERLAY_ROOT}/${mp}/" "/${mp}"
- code=$?
- eend $code "Mount failed: $code"
+ if ! [ $(( code )) -ne 0 ]; then
+ ebegin "Mounting '${OVERLAY_ROOT}/${MP}' on '/${MP}'"
+ mount --rbind "${OVERLAY_ROOT}/${MP}/" "/${MP}"
+ code=${?}
+ eend ${code} "Mount failed: ${code}"
fi
- if (( movesvcdir )); then
- movesvcmount restore "$tmpdir"
- code=$?
+ if [ $(( movesvcdir )) -ne 0 ]; then
+ movesvcmount restore "${tmpdir}"
+ code=${?}
fi
- if ! (( code )); then
- if [[ -n "$( lsof -Xt "/${mp}" )" ]]; then
- ebegin "Sending HUP signal to all processes using /${mp}"
- kill -HUP $( lsof -Xt "/${mp}" )
+ if ! [ $(( code )) -ne 0 ]; then
+ if [ -n "$( lsof -Xt "/${MP}" )" ]; then
+ ebegin "Sending HUP signal to all processes using /${MP}"
+ kill -HUP $( lsof -Xt "/${MP}" )
eend
fi
fi
@@ -353,7 +360,7 @@ start() {
eend
fi
- return $code
+ return ${code}
;;
esac
}
@@ -363,71 +370,80 @@ stop() {
case "${SVCNAME}" in
tmpfs)
- eerror "$SVCNAME is not meant to be called directly"
+ eerror "${SVCNAME} is not meant to be called directly"
return 1
;;
*)
- local code=1 pid
+ local code=1 pid n
- getconf "${SVCNAME#*.}" || return $?
+ getconf "${SVCNAME#*.}" || return ${?}
- if ! mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
- eerror "\"/${mp}\" is not mounted from tmpfs! "
+ if ! mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
+ eerror "'/${MP}' is not mounted from tmpfs! "
return 1
fi
- ebegin "Restoring working-set from \"$OVERLAY_ROOT\" back to \"/$mp\""
+ ebegin "Restoring working-set from '${OVERLAY_ROOT}' back to '/$MP'"
eindent
sync
- local tmpdir="$( movesvcmount save )"
- local movesvcdir=$?
- (( DEBUG )) && einfo "DEBUG: movesvcdir is $movesvcdir"
+ local tmpdir movesvcdir
+ declare -i movesvcdir
+
+ tmpdir="$( movesvcmount save )"
+ movesvcdir=${?}
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: movesvcdir is ${movesvcdir}"
unbindtmpfs
- code=$?
+ code=${?}
# This is causing lock-ups on shutdown...
- #(( DEBUG )) && sleep 1 && [[ -d "${OVERLAY_ROOT}/${mp}" ]] && einfo "DEBUG: OVERLAY_ROOT/mp \"$OVERLAY_ROOT/$mp\" exists"
+ #[ $(( DEBUG )) -ne 0 ] && sleep 1 && [ -d "${OVERLAY_ROOT}/${MP}" ] && einfo "DEBUG: OVERLAY_ROOT/mp '${OVERLAY_ROOT}/$MP' exists"
sleep 0.1
- if ! (( code )); then
+ if ! [ $(( code )) -ne 0 ]; then
restoredata
- code=$?
+ code=${?}
fi
- if ! (( code )) && (( movesvcdir )); then
- movesvcmount restore "$tmpdir"
- code=$?
+ if ! [ $(( code )) -ne 0 ] && [ $(( movesvcdir )) -ne 0 ]; then
+ movesvcmount restore "${tmpdir}"
+ code=${?}
fi
- if (( code )) && ((movesvcdir )); then
- if [[ -w /proc/sysrq-trigger ]]; then
+ if [ $(( code )) -ne 0 ] && [ $((movesvcdir )) -ne 0 ]; then
+ if [ -w /proc/sysrq-trigger ]; then
ewarn "We were unable to remount the in-memory service directory"
- ewarn "to \"$svcdir\"."
+ ewarn "to '${svcdir}'."
eerror "This is very bad, and this machine must now be forcibly restarted ..."
- for (( n = 1 ; n <= 5 ; n++ )); do
- echo -ne "\a"
- sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null
- echo -ne "\a"
+
+ : $(( n = 1 ))
+ while [ $(( n < 6 )) -ne 0 ]; do
+ printf '%s' "\a"
+ sleep 0.1 >/dev/null 2>&1 || sleep 1 >/dev/null 2>&1
+ printf '%s' "\a"
sleep 1
+ : $(( n = n + 1 ))
done
- echo "sub" > /proc/sysrq-trigger
+
+ echo 's' > /proc/sysrq-trigger
+ echo 'u' > /proc/sysrq-trigger
+ echo 'b' > /proc/sysrq-trigger
fi
fi
eoutdent
- eend $code
+ eend ${code}
- return $code
+ return ${code}
;;
esac
}
forceunmount() {
- forceumount "$@"
+ forceumount "${@:-}"
}
forceumount() {
@@ -436,43 +452,46 @@ forceumount() {
case "${SVCNAME}" in
tmpfs)
- eerror "$SVCNAME is not meant to be called directly"
+ eerror "${SVCNAME} is not meant to be called directly"
return 1
;;
*)
local code=1 movesvcdir=0
- getconf "${SVCNAME#*.}" || return $?
+ getconf "${SVCNAME#*.}" || return ${?}
- ebegin "Unconditionally restoring working-set from \"$OVERLAY_ROOT\" back to \"/$mp\""
+ ebegin "Unconditionally restoring working-set from '${OVERLAY_ROOT}' back to '/$MP'"
eindent
- if ! mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
- einfo "\"/${mp}\" is not currently mounted from tmpfs! "
+ if ! mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
+ einfo "'/${MP}' is not currently mounted from tmpfs! "
code=0
else
- local tmpdir="$( movesvcmount save )"
- local movesvcdir=$?
- (( DEBUG )) && einfo "DEBUG: movesvcdir is $movesvcdir"
+ local tmpdir movesvcdir
+ declare -i movesvcdir
+
+ tmpdir="$( movesvcmount save )"
+ movesvcdir=${?}
+ [ $(( DEBUG )) -ne 0 ] && einfo "DEBUG: movesvcdir is ${movesvcdir}"
unbindtmpfs
- code=$?
+ code=${?}
fi
- if ! (( code )); then
+ if ! [ $(( code )) -ne 0 ]; then
restoredata
- code=$?
+ code=${?}
fi
- if (( movesvcdir )); then
- movesvcmount restore "$tmpdir"
- code=$?
+ if [ $(( movesvcdir )) -ne 0 ]; then
+ movesvcmount restore "${tmpdir}"
+ code=${?}
fi
eoutdent
- eend $code
+ eend ${code}
- return $code
+ return ${code}
;;
esac
}
@@ -480,73 +499,72 @@ forceumount() {
commit() {
case "${SVCNAME}" in
tmpfs)
- eerror "$SVCNAME is not meant to be called directly"
+ eerror "${SVCNAME} is not meant to be called directly"
return 1
;;
*)
local code=1 pid mounts mountpoint tmpdir subdir
- getconf "${SVCNAME#*.}" || return $?
+ getconf "${SVCNAME#*.}" || return ${?}
- if ! mount | grep -Eq " on /${mp} type (none|tmpfs) "; then
- eerror "\"/${mp}\" is not mounted from tmpfs! "
+ if ! mount | grep -Eq " on /${MP} type (none|tmpfs) "; then
+ eerror "'/${MP}' is not mounted from tmpfs! "
return 1
fi
- ebegin "Synchronising working-set from \"$OVERLAY_ROOT\" to \"/$mp\""
+ ebegin "Synchronising working-set from '${OVERLAY_ROOT}' to '/$MP'"
eindent
sync
mounts="$( grep -Ev "bind| (cgroup|debugfs|devpts|nfs|proc|rootfs|securityfs|sysfs|tmpfs) " /proc/mounts | cut -d' ' -f 2 )"
- # Walk up the directory tree to find where $mp is mounted upon
- mountpoint="/$mp"
- while [[ "$mountpoint" != "/" ]]; do
- if grep -oqw "$mountpoint" <<<"$mounts"; then
+ # Walk up the directory tree to find where ${MP} is mounted upon
+ mountpoint="/${MP}"
+ while [ "${mountpoint}" != "/" ]; do
+ if printf '%s' "${mounts}" | grep -oqw "${mountpoint}"; then
# We've found the relevant mountpoint
break
else
# Step back one...
- mountpoint="$( dirname "$mountpoint" )"
+ mountpoint="$( dirname "${mountpoint}" )"
fi
done
tmpdir="$( mktemp --tmpdir -d )"
- code=$?
- if (( code )); then
- eend $code "Could not create temporary directory: $code"
- return $code
+ code=${?}
+ if [ $(( code )) -ne 0 ]; then
+ eend ${code} "Could not create temporary directory: ${code}"
+ return ${code}
fi
- mount --bind "$mountpoint" "$tmpdir"
- code=$?
- if (( code )); then
- rmdir "$tmpdir" >/dev/null 2>&1
- eend $code "Could not mount filesystem '$mountpoint' on temporary directory: $code"
- return $code
+ mount --bind "${mountpoint}" "${tmpdir}"
+ code=${?}
+ if [ $(( code )) -ne 0 ]; then
+ rmdir "${tmpdir}" >/dev/null 2>&1
+ eend ${code} "Could not mount filesystem '${mountpoint}' on temporary directory: ${code}"
+ return ${code}
fi
- # Determine the path of $mp relative to its $mountpoint
- subdir="/$mp"
- subdir="${subdir#$mountpoint}"
+ # Determine the path of ${MP} relative to its ${mountpoint}
+ subdir="/${MP}"
+ subdir="${subdir#${mountpoint}}"
subdir="${subdir#/}"
- if ! [[ -d "$tmpdir"/"$subdir" ]]; then
- umount -f "$tmpdir" >/dev/null 2>&1
- rmdir "$tmpdir" >/dev/null 2>&1
- eend 1 "Unable to determine bind-mounted path for '/$mp' on '$tmpdir' (got '$tmpdir/$subdir')"
+ if ! [ -d "${tmpdir}"/"${subdir}" ]; then
+ umount -f "${tmpdir}" >/dev/null 2>&1
+ rmdir "${tmpdir}" >/dev/null 2>&1
+ eend 1 "Unable to determine bind-mounted path for '/${MP}' on '${tmpdir}' (got '${tmpdir}/${subdir}')"
return 1
fi
restoredata "${tmpdir}/${subdir}"
- umount -f "$tmpdir" >/dev/null 2>&1
- rmdir "$tmpdir" >/dev/null 2>&1
+ umount -f "${tmpdir}" >/dev/null 2>&1
+ rmdir "${tmpdir}" >/dev/null 2>&1
eoutdent
- eend $code
+ eend ${code}
- return $code
+ return ${code}
;;
esac
}
-
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 90410dbf..0a11bc3c 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -1,12 +1,12 @@
AUX 1.02.22-dmeventd.initd 536 SHA256 c9dcee15ce55961e5df7928c350ae1c6db6e78c30d87f7fafa6ba4b016dd9191 SHA512 6f5e1ff94c4a89224f30d76821820e8e08952c929418892be623afc8b57cbc2f4e78dc2a293e74ef4fbcc0cdd49ac986cf76eff689f0280c4b3d0c8b96483f0c WHIRLPOOL 0a4647eb42798f0281704a50fc4cf1b0e2e90f11bca2362ee67c8ee50971b4743881e049520519038271b8fd7d6f150ded942832f20cc3705f1d491f71810745
AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
-AUX clvmd.rc-2.02.39 3622 SHA256 dd5966eec36d17de627b2ae5940c8b8ac6b6a4a830eb77dbca7620a374e15a03 SHA512 5ba13ec5f77567a16b2f46eda517a5ff587e8c5af0aaef391a64b1bd693b9b8a7909a1dc1e72b21a4e1fcbb9f1a1678af78200066a7117cd14c36002e91a2238 WHIRLPOOL 1a467b975a39121430290f92a0daa97e9b6391f5dc544c1f4cb3ad23c583612abf03156babe52ce1dce6222330b77d200046dcfc51e51b954771123459907581
+AUX clvmd.rc-2.02.39 3835 SHA256 c7165eabaa63e2feee5dbb7931dbce43b59b65d5d4b7f9d69582bcacd2d3ccba SHA512 7caa4b86554f191153215b8f1d5de23d8b66c20d8bd91e0fd8704df193593dbdbb3b4dbc442d1bf077946a284826a7609fe49e92d307073b907beb7336dc8c51 WHIRLPOOL ee826f1b5a2a3c277fe96f799adcdec95f602e42d94eaa4da9422745c6eb7dc8e20fbf354bbd57d0421469e947265a60a0c14ce3e973604da63a66330e46b6a0
AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
AUX device-mapper.rc-1.02.51-r2 701 SHA256 dfdff0739dad521087ffa20f06e274bbc666e0ab85779621c360c04728e3cf58 SHA512 6b5c6dd96c1ec600969f39f2f90b1e2866be658a33383e6de1b6c9f81f5bcf6a4725b33ed0a5ba41de49ce5f3c970a328465e2f884502a9657c24fd2f563aff9 WHIRLPOOL 2474065a4a4ceb1747545146361536d7a0ca2eeb526856860c4ab150eebad092770e9aec5a9bd1bdf821b65b8a1d33111e44764a0a11633be7b8cb803829c115
-AUX device-mapper.rc-2.02.105-r2 3857 SHA256 aece0ff01cf3405428101e72384305348027d41e7f59f097d295e27b0f73c3d3 SHA512 1ea7785fa5c3c12b5a4768ceeea3ac5ea1063f7447f1ba449c9a7b781785f28fb41157fe764571e7462a5f34ff3000849606be4272499d9d35b3ff0b391cd5a5 WHIRLPOOL cbc33a2de8ef62e9116901253fea33900c8b3aab2c24e37a318259a9d68c06da2106f179a3e19710b35e6f51ff7382921eae6f523f1cc71b5ba747a0ee39ed03
+AUX device-mapper.rc-2.02.105-r2 3897 SHA256 90c9b0331b36f9bf84f4fdbbeeab138d6ff20e15241c62ada8df010e74295045 SHA512 28f5d5aa009a6d34fc40be4110d974db2cda6fbfd7adddf4353979cf63da28b36e9e998b753d5261aef9b4204a9c7ec2e6bb9e4723e7f9d39c16a07939d8c539 WHIRLPOOL 7c9b5af69215066060ead1ae0f10d041dd69688cae4f2de80e88999ae29a58f94aecca711d42033b0b4b0781114cfbac8c81c7a0da91ae31fd585149fe324b9e
AUX device-mapper.rc-2.02.67-r1 841 SHA256 18be4a227c786a8cdbbb0fb0f6da295db55359b91884b4d4e0e9976b80aa4003 SHA512 207853b607b25d07ec8c8421a44e1b663cd8ed2bea8179728c96b54778bebf372871e94b1a86a9f84ad31297660e5aa871bc7b925b83429a5978d966341f5bd5 WHIRLPOOL c4cc35d3d4998de5a3a3184d64bf5997c84f9573c67c1bf85db3e8103ed2542a7d240c1aa6d4d2be08a26cca7088102e0187fd0e1b4bd46a84339f23c5adb598
-AUX device-mapper.rc-2.02.95-r2 2866 SHA256 488d6bd6fe942ced6df746eb63ce975085306d9614ad610b88ffdc4933100353 SHA512 64dd7bc47e9e34a4d89f22d3eb0913336efc180cc15a7bc3298132de2108fddafcfc1a29811fe093aebe4330b0ea9c452991b22912fbf3ca91151e763fe34f05 WHIRLPOOL 39bdb472afd402ef3c8705a9af0c78fbabc797b623a28dc8b950e3814ba404c53e7e4ac33527cbdeefa1ee02991e94b92db86f84938b67214f96a6a75dd53c50
-AUX device-mapper.rc-2.02.97-r1 407 SHA256 ab06ac74d1eb9e4abb3c49a64721a282febe9d972ad0b5dccd956b8e9cec30f3 SHA512 904809e2152c2e84c2568c7610e0b006cecfbbe665bd8023b3fc5f778a5489f6048894e51bcb096dac9c6b5c13a1c2ff8b992bfe8f9bb859e52958866dcf38ef WHIRLPOOL a6241d055677e7282ae29dab864598cb0a17b0ef5ff48c0e7fee0a8b31544b5e5806199253d940cc847d98c609bce6407ec2e06410173619f5edaf46fe42bb55
+AUX device-mapper.rc-2.02.95-r2 2886 SHA256 7cf81f297ed1188e3c6de4ae23f84c17d8f25f27266231c3c3adc89952b63a76 SHA512 95751339f4dc5f2a9d3639c07f7943ddc8521a8699df88a6fcca0f36224a368e1a1b330750a4c76b1103b9eca307bc441435a7dd132ca8c6bfe22b821ee5ad68 WHIRLPOOL e5bc3ab9739c9f185d07c6e1250480a328dd10819d294001dcd47c1260cbe69bba974f8190d54ba95ef661a10ddac977de10889cebd9106fcf9f61eaa727ac9e
+AUX device-mapper.rc-2.02.97-r1 410 SHA256 5de1a4335ff3d187619cdb5d5717996ea568b5889b650728d0ca9516c3178dde SHA512 76f0a2a67dc75c8a43b55df2574e930bc1a5bbfd6479c3c4222c775c5f8a470edf9f5ad73c42fe576d6e68437e6dd8133d0e532194d4def50ee1862c7702caa3 WHIRLPOOL ff79a39160552fc67ae3b700a0807057eea32ad2382721f078d9a3de98091b88c49d073dc1089e8b18335a201d6e04544362569cd3233ccc50e1e9ab37141b13
AUX dm-start.sh 2114 SHA256 c064c3e2a1d128a6326b539a675f1a6cf88b75f5526222e232d53ea1468a9bcf SHA512 cd38c155e953a2c462bc76aeda349c579bfebd3ed1f33b3440585ef0c730fb40f3b13a1b335e558b9f2005551ea45426eea749cc1182f64e3cee1065e8550376 WHIRLPOOL ced2896b64b6b9c744ffc1f92195f3c2ed7cde9eb885b193161ead57d707d21ffb1ea3004bf1618cd2f48ed931314272b934d294859301d4fefbae00133073e0
AUX dm-start.sh-2.02.97-r1 3649 SHA256 6196902839078bf333b962503f1a9ca0323a21f5c5dd874a6ab9d8e0db7898fe SHA512 0fdde360183d45770b30fa3d4918507825428576183717d60e81bcfe1fdf157e52c5dfa6cfc97fa435afe76034e040886407a40cec7defcf933433cb45de7b47 WHIRLPOOL e3b6d045995735d0cb67f6e5d71ff8227f9afad4c183e85d86a0d470fa9fb20f4dca163e4492de69e331c213cc90b14d14d241273c6b1fe7e432e0d002c2f157
AUX dmeventd.initd-2.02.67-r1 638 SHA256 4af923a2e5fc596ba51e550f3c39d954b47521caa19f914f602042bd798dcee0 SHA512 0a02252e9647e2b66ce722537f44bcd62e2f239e652eb270f5ad6146d67de1066ff159f805e38ab58f39b05276839ca9c06c5370d87a403be6e697ef5ff8ea18 WHIRLPOOL b44febed7ba1ed282c375dec4b36222dec151fba38a5f8e27ac7c08080a7c346c73fceb58ee7a02386e885aca53ccd0c5e10d80086351f0945b7cdea74e3e76d
@@ -17,12 +17,12 @@ AUX lvm-monitoring.initd-2.02.67-r2 1219 SHA256 1a136b004eda4aafa99bd7f3dd477f08
AUX lvm-monitoring.initd-2.02.97-r1 1122 SHA256 316c8c903ef7a727ae52e400e2ceec833b25e4a87a09ab0da773b0323fb7ca76 SHA512 1c69d53e4f33866d2d5013e092c421f13f9187035dbd69b5abca806bff1e5ca4aa5e6119425cb072670e7b2857e801090c6cae50e5641f15bb136d0740d7ea0e WHIRLPOOL 08b8af4dff85b3aef22183711f1d7bc1af86d25110ccbab1257834c507f8fb8c366f2ab5333a904ff2e8d1efdcf14e985ad4edf0b63d27c96950806638d1ccaa
AUX lvm.conf-2.02.67.patch 1676 SHA256 0d36c4de0503739d822b3103a62dc0110febc3c56cd25d04443b30f54da6d0cb SHA512 59cb4a4625a7a18ec81b10f4b70a1632cf608d30b1fd827cc7a97692ab3cbbe2e0108001952f5002f1ffe6b354be7b96430e5ce86ed183885afdd1b5f0aa76e4 WHIRLPOOL 71c42b80f390de73b116dbe4808b44559196175465126393128b87826248ac5a34d79c4f64647d6b4541288ae4d25669168120ce8889deb08bfb7919dde249ed
AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
-AUX lvm.rc-2.02.105-r2 3315 SHA256 1949b74bf81ff75e386c5115c3431a45fe0ec901f80e7376ff48e39acfed1237 SHA512 5969e49cf25a134c8a3fc404b5891b439ebad93c5ee04c566807395c102525988f07b597f10e9cf7d57a2d7d5320bea9f498a7bc39dd17e6cf582f8bce5302dc WHIRLPOOL 916ff33226aede6760d74ec811b38049b7e6879ae4c0f58922d27867a4b2881b4438c8c639d94b5f004fcfd45451ed3eb41c9b823f1b440a26c72cb6c715cf25
-AUX lvm.rc-2.02.109 509 SHA256 d6864f9d8dce1b447a6d3cf428b1d9c20e3388fbc013c2689c301fc6c31060c5 SHA512 3bf9538d371d1b1daa3a2385b0111ef27f31b58bee3753d884c21f003763d326d994c5ffc0ab2ecda85211c2b76b8be468dad13fb0761a8c9cc69a90cb0ffc78 WHIRLPOOL b20ff9a752cfd5d481e8071f4c5eae42d74727d4bec9051642baef61a13b0e9b788a59ca44891b15a0e694717aae551ea05c90d88b0c69510f3da9060547ee43
+AUX lvm.rc-2.02.105-r2 3542 SHA256 72370b4f655ac63825047ec751f7cf7a98c9ce3a57314779830fe48b0a63fa96 SHA512 7b2a6930bea8ed2990377978ae0649891f7cce4d1f3c1c5d3bd5f960116a37aafcac89c3c5f7f1b3c20bbcb140cee9e85890834a9b1e3097b9f25f7ff157f16a WHIRLPOOL fdcb3cbbd005a398af2f4f20f8b98eeebcbc8d9fde78fdc9b1b700abde85c8faa59591ab9591c74e99590d7dfd12a5cd67c3724f8a032d029fcf672db83fe275
+AUX lvm.rc-2.02.109 504 SHA256 ffc6173e46c3a6d03b1936b26e9c45188dc00f9419d5e825092761c37d6186b5 SHA512 25e8ba181c8ed2480fba056719327a7efbf621990f3449ead4c3bc1918c4d383370b6a5aec34ee058cf55f1b8341cbad07191210a844be6709749c94863764ab WHIRLPOOL eb1d814d79035b22496aa4ddce568466e0040c515ae81b985d850b7a789f72a2946f27822295a2c79c703a6653f2069ebff796e9643be4a044c9995942c38558
AUX lvm.rc-2.02.51-r2 792 SHA256 b883e8ae1d3b9d8a0bdf85b009125e9408ee6d22a159b2e4c340fce455d5fd9f SHA512 da565deba09873acd962cbe4d1e18b6f685c00734404236f599eee4368e3cd73ca365af3680e2c4b8c3847deed8d001e3019b6cc116d93efb0171fc8c5740ebb WHIRLPOOL f496128dd7bcde8f711d4e3966b345390201bc0ab8b7420810ba29d40243568968250f23418da13919e5b7a5c23cd4279062db3c9d1582945daf768696be9d58
AUX lvm.rc-2.02.67-r1 918 SHA256 63e8e9cbfbed5124d31b365f0e8108822847ceb381143c9529d9bf5439f2a99a SHA512 b0429dc519300ee385c31309d055b7ac96e633bfbf1038be68018f67182de08c23e13e03fb567eaa68d48c9481f45853283d5a10502cece8e0629329059915bc WHIRLPOOL 1713f7108d42d8c2e60d4675cb503bfe84ad9bb40e84390e3a8463db91b8f133e4dc6b8d23c3e2156c7bf114b3a94154c0fc277d1a7242f389ef69b0ea9ca4da
AUX lvm.rc-2.02.95-r2 3015 SHA256 417079fbf1e673c6bfd097f1b293df982272099d389ad6716109c1529f690372 SHA512 19de2d4d1911800c5299600b4977ee34e6f11c3967e5b7f05377dbe4d5d1f3383582ef1130d70e86a936da5ac53ac3b5b3fee84e2dd9f308940a6cb59e7b6776 WHIRLPOOL 280ba11f900159da1b9568116387feddb49ba72dca9bfe2983fa8755f437a147333fdfb6f7e13d91953e7715268f2108fe1b682b6c5562caf12a2c9abd5d9783
-AUX lvm.rc-2.02.97-r1 493 SHA256 909851a490c8e191d560f2ab98e005897747c6e35b91f83ab4dbc541713fc741 SHA512 b1426860be21339a9796ad0d4f05a4d0aa3d891b0bdecb58980a1f270109629d5b1d376ecc1f7100427580edbdc41ec5f7db05bd7a6a05284599aeebfe054eb5 WHIRLPOOL 59dd30302656d8faf8338276133369eef1e9015b2f92f30cec5a540738a5eb6353f94c722e63e13930c142f9b0f1d02d87b53555057e71f0db0c1a6db77165a2
+AUX lvm.rc-2.02.97-r1 484 SHA256 b58e063f6e840e374efbe0853458df08aeb137dde468932fe16d6f20a3ca86de SHA512 ab7704cada5762bacb647b60d062ccaf361e124c84381f4fac475399eeb2d552faaf4acf5ac0156f7bc5b20aa1387f227d77ba6d948e1bddc44c6e8fb8ace6df WHIRLPOOL 70716cb819e19131d1f5aaf917729ac40a0fe90a2842d15b270bf2e62a98e50b48734fd36cfa6a02792b10163140458fe564dd4858a93edd66f465435bbff1d3
AUX lvm2-2.02.100-selinux_and_udev_static.patch 3223 SHA256 15c20b1e16443932c560164ad9546ab01279601b0f0dd7fdc54f9cf3cd3ffee3 SHA512 232dc2908073254e23878098734cc65449c7be0707f7f0f7e73561e7b204bf71cf75ff5ee143b0f9f301ddabac1595c59cb0ec80c665464e8fe3f1b65a3eb0c2 WHIRLPOOL fdd908aa01cc3790be4ff8e7b2180cd526065c826657924edfccdc53f5c2266a12911c1ebface9de649b1974ff77401e94a64de507b5c72415614e5726dd4a2a
AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
AUX lvm2-2.02.108-example.conf.in.patch 1681 SHA256 c9e0b46965f68c25495e21ca9504699031ed88dbb69407a08d53569ddc88ae4c SHA512 b4e983892b7ff47e5e7617376197daa62cfd063cf398235dc4a436fd9025ec4b1e263d7418e2c2943d53be494cba4209e9d4230d54a78762b0ca526f92e9746c WHIRLPOOL 0fc73d8e6f47596fa1789118aefebf931fb217342259da838d701bdeb96f21d7de59f29ac81c3c0f4a00db711e86b9fac6b4c889cf05ffc90ad8fd5a9ef77cd1
diff --git a/sys-fs/lvm2/files/clvmd.rc-2.02.39 b/sys-fs/lvm2/files/clvmd.rc-2.02.39
index a84612ce..5b6fa035 100644
--- a/sys-fs/lvm2/files/clvmd.rc-2.02.39
+++ b/sys-fs/lvm2/files/clvmd.rc-2.02.39
@@ -11,7 +11,7 @@
VGCHANGE="/sbin/vgchange"
VGSCAN="/sbin/vgscan"
VGDISPLAY="/sbin/vgdisplay"
-CLVMD_PIDFILE="/var/run/clvmd.pid"
+#CLVMD_PIDFILE="/var/run/clvmd.pid"
depend() {
use net dns logger dmeventd
@@ -20,51 +20,48 @@ depend() {
load_modules() {
local module modules
- modules=$1
-
+ modules="${1}"
+
for module in ${modules}; do
ebegin "Loading ${module} kernel module"
- modprobe ${module}
- eend $? "Failed to load ${module} kernel module"
+ modprobe "${module}"
+ eend ${?} "Failed to load ${module} kernel module"
done
}
unload_modules() {
local module modules
- modules=$1
-
+ modules="${1}"
+
for module in ${modules}; do
ebegin "Unloading ${module} kernel module"
- modprobe -r ${module}
- eend $? "Failed to unload ${module} kernel module"
+ modprobe -r "${module}"
+ eend ${?} "Failed to unload ${module} kernel module"
done
}
umount_gfs_filesystems() {
- local sig retry
- local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+ local sig retry remaining
+ remaining="$( awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r )"
- if [ -n "${remaining}" ]
- then
- sig=
+ if [ -n "${remaining}" ]; then
+ sig=''
retry=3
- while [ -n "${remaining}" -a "${retry}" -gt 0 ]
- do
- if [ "${retry}" -lt 3 ]
- then
+ while [ -n "${remaining}" ] && [ "${retry}" -gt 0 ]; do
+ if [ "${retry}" -lt 3 ]; then
ebegin "Unmounting GFS filesystems (retry)"
- umount ${remaining} &>/dev/null
- eend $? "Failed to unmount GFS filesystems this retry"
+ umount "${remaining}" >/dev/null 2>&1
+ eend ${?} "Failed to unmount GFS filesystems this retry"
else
ebegin "Unmounting GFS filesystems"
- umount ${remaining} &>/dev/null
- eend $? "Failed to unmount GFS filesystems"
+ umount "${remaining}" >/dev/null 2>&1
+ eend ${?} "Failed to unmount GFS filesystems"
fi
- remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
+ remaining="$( awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r )"
[ -z "${remaining}" ] && break
- /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ /bin/fuser -k -m "${sig}" "${remaining}" >/dev/null 2>&1
sleep 5
- retry=$((${retry} -1))
+ retry=$(( retry - 1 ))
sig=-9
done
fi
@@ -72,25 +69,27 @@ umount_gfs_filesystems() {
start_volumes() {
+ local ret clustervgs vg wait
+ declare -i wait
+
ebegin "Scanning LVM volumes"
- $VGSCAN > /dev/null 2>&1
- eend $?
+ "${VGSCAN}" >/dev/null 2>&1
+ eend ${?}
- ret=$?
- if [ "$ret" -eq 5 ]
- then
- einfo " Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
+ ret=${?}
+ if [ "${ret}" -eq 5 ]; then
+ einfo " Waiting for other nodes to join the cluster (${CLVMD_NODES_TIMEOUT} seconds)"
fi
- clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
- for vg in $clustervgs; do
+ clustervgs="$( "${VGDISPLAY}" 2>/dev/null | awk 'BEGIN { RS = "VG Name" } { if (/Clustered/) print $1 ; }' )"
+ for vg in ${clustervgs}; do
ebegin " Activating Clustered VG: ${vg} "
wait=0
- while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
- if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
+ while "${VGCHANGE}" -a y "${vg}" 2>&1 | grep -q 'clvmd not running'; do
+ if [ ${wait} -lt ${CLVMD_NODES_TIMEOUT} ]; then
sleep 3
- wait=$(($wait + 3))
+ wait=$(( wait + 3 ))
else
eend 1
fi
@@ -100,47 +99,50 @@ start_volumes() {
}
stop_volumes() {
+ local clustervgs vg
+
# Deactivate only clustered volumes
- clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
- for vg in $clustervgs; do
+ clustervgs="$( "${VGDISPLAY}" 2>/dev/null | awk 'BEGIN { RS = "VG Name" } {if (/Clustered/) print $1 ; }' )"
+ for vg in ${clustervgs}; do
ebegin " Shutting Down Clustered VG: ${vg} "
- $VGCHANGE -anl ${vg} >/dev/null
- eend $?
+ "${VGCHANGE}" -anl "${vg}" >/dev/null
+ eend ${?}
done
}
start() {
- local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
+ local module
+ module="$( awk '$1 == "dm_mod" { print $1 }' /proc/modules /proc/devices )"
if [ -z "${module}" ]; then
load_modules "dm-mod"
- sleep 1s
+ sleep 1
fi
- ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
+ ebegin "Starting clvmd (${CLVMD_CLUSTER_TIMEOUT} seconds)"
- start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
- eend $?
+ start-stop-daemon --start --quiet --exec "${CLVMD_BIN}" -- -T "${CLVMD_CLUSTER_TIMEOUT}"
+ eend ${?}
start_volumes
}
stop() {
-
# umount GFS filesystems
umount_gfs_filesystems
#stop_volumes
ebegin "Stopping clvmd"
- #start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
- killall -TERM ${CLVMD_BIN} >/dev/null
- eend $?
-
- #local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
-
- #if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
+ #start-stop-daemon --stop -s TERM --quiet --exec "${CLVMD_BIN}" --name clvmd
+ killall -TERM "${CLVMD_BIN}" >/dev/null
+ eend ${?}
+
+ #local module
+ #module="$( awk '$1 == "dm_mod" { print $1 }' /proc/modules )"
+ #
+ #if [ "$?" -eq 0 ] && [ ! -z "${module}" ]; then
# unload_modules "dm-mod"
#fi
}
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
index b6f3fc8f..e5ff8043 100644
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2
@@ -12,10 +12,12 @@ depend() {
dm_in_proc() {
local retval=0
+
for x in devices misc ; do
grep -qs 'device-mapper' /proc/${x}
- retval=$((${retval} + $?))
+ retval=$((retval + $?))
done
+
return ${retval}
}
@@ -23,28 +25,29 @@ dm_in_proc() {
#
# Returns complete dmsetup command given single volume name
build_dmsetup_command() {
- local count dmsetup_cmd
-
+ local count c dmsetup_cmd
+ declare -i count c
+
# Number of lines mentioning volume name
- count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1})
-
+ count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c "${1}")
+
# If there's just one line:
if [ ${count} -eq 1 ] ; then
echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}"
-
+ grep "${1}" | awk '{$1=""; print $0}') | /sbin/dmsetup create ${1}"
+
# For all cases with more lines:
elif [ ${count} -gt 1 ] ; then
for c in $( seq 1 ${count} ) ; do
if [ ${c} -eq 1 ] ; then
# Heavy escaping in awk-statement because we cannot use apostrophes
dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
+ grep "${1}" | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
else
# Append starting with newline
dmsetup_cmd="${dmsetup_cmd}\\\\n \
$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
+ grep "${1}" | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"
fi
done
echo "${dmsetup_cmd} | /sbin/dmsetup create ${1}"
@@ -63,7 +66,7 @@ get_new_dm_volumes() {
grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
awk '{ print $1 }' | \
uniq | \
- while read volume ; do
+ while read -r volume ; do
# If it exists, skip it
dmvolume_exists "${volume%:}" && continue
@@ -82,7 +85,7 @@ dmvolume_exists() {
[ -z "${volume}" ] && return 1
/sbin/dmsetup ls 2>/dev/null | \
- while read line ; do
+ while read -r line ; do
for x in ${line} ; do
# the following conditonal return only breaks out
# of the while loop, as it is running in a pipe.
@@ -94,7 +97,7 @@ dmvolume_exists() {
# if 1 was returned from the above loop, then indicate that
# volume exists
- [ $? = 1 ] && return 0
+ [ ${?} -eq 1 ] && return 0
# otherwise the loop exited normally and the volume does not
# exist
@@ -105,10 +108,10 @@ dmvolume_exists() {
#
# Return true if the volume exists in DM table, but is empty/non-valid
is_empty_dm_volume() {
- local table volume=$1
+ local volume="${1}"
set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
- [ "${volume}" = "$1" -a -z "$2" ]
+ [ "${volume}" = "${1}" ] && [ -z "${2}" ]
}
@@ -117,26 +120,26 @@ start() {
modprobe dm-mod 2>/dev/null
fi
# Ensure the dirs exist for locking and running
- if [[ -d /run ]]; then
+ if [ -d /run ]; then
checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
else
checkpath -q -d -m 0700 -o root:root /var/run/lvm /var/lock/lvm
fi
local x volume
-
- if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+
+ if [ -x /sbin/dmsetup ] && [ -c /dev/mapper/control ] && [ -f /etc/dmtab ] ; then
[ -n "$(get_new_dm_volumes)" ] && \
einfo " Setting up device-mapper volumes:"
-
+
get_new_dm_volumes | \
- while read x ; do
+ while read -r x ; do
[ -n "${x}" ] || continue
-
+
volume="${x##* }"
-
+
ebegin " Creating volume: ${volume}"
- if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then
+ if ! eval $(build_dmsetup_command "${volume}") >/dev/null 2>/dev/null ; then
eend 1 " Error creating volume: ${volume}"
# dmsetup still adds an empty volume in some cases,
# so lets remove it
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2 b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
index 82f97fdb..84a0f803 100644
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2
@@ -12,10 +12,12 @@ depend() {
dm_in_proc() {
local retval=0
+
for x in devices misc ; do
grep -qs 'device-mapper' /proc/${x}
- retval=$((${retval} + $?))
+ retval=$((retval + $?))
done
+
return ${retval}
}
@@ -27,7 +29,7 @@ get_new_dm_volumes() {
# Filter comments and blank lines
grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \
- while read volume params ; do
+ while read -r volume params ; do
# If it exists, skip it
dmvolume_exists "${volume%:}" && continue
# Assemble the command to run to create volume
@@ -46,7 +48,7 @@ dmvolume_exists() {
[ -z "${volume}" ] && return 1
/sbin/dmsetup ls 2>/dev/null | \
- while read line ; do
+ while read -r line ; do
for x in ${line} ; do
# the following conditonal return only breaks out
# of the while loop, as it is running in a pipe.
@@ -58,7 +60,7 @@ dmvolume_exists() {
# if 1 was returned from the above loop, then indicate that
# volume exists
- [ $? = 1 ] && return 0
+ [ ${?} -eq 1 ] && return 0
# otherwise the loop exited normally and the volume does not
# exist
@@ -69,10 +71,10 @@ dmvolume_exists() {
#
# Return true if the volume exists in DM table, but is empty/non-valid
is_empty_dm_volume() {
- local table volume=$1
+ local volume="${1}"
set -- $(/sbin/dmsetup table 2>/dev/null | grep -e "^${volume}:")
- [ "${volume}" = "$1" -a -z "$2" ]
+ [ "${volume}" = "${1}" ] && [ -z "${2}" ]
}
@@ -81,24 +83,24 @@ start() {
modprobe dm-mod 2>/dev/null
fi
# Ensure the dirs exist for locking and running
- if [[ -d /run ]]; then
+ if [ -d /run ]; then
checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm
else
checkpath -q -d -m 0700 -o root:root /var/run/lvm /var/lock/lvm
fi
local x volume
-
- if [ -x /sbin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then
+
+ if [ -x /sbin/dmsetup ] && [ -c /dev/mapper/control ] && [ -f /etc/dmtab ] ; then
[ -n "$(get_new_dm_volumes)" ] && \
einfo " Setting up device-mapper volumes:"
-
+
get_new_dm_volumes | \
- while read x ; do
+ while read -r x ; do
[ -n "${x}" ] || continue
-
+
volume="${x##* }"
-
+
ebegin " Creating volume: ${volume}"
if ! eval "${x}" >/dev/null 2>/dev/null ; then
eend 1 " Error creating volume: ${volume}"
diff --git a/sys-fs/lvm2/files/device-mapper.rc-2.02.97-r1 b/sys-fs/lvm2/files/device-mapper.rc-2.02.97-r1
index d66fa829..7f7bcc49 100644
--- a/sys-fs/lvm2/files/device-mapper.rc-2.02.97-r1
+++ b/sys-fs/lvm2/files/device-mapper.rc-2.02.97-r1
@@ -10,8 +10,9 @@ depend() {
start() {
local f="/lib/rcscripts/addons/dm-start.sh"
- if [[ -r "$f" ]]; then
- ( . "$f" )
+
+ if [ -r "${f}" ]; then
+ ( . "${f}" )
fi
}
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2 b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
index 2d600a65..18be54ee 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.105-r2
@@ -12,7 +12,8 @@ depend() {
dm_in_proc() {
local x
- local -i retval=0
+ local retval
+ declare -i retval=0
for x in devices misc ; do
grep -qs 'device-mapper' /proc/"${x}"
@@ -26,7 +27,7 @@ start() {
local lvm_path lvm_commands
local lvm_config
- if [[ -d /var/lock/lvm && -w /var/lock/lvm && ! -d /dev/.lvm ]]; then
+ if [ -d /var/lock/lvm ] && [ -w /var/lock/lvm ] && ! [ -d /dev/.lvm ]; then
export lvm_config='global { locking_dir = "/var/lock/lvm" }'
else
export lvm_config='global { locking_dir = "/dev/.lvm" }'
@@ -35,22 +36,22 @@ start() {
# LVM support for /usr, /home, /opt ....
# This should be done *before* checking local
# volumes, or they never get checked.
-
+
# NOTE: Add needed modules for LVM or RAID, etc.
# to /etc/modules.autoload if needed
for lvm_path in /bin/lvm /sbin/lvm ; do
- [[ -x "${lvm_path}" ]] && break
+ [ -x "${lvm_path}" ] && break
done
- if [[ ! -x "${lvm_path}" ]] ; then
+ if ! [ -x "${lvm_path}" ] ; then
eerror "Cannot find lvm binary in /sbin or /bin!"
return 1
fi
- if [[ -z "${CDBOOT}" ]] ; then
- if [[ -e /proc/modules ]] && ! dm_in_proc ; then
+ if [ -z "${CDBOOT}" ] ; then
+ if [ -e /proc/modules ] && ! dm_in_proc ; then
modprobe dm-mod 2>/dev/null
fi
- if [[ -d /proc/lvm ]] || dm_in_proc ; then
+ if [ -d /proc/lvm ] || dm_in_proc ; then
ebegin "Setting up Logical Volume Manager"
einfo "Using configuration directive '${lvm_config}'"
# Keep stderr, for debugging
@@ -72,31 +73,31 @@ stop() {
local lvm_path lvs vgs lvm_commands
local lvm_config
- if [[ -d /var/lock/lvm && -w /var/lock/lvm && ! -d /dev/.lvm ]]; then
+ if [ -d /var/lock/lvm ] && [ -w /var/lock/lvm ] && ! [ -d /dev/.lvm ]; then
export lvm_config='global { locking_dir = "/var/lock/lvm" }'
else
export lvm_config='global { locking_dir = "/dev/.lvm" }'
fi
for lvm_path in /bin/lvm /sbin/lvm ; do
- [[ -x "${lvm_path}" ]] && break
+ [ -x "${lvm_path}" ] && break
done
- if [[ ! -x "${lvm_path}" ]] ; then
+ if ! [ -x "${lvm_path}" ] ; then
eerror "Cannot find lvm binary in /sbin or /bin!"
return 1
fi
# Stop LVM2
- if [[ -x /sbin/vgs ]] &&
- [[ -x /sbin/vgchange ]] &&
- [[ -x /sbin/lvchange ]] &&
- [[ -f /etc/lvmtab || -d /etc/lvm ]] &&
- [[ -d /proc/lvm || -n "$( grep device-mapper /proc/misc 2>/dev/null )" ]]
+ if [ -x /sbin/vgs ] &&
+ [ -x /sbin/vgchange ] &&
+ [ -x /sbin/lvchange ] &&
+ [ -f /etc/lvmtab || -d /etc/lvm ] &&
+ [ -d /proc/lvm || -n "$( grep device-mapper /proc/misc 2>/dev/null )" ]
then
vgs=$($lvm_path vgs --config "${lvm_config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null | cut -d' ' -f 3-)
lvs=$($lvm_path lvs --config "${lvm_config}" -o vg_name,lv_name --noheadings --nosuffix 2> /dev/null | cut -d' ' -f 3- | sed 's| |/|')
- if [[ -n "${vgs}" ]] ; then
+ if [ -n "${vgs}" ] ; then
ebegin "Shutting down Logical Volume Manager"
einfo "Using configuration directive '${lvm_config}'"
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.109 b/sys-fs/lvm2/files/lvm.rc-2.02.109
index c0561c7e..ebd5c6d1 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.109
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.109
@@ -11,9 +11,10 @@ depend() {
}
run_addon() {
- local f=/lib/rcscripts/addons/$1.sh
- if [[ -r "$f" ]]; then
- ( . "$f" )
+ local f="/lib/rcscripts/addons/${1}.sh"
+
+ if [ -r "${f}" ]; then
+ ( . "${f}" )
fi
}
@@ -24,5 +25,3 @@ start() {
stop() {
run_addon lvm-stop
}
-
-# vim:ts=4
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.97-r1 b/sys-fs/lvm2/files/lvm.rc-2.02.97-r1
index d20ff2ce..7f051e11 100644
--- a/sys-fs/lvm2/files/lvm.rc-2.02.97-r1
+++ b/sys-fs/lvm2/files/lvm.rc-2.02.97-r1
@@ -11,8 +11,9 @@ depend() {
run_addon() {
local f="/lib/rcscripts/addons/${1}.sh"
- if [[ -r "$f" ]]; then
- ( . "$f" )
+
+ if [ -r "${f}" ]; then
+ ( . "${f}" )
fi
}
@@ -23,5 +24,3 @@ start() {
stop() {
run_addon lvm-stop
}
-
-# vim:ts=4
diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 71d35d4a..a64ddfaf 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -21,7 +21,7 @@ AUX mdadm.service 307 SHA256 fdb0c813eb72c85445269eab1182cd68c8d1ca0abfefb2ac966
AUX mdadm.tmpfiles.conf 30 SHA256 6382e48282297663adbe1b1db55c1554d27badd8ab0ee5a4d2e1bbf880f62af3 SHA512 65bf1a8ce3520f74e5ca2e8167b8da5cb3c9db2135385d3a76b0fc137af6f2fa4f9237effdd3d58f6e002cf016b38b364f780911c7abcb103127627c8de9409e WHIRLPOOL be5b287655d6587dc3088118e277950e4530e2df0ea1336924ea832ba1612773ff3f0bda60f9d5de1aee567e3e220d7a20fa5ca922efdfac6b9739ed345ad56e
AUX mdadm.weekly 187 SHA256 1234feb39795ebd03c53ca6f2d6496cf69c658890278d803ea40c86b841f898e SHA512 3bc7bf8c9593f06e42ae657e2bce416758090d1f999a447986df17b97e1494b261f02155b83932295f2f3bbab7d8933cf647c834bfb1d7def879cbedfaa6d7c2 WHIRLPOOL ff1b95deee1ee422f05aa438b498708bdb65754cd1158f371d1657f864ea0a52c62e5c93cbb4bfe98cedea23670a3a8b3fa4a04818975d80cf577d12318df7c7
AUX mdraid.confd 504 SHA256 45935632254fca9695e1da978279a26f075f8ab888cf7992b1c64a2a6f052b4a SHA512 8500bbc0ee0ee2d960f10c1ffa46791d23671181a358de7d0263d312111bf7049ec820036e20d038313e0af825db335f8a6762ae052f5fbb3b24c65a880526d7 WHIRLPOOL 6d91a932251f60c2beb1baffa083138e4452afa8570d915b193537b265db049ded5deae828f136ca57808595d62babe095fae43b1ec496f1b1907de2cee5cf12
-AUX mdraid.rc 4152 SHA256 b240873128470d90de264bcf52802a9d85ad9f804b3dd772208b70afb9db8dad SHA512 9445ba20718d79d0f4dda33282052155ce46f777fe0c5e0e8c5f65af948b64513e7cd089f15713ec8dd54932aae05da1b247956943acdaa139a0c8e6f5eb4bcb WHIRLPOOL 4a38d0995f55a07678c1757ee1385a2cd41fcbf7a0c769e790bdd29724a287517d30356a250ff1f6feb4f95e8d6f5439d386fcac7365b1d5ea3bfa460e986ab2
+AUX mdraid.rc 4235 SHA256 e80ccfdcd886a6a80e11886be50000fa22775f7a00da938ec3d881428ba590ff SHA512 995702cc2429f47fdc3c28f2dbb155f867ead4c0a7ffbbd2a1691f81a214dded950c7476d335442d7ac1697ecf0f7ccaa43fbe5cdabc12d0f2782435fa1f2b40 WHIRLPOOL 2bb5c664fecb713c60047dc87a59bfaabb9fb32c59180f10863500cfca4cc92b245f6784d0fb9577625b7bcf6bbed04a2af8e04f7808a6465a0d44d273b79953
AUX mdraid.rc-3.1.1 815 SHA256 95f759ba9d4f719bb5122546fdcce18dd9b0060df1296cf8ae17a04137e163e2 SHA512 4bf2235bdffde101d10c408de486e9629caf1eed3f574bf3ed206d7013e8a715016066069272d24894a4c428009003de4ee3d8291323e2aaae3157fbce4318ed WHIRLPOOL 65fed6723b508405ea67d4d5973a617b21c8b90ea480c69bc7da843718c16c98ed89a32013d102860c62fe0de8b8e8002180649e0176e303a887698baa7f053e
AUX raid-start.sh-3.0 4110 SHA256 809f66c15bbc9837942bcf966f23768e9ca78e248a88d237bbd4c992a82df6d1 SHA512 81bf358c2080a94d54f12de7e3b44cc19e2768781487b081edb9d6d4368cb561223bba31cc7ab7ccba935df2b15abb06c353e65892337b32a3d9ab93d144469a WHIRLPOOL 2a7305d43db4e3147c4e739069e5e7fc30e24fc364cd0e90f2fb044599c4f241e24c021191efc71746b75377b8722b78044f1b63d49000b2b2a633904f098eb8
AUX raid-stop.sh 645 SHA256 167a6bd452b5831cd5235eb80bf5f91bb2e5a10db132408fce29e60eb9d200db SHA512 8ee27e586dccf75bed3026f4beb42f429b53b0f11791122674122b90482010cd278c9d714a397bf1636617068e3e440c5fbc5babd89109f3c8e7a5a04dc82c05 WHIRLPOOL 14f76b1155299e7febd95e27e878e08997f4d57d5ef14e19b973a0917305617a47c242806399d17776e4d42885a199eec61dac8e0a12286f0ddf04f345283777
diff --git a/sys-fs/mdadm/files/mdraid.rc b/sys-fs/mdadm/files/mdraid.rc
index 9ddf7756..d18a7e8e 100644
--- a/sys-fs/mdadm/files/mdraid.rc
+++ b/sys-fs/mdadm/files/mdraid.rc
@@ -9,29 +9,29 @@ depend() {
}
start() {
- local mdadm_conf mdmod_conf mods devs mod dev timeout device node rc output
+ local mdadm_conf mdmod_conf mods mod dev timeout device node output # devs
+ declare -i timeout
mdadm_conf="/etc/mdadm/mdadm.conf"
mdmod_conf="/etc/mdadm/mdmod.conf"
- [ -e /etc/mdadm.conf -a ! -e "$mdadm_conf" ] && mdadm_conf="/etc/mdadm.conf"
- [ -e /etc/mdmod.conf -a ! -e "$mdmod_conf" ] && mdmod_conf="/etc/mdmod.conf"
+ [ -e /etc/mdadm.conf ] && [ ! -e "$mdadm_conf" ] && mdadm_conf="/etc/mdadm.conf"
+ [ -e /etc/mdmod.conf ] && [ ! -e "$mdmod_conf" ] && mdmod_conf="/etc/mdmod.conf"
- if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ]; then
- mods="$( awk '/^[[:space:]]*MODULE/ { print $2 }' "${mdadm_conf}" )"
- devs="$( awk '/^[[:space:]]*ARRAY/ { print $2 }' "${mdadm_conf}" )"
+ if [ -x /sbin/mdadm ] && [ -f "${mdadm_conf}" ]; then
+ mods="$( awk '/^\s*MODULE/ { print $2 }' "${mdadm_conf}" )"
+ #devs="$( awk '/^\s*ARRAY/ { print $2 }' "${mdadm_conf}" )"
if [ -n "${mods}" ]; then
for mod in ${mods}; do
- mod="$( echo "${mod}" | sed 's/-/_/g' )"
-
- if [ -z "$( lsmod | grep "${mod}" )" ]; then
+ if lsmod 2>&1 | grep -q "${mod//-/_}"; then
ebegin "Loading RAID driver ${mod}"
modprobe "${mod}"
- eend $? "Module load failed - storage array may be unavailable" || continue
+ eend ${?} "Module load failed - storage array may be unavailable" || continue
fi
- dev=$( egrep "^[[:space:]]*MODULE" "${mdmod_conf}" | \
- tr -s "[:space:]" | sed 's/^ //' | cut -d" " -f 3-
+ dev=$( grep "^\s*MODULE" "${mdmod_conf}" |
+ tr -s "[:space:]" | sed 's/^ //' |
+ cut -d" " -f 3-
)
#
@@ -40,13 +40,13 @@ start() {
#
timeout=50
- while test ${timeout} -gt 0 ; do
+ while [ ${timeout} -gt 0 ]; do
for device in ${dev}; do
[ -e "${device}" ] && break 2
done
- test ${timeout} -eq 50 && ewarn "Waiting for devices to become available ..."
- timeout=$( expr ${timeout} - 1 )
- sleep 0.1
+ [ ${timeout} -eq 50 ] && ewarn "Waiting for devices to become available ..."
+ timeout=$(( timeout - 1 ))
+ sleep 0.1 2>/dev/null || sleep 1
done
#
@@ -70,6 +70,11 @@ start() {
ios_module="as"
ios_queue="anticipatory"
;;
+ deadline)
+ ios_name="Deadline"
+ ios_module="deadline"
+ ios_queue="deadline"
+ ;;
cfq|fair)
ios_name="Completely Fair"
ios_module="cfq"
@@ -82,7 +87,7 @@ start() {
;;
esac
- ebegin "Loading $ios_name I/O scheduler"
+ ebegin "Loading ${ios_name} I/O scheduler"
modprobe "${ios_module}-iosched"
eend $?
@@ -95,15 +100,15 @@ start() {
[ "${device}" = "DEVICE" ] && continue
for node in /sys/block/"${device}"/queue/scheduler; do
- if [ -e "${node}" -a -n "$( grep -q "${ios_queue}" "${node}" >/dev/null 2>&1 )" ]; then
+ if [ -e "${node}" ] && grep -q "${ios_queue}" "${node}"; then
ebegin "Setting I/O scheduler for device '${device}'"
- echo -n "$ios_queue" > "${node}"
- eend $? "Cannot install $ios_queue scheduler"
+ printf "${ios_queue}" > "${node}"
+ eend $? "Cannot install ${ios_queue} scheduler"
fi
done
done
- if yesno ${ENABLENCQ}; then
+ if yesno "${ENABLENCQ}"; then
#
# Additionally, try to enble NCQ for increased performance.
# The libATA documentation says this should work...
@@ -120,9 +125,10 @@ start() {
if [ -w "${node}" ]; then
# Maximum depth should be 32, but 0xffffffff
# is the same value returned when a device is
- # hot-unplugged, so that value is masked.
+ # hot-unplugged, so that particular value is
+ # masked.
ebegin "Setting maximum NCQ depth for device '${device}'"
- ( echo -n "31" > "${node}" ) &>/dev/null
+ ( printf "31" > "${node}" ) >/dev/null 2>&1
eend $? "NCQ unavailable"
fi
done
@@ -131,7 +137,7 @@ start() {
fi
ebegin "Starting up RAID devices"
- output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1)
+ output="$( mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1 )"
eend $? "${output}"
local pat="/dev/md_d*"
@@ -154,6 +160,6 @@ stop() {
[ ! -e /etc/mdadm/mdadm.conf ] && [ ! -e /etc/mdadm.conf ] && return 0
ebegin "Shutting down RAID devices"
- output=$(mdadm -Ss 2>&1)
+ output="$( mdadm -Ss 2>&1 )"
eend $? "${output}"
}
diff --git a/www-apps/rpi-monitor/Manifest b/www-apps/rpi-monitor/Manifest
index aa70496a..7712d0ec 100644
--- a/www-apps/rpi-monitor/Manifest
+++ b/www-apps/rpi-monitor/Manifest
@@ -9,7 +9,7 @@ AUX gentoo.conf-2.10.patch 25733 SHA256 c9e676d92f45fa74c17935ddd48ae3aaf93b43ea
AUX memory.conf-2.10.patch 6038 SHA256 43401a9505bbb57ce73fde7fd40fc3130f009262813cad60c4f6daaab1623a9b SHA512 6a64abdb4c0762ade0b601acc7c2913afc0889c4575dbfac71f638bab3f103002b99869a8f766005070ac6374565b3c5bf9da0cf0fd7bc6fba1c661411a45be8 WHIRLPOOL 4e5e146b4fe01e4a4167c93776dd01839ca1b59c7f0d2bedd7e2156212afb2d2ce6526f6cb3b2695fefc8fb0857d176f8a9398d0bae3e90b3f6e99ecead8c18b
AUX network.conf-2.10.patch 3269 SHA256 9fe65c3e87bd8e070552a57b8635488880ee39fd848f23176ff102c2aa6171cc SHA512 cd1b16f7b82fb442c3ba026be07cccea658f3652b872b4fcf8c08451bc5c8e31ee1bc688ffb4ec265a0d127a25fca5b686ac4649ae83a7fd1fd44c3c675c5270 WHIRLPOOL 92c68dbc929427c0198f6ead6a23c8ea2994cf3aa80ec1ef14f29b59e08f739e86accfdcc2f5d9e2f07657c6550772e840c39fb9cf440cc8bcf3c9edf0513e8d
AUX rpimonitor.confd 110 SHA256 2aec673afcf21a82b9bcfd7f686ae418d7f8246d1cf376fa7341d589ddf9021e SHA512 32fd23d631abdb71e1e827be67b4a7777a7292763c1024bd3ee34a231ad8b3d612aba8c6e17478058c764cdf2311ea141d3424e88f88f522b1931e2d800b4037 WHIRLPOOL 055f8d240ec41fbd354e815dd1136f089d0d1a50737de5ae368c0ddc6d7dd67c4415d0be8fb610a6c8963d0fd94044eb95f424ba77170e4c9fbd7e63a1abdd0f
-AUX rpimonitor.initd 1000 SHA256 953133c57d684db0c05ab80c8d7ca688e850fc056dc88db5d55c34c46055039d SHA512 069c4cacf047626e008ee284861fd4473176c65ebed3bf91959a6e6a57115a4f7f371dcae52e6fb0adbd18fcea6aa74ddaae37ea8e4d4d7067137c7ea725fe87 WHIRLPOOL 335e27d0e13b5c99a4b7a89804e5b7440726b1babfacd66e6fd1ec7e876e38c222893557e779a15d3605e25407ae1020cf85df05dea0ecb67815b8da5500f3f5
+AUX rpimonitor.initd 1105 SHA256 e9c63eb3844ae9af76e9626c444f39fe5814b72a3b6fa02c70faaa3fff310934 SHA512 9dcaaece64f432f4b0e1d567d537aeb61081fe5925c2838fc249508d28438cde62415fcbb68c3765dd3252e1bdcbcf4dc0d1d60fbb6fd0e85c32a5670d273b46 WHIRLPOOL 061b5cbbbf45606a5d27a0d68591af30e8820238fed7536c648980be150d4e574f3f0ea32ac0266ec317a8010428f27c0c20eb9629d9918edd6b6640f6ed61e8
AUX rpimonitord-2.10.patch 729 SHA256 cc9edc717d59711fdfb695a881db7e349efc138c04e2c4275adad15a393170db SHA512 e335c8424427f060a7d6f97782805329934d02db0869d58c30b23975e098358ef15bdd632274278149ed64ddb01e8070142da1815bcf11841954179420fa0ae5 WHIRLPOOL 5664539a3a23621685612d2c0569fe47cda032215bb04f5549b5f4cfa48ef59109c72f8b6219fe53c2133ada6a0f5a37ef62d460ab88cc39cfda1be0744c63aa
AUX sdcard.conf-2.10.patch 5079 SHA256 d95b9b2bc402ca25257a7fdee0098c447edf98b5f1d0531d6ab7af596e10c48d SHA512 cf6cb263ce4358805b3afbd7472aeb0ac6dc7bf4933265d990a95347271f060073d54948134026e3e8d68ad69cb7b4148c77257ad45b2d24cef8b1aa3b2f919e WHIRLPOOL 4d4460e4d1aaf5c3482dd32147347994e63901b0efdf02138fae02da3f8fcf47501b25fb3682e1b247f0e8d6c77be425e6c5d76ffe96882206f159ab7c85c966
AUX swap.conf-2.10.patch 2681 SHA256 12ea6093dc2ccde4aa10840691d791a6a9dbe35047056f5945216b8b360f87ed SHA512 bdc048c68d31e7bed4e2a29821718a7e949e3bd05c88f19f74c57d6a4ebc9e0fd30307153b266e9803a81d3f4344af034ea046c46d6a38ead079730832c85834 WHIRLPOOL 0cd0ece2cc1d5c48f0769c48f44a59bd386ca602803142cc6fef3f92e75e3aca33abfd4a7e690acb5bcb87703bb6e91040d32b79e9b6a25878ac99b6272a71a0
diff --git a/www-apps/rpi-monitor/files/rpimonitor.initd b/www-apps/rpi-monitor/files/rpimonitor.initd
index 2006848a..2a69f049 100644
--- a/www-apps/rpi-monitor/files/rpimonitor.initd
+++ b/www-apps/rpi-monitor/files/rpimonitor.initd
@@ -3,37 +3,44 @@
# Distributed under the terms of the GNU General Public License v2
PERL="$( type -pf perl )"
-NAME=rpimonitord
-PIDFILE=/var/run/$NAME.pid
-DAEMON=/usr/sbin/$NAME
-DAEMON_ARGS="-b ${PIDFILE} ${CONFFILES:+${CONFFILES}}"
+NAME="rpimonitord"
+PIDFILE="/var/run/${NAME}.pid"
+DAEMON="/usr/sbin/${NAME}"
+DAEMON_ARGS="-b ${PIDFILE}${CONFFILES:+ ${CONFFILES}}"
depend() {
need net
}
start() {
- [[ -x "$PERL" ]] || { eerror "Cannot locate perl binary" ; return 1 ; }
+ if ! [ -x "${PERL}" ]; then
+ eerror "Cannot locate perl binary"
+ return 1
+ fi
ebegin "Starting RPi Monitor"
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PERL -- $DAEMON $DAEMON_ARGS
- eend $? "Unable to start RPi Monitor"
+ start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec "${PERL}" -- "${DAEMON}" ${DAEMON_ARGS}
+ eend ${?} "Unable to start RPi Monitor"
}
stop() {
- local pid pids rc
- [[ -r "$PIDFILE" ]] && pids="$( cat "$PIDFILE" )"
+ local pid pids
+ declare -i pid
ebegin "Stopping RPi Monitor"
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $PERL
- rc=$?
- [[ -n "$pids" ]] && for pid in $pids; do
- ps -o args= $pid | grep -q "${PIDFILE}$" && {
- eindent
- einfo "Sending HUP signal to child $pid ..."
- kill -HUP $pid
- eoutdent
- }
- done
- eend $rc "Unable to stop RPi Monitor"
+ if [ -r "${PIDFILE}" ]; then
+ pids="$( cat "${PIDFILE}" )"
+ if [ -n "${pids}" ]; then
+ for pid in ${pids}; do
+ if ps -o args= ${pid} | grep -q "${PIDFILE}$"; then
+ eindent
+ einfo "Sending HUP signal to child ${pid} ..."
+ kill -HUP ${pid}
+ eoutdent
+ fi
+ done
+ fi
+ fi
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile "${PIDFILE}" --exec "${PERL}"
+ eend ${?} "Unable to stop RPi Monitor"
}
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 94c104e0..9d43b180 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -8,7 +8,7 @@ AUX nvidia-drivers-346.16-pax-usercopy.patch 1928 SHA256 b39e737c87bec8b2d15ec7a
AUX nvidia-drivers-settings.desktop 193 SHA256 31c062449b8bcc8adcd3ee649d8aebf0bef502400bcbbbb46124217e1efb17a3 SHA512 fbb81d2520e9025fbffb2a8e7b3647f621ddc9d36c79d063d49e901286e8d1ea45de1274f42e33ff1aece5cebd547a42829d65b421db39d808947554b0f57453 WHIRLPOOL c797eb0ec1044ecaaa979ca5180f840d9c82c5c040dd81b2d86ca4afade9f0c006fb8951f04cc4d2b206110d38b339690386d291ff8f625a22b38178a3cd970b
AUX nvidia-persistenced.conf 250 SHA256 347437868119e8ae12852a574597936e855f534a9ad290fef3f62b4083a38516 SHA512 9c9562bb15bf4552754dd50a1b01dec5df76f7f5666fba2fff642a169f87e9ed421a260f2258ab469f7e4cd9ef8161653355795624387fe7ad5ae6a0d71e5f46 WHIRLPOOL 1422504c6688fce28719146c7d95fe196ca617556942e8dc04c7f8c1412fa80b5b8289c0f86b835eece90eed4b4017093d686779f88d44cd41fa3de1a10e9bbe
AUX nvidia-persistenced.init 699 SHA256 f6e8fbdadca060e03e55fd71dda898a786cf6b97b91299028fd48bd80a472069 SHA512 61bd1340d6d275e0c19c95c0a2f0880b411377fa966b77e63ad16951e54acd1870ae73f3e925e9a71a1f52167fc9a74e544edefbcad0da8fcc4262c1a784a055 WHIRLPOOL 9170850c5fe0d9641d09218df68ddb59af7b78058f144c14542dcb95fe962710c483e51b85b476cd5fe41b1294665b5d0fa6b3d7980d933d0af32a85e6aa4fa7
-AUX nvidia-smi.init 917 SHA256 b94bc7ba8afe1c0c6277682c34c8b97f7b6fe49864dee616e85066c7355746c8 SHA512 123f4ad1a66ee7282c1395418449a880656ca7fb58fda058a926f04b0646aefb12227340ae0a82e06e01e184495797bb98dc2ef7b5dedc0110e67a2000f8ed2b WHIRLPOOL 4a723566c2e07b3e6d9686d3f48d9ed8cae2f1e528b4a00307235ad051b944a2e63ab5e0f9793a98adcb91082e988760af81e2801438942453f3ed856ef8d1e3
+AUX nvidia-smi.init 919 SHA256 dc496c7a56708ebca62f6ea6aab3d43e9171770b86aa4eb6cb2ac09d1de361cb SHA512 3fb5c09d23243ac9fa4e9e7bef55f1d4b8ccbf23552609152de37a1b051d029456d3346a248b761df44a733d86f591a6f875cf0a321f9d3072379a028d665020 WHIRLPOOL a0b16ca0e7abe43b40dd241ba5741599f70c5420255c8eccf67c6302eb254c001dd50a713ee79e1ed67ea2cc31c0b83e2dd0b2b6edff60c391b0e291b6910740
AUX nvidia-udev.sh 185 SHA256 120c0af2b64fbcbd7032217a78eec8b104874c1ca68726367bce22c57944e07e SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e WHIRLPOOL cb9995029cdb2fe1bc7fe5ae54041ee5de8da86bf5eb3616d062475e56c44d436e1e66683ecddd986fc5bca5723d88da4b1a42f65f3cd7e15636928bd21fce14
AUX nvidia-udev.sh-r1 285 SHA256 5ca08a5329cccd9e32dd3cd573525f510edf7b12d8c531cbe781a70b2ceade63 SHA512 493b0d5f2698d299e3b8d5782ac7fb8174e7ee93f1dae66bc1161eb4dd16d4db91048444dc6e7bea344960936c0a5c825041f6909af004438d8009a3d3fe71c9 WHIRLPOOL 14c2d01d8280dc9c4afaacc75b8ef97875553b5ed50e6dba6209280ebea5cd9c607505870ee37d719530428a9f57034511cd080ba0ab3a1d831b767b4cd15305
AUX nvidia-uvm.conf 82 SHA256 4407c7ceed58ead98492560c07fc44d4285a70ed5165407f1b959e46d6e6d081 SHA512 cbdb946934a0b7c7d0fab0937ead0a161ff20238e0b53f9e05ea18a4fa0507df8d37594bd13402e3ec2001d488daeb2bec718d612f68202768d62a3cec97aacb WHIRLPOOL a79d65d67b0ff446bb2c65f5f3ec16ffaf0268ab0abbc137b413168aa7f5e617e502eaaf00fd21a149778bdd134da532b25bb066fc70bfa601caa97397aaf424
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-smi.init b/x11-drivers/nvidia-drivers/files/nvidia-smi.init
index e10b764b..96155610 100644
--- a/x11-drivers/nvidia-drivers/files/nvidia-smi.init
+++ b/x11-drivers/nvidia-drivers/files/nvidia-smi.init
@@ -11,21 +11,21 @@ depend() {
}
start_pre() {
- [[ -x /opt/bin/nvidia-smi ]] && /opt/bin/nvidia-smi -L >/dev/null 2>&1 && return 0
+ [ -x /opt/bin/nvidia-smi ] && /opt/bin/nvidia-smi -L >/dev/null 2>&1 && return 0
eerror "NVIDIA System Management Interface utility not installed or 'nvidia' kernel module not loadable"
return 1
}
start() {
ebegin "Starting NVIDIA System Management Interface"
- start-stop-daemon --start --quiet --pidfile ${pidfile} \
- --make-pidfile --background --exec /opt/bin/nvidia-smi -- \
- -q -l 300
+ start-stop-daemon --start --quiet \
+ --pidfile "${pidfile}" --make-pidfile --background \
+ --exec /opt/bin/nvidia-smi -- -q -l 300
eend $?
}
stop() {
ebegin "Stopping NVIDIA System Management Interface"
- start-stop-daemon --stop --quiet --pidfile ${pidfile}
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
eend $?
}