aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-10-12 20:04:48 +0200
committerKarel Kočí <cynerd@email.cz>2017-10-12 20:04:48 +0200
commit74e973b7327bc7e7bdd8a9d8aafd88051dc5fd8b (patch)
treece2631ed03937ae3427d8c9bbba6e385a2728ed2
parent2fc8d93ef509f583f6977588c7b3fb2cf8ebd332 (diff)
downloadmyconfigs-74e973b7327bc7e7bdd8a9d8aafd88051dc5fd8b.tar.gz
myconfigs-74e973b7327bc7e7bdd8a9d8aafd88051dc5fd8b.tar.bz2
myconfigs-74e973b7327bc7e7bdd8a9d8aafd88051dc5fd8b.zip
Update some configurations
-rwxr-xr-xlocal/bin/usbkey4
-rw-r--r--shellrc6
2 files changed, 6 insertions, 4 deletions
diff --git a/local/bin/usbkey b/local/bin/usbkey
index bab47df..7e89dea 100755
--- a/local/bin/usbkey
+++ b/local/bin/usbkey
@@ -153,7 +153,7 @@ op_openvpn_get() {
fi
mkdir "openvpn-$NAME"
cp "$MOUNT_PATH/openvpn/$NAME.key" "openvpn-$NAME/"
- cp "$MOUNT_PATH/openvpn/$NAME.crl" "openvpn-$NAME/"
+ cp "$MOUNT_PATH/openvpn/$NAME.crt" "openvpn-$NAME/"
cp "$MOUNT_PATH/openvpn/ca.crt" "openvpn-$NAME/"
cp "$MOUNT_PATH/openvpn/ta.key" "openvpn-$NAME/"
@@ -170,7 +170,7 @@ op_openvpn_generate() {
(
cd "$MOUNT_PATH/openvpn"
# Build request
- openssl req -batch -days 3650 -nodes -new -config "openssl.cnf" \
+ openssl req -days 3650 -nodes -new -config "openssl.cnf" \
-keyout "$NAME.key" -out "$NAME.csr"
# Sign request
openssl ca -days 3650 -config "openssl.cnf" \
diff --git a/shellrc b/shellrc
index 10f6f2c..b26c8a8 100644
--- a/shellrc
+++ b/shellrc
@@ -15,6 +15,8 @@ else
alias make="make -j$(nproc)"
fi
alias ll='ls -lh'
+alias df='df -h'
+alias du='du -h'
alias grep='grep --color=auto'
alias git='LANG=en_GB git'
alias gdb='gdb -q'
@@ -51,8 +53,8 @@ fi
# Generate random password (optionally takes length of password as first argument)
genpasswd() {
local l=$1
- if [ "$l" = "" ]; then l=16; fi
- tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
+ [ -n "$l" ] || l=16
+ tr -dc A-Za-z0-9_ < /dev/urandom | head -c "$l" | xargs
}
# Clip stdin to clipboard