add blog entry
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Less OSC 8 handler.
|
||||
|
||||
echo() { printf %s\\n "$*"; }
|
||||
|
||||
# Open a link of the form "file://HOST/PATH" or "file:///PATH"
|
||||
open_file() {
|
||||
case $1 in
|
||||
file:///* | file://localhost/*)
|
||||
less -- "/${1#file://*/}"
|
||||
;;
|
||||
|
||||
file://*/*)
|
||||
linkhost=${1#file://}; linkhost=${linkhost%%/*}
|
||||
localhost=${HOSTNAME:-$(bash -c 'printf %s "$HOSTNAME"' || uname -n)} 2>/dev/null
|
||||
|
||||
case $localhost in
|
||||
*/* | '')
|
||||
echo "unable to detect local hostname: $localhost"
|
||||
exit 1
|
||||
;;
|
||||
"$linkhost")
|
||||
less -- "/${1#file://*/}"
|
||||
;;
|
||||
*)
|
||||
echo "cannot open remote file: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "invalid file link: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Open a link of the form "man:NAME" or "man:NAME(SECTION)".
|
||||
open_man() {
|
||||
case $1 in
|
||||
man:?*\(*\) )
|
||||
sect=${1#*\(}; sect=${sect%?}
|
||||
name=${1#man:}; name=${name%%\(*}
|
||||
man -- ${sect:+"$sect"} "$name"
|
||||
;;
|
||||
|
||||
man:?*)
|
||||
man -- "${1#man:}"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "invalid man link: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case $1 in
|
||||
file:*) open_file "$1" ;;
|
||||
man:*) open_man "$1" ;;
|
||||
*) echo "unsupported link type: $1"; exit 1 ;;
|
||||
esac
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is a placeholder designed to be replaced when this software
|
||||
# has been customized for distribution. It should be symlinked linked to the
|
||||
# distribution's update-ca-certificates or update-ca-trust command as
|
||||
# appropriate. In the future this script will be called when the PKCS#11
|
||||
# trust module is used to modify trust anchors and related data.
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
echo "usage: trust extract-compat" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
uid=$(id -u)
|
||||
if [ "$uid" != 0 ]; then
|
||||
echo "trust: running as non-root user: skip extracting compat bundles" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "trust: the placeholder extract-compat command has not been customized by your distribution." >&2
|
||||
|
||||
# You can use commands like this to extract data from trust modules
|
||||
# into appropriate locations for your distribution.
|
||||
#
|
||||
# trust extract --format=openssl-bundle --filter=ca-anchors \
|
||||
# --overwrite /tmp/openssl-bundle.pem
|
||||
# trust extract --format=pem-bundle --filter=ca-anchors --overwrite \
|
||||
# --purpose server-auth /tmp/server-auth-bundle.pem
|
||||
# trust extract --format=java-cacerts --filter=ca-anchors --overwrite \
|
||||
# --purpose server-auth /tmp/cacerts
|
||||
|
||||
exit 1
|
||||
Reference in New Issue
Block a user