aboutsummaryrefslogtreecommitdiff
path: root/utils/syscheck
diff options
context:
space:
mode:
Diffstat (limited to 'utils/syscheck')
-rw-r--r--utils/syscheck28
1 files changed, 13 insertions, 15 deletions
diff --git a/utils/syscheck b/utils/syscheck
index a0c29a0..fcddae4 100644
--- a/utils/syscheck
+++ b/utils/syscheck
@@ -3,19 +3,19 @@
# Check that we are root (this tool can be run only as root)
# TODO uncomment
-# [ "$(id -u)" = "0" ] || echo_die "Distconfig have to be run as root."
+# [ "$(id -u)" = "0" ] || echo_die "Multiconfig have to be run as root."
-# We have sudo or su
-which sudo >/dev/null || which su >/dev/null || echo_die "There is no sudo or su command."
+# We have su
+which su >/dev/null || echo_die "There is no su command."
# Check that we are not using csh or tcsh
# Note: variable shell should be defined only on csh or tcsh (note lowercase)
-[ -z "$shell" ] || echo_die "Distconfig doesn't support csh nor tcsh."
+[ -z "$shell" ] || echo_die "Multiconfig doesn't support csh nor tcsh."
# Check that we have gpg
which gpg >/dev/null || echo_die "There is no gpg command."
-# Check that trunk is signed using correct key
+# Check that git trunk is signed using trusted key
# TODO
# Check root owner (should be root)
@@ -31,18 +31,16 @@ which openssl >/dev/null || echo_die "There is no openssl command."
# Check that we can decrypt using openssl and aes-192-cbc
OPENSSL_TEST_PASSWORD="XduF2T_opDknbzN0EyJJCBFyS1i6yaBU5Beb6IZkFVHWZGWOIZCF1Cc0zrupjEaV"
-[ "$(openssl aes-192-cbc -d -a -k "$OPENSSL_TEST_PASSWORD" < files/openssl_test_file)" = "It works!" ] || \
+[ "$(openssl aes-192-cbc -d -a -k "$OPENSSL_TEST_PASSWORD" -in files/openssl_test_file)" = "It works!" ] || \
echo_die "Test message couldn't been decrypted."
-# Check that we have key file
-[ -n "$KEY_FILE" ] || echo_die "No key specified. Please pass --key."
-
# Check that given key works with our machinery
-# TODO
+[ "$(catdecrypt files/encrypted_test)" = "It works!" ] || \
+ echo_die "Encryption machinery failed to decrypt test file"
# Check that we have internet connection
-DC_INTERNET=true
-if ! ping -c 5 -w 30 cynerd.cz >/dev/null; then
- echo_warn "No internet connection detected. All operations requiring internet connection will be skipped"
- DC_INTERNET=false
-fi
+#DC_INTERNET=true
+#if ! ping -c 5 -w 30 cynerd.cz >/dev/null; then
+# echo_warn "No internet connection detected. All operations requiring internet connection will be skipped"
+# DC_INTERNET=false
+#fi