我在https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html#Unattended-GPG-key-generation方法中发现无需用户交互即可生成 gpg 密钥,但它没有似乎工作。
我的脚本是:
#!/usr/bin/env bash
rm -rf .gnupg
mkdir -m 0700 .gnupg
touch .gnupg/gpg.conf
chmod 600 .gnupg/gpg.conf
tail -n +4 /usr/share/gnupg2/gpg-conf.skel > .gnupg/gpg.conf
touch .gnupg/{pub,sec}ring.gpg
cat >.gnupg/foo <<EOF
%echo Generating a basic OpenPGP key
Key-Type: RSA
Key-Length: 2048
Subkey-Type: RSA
Subkey-Length: 2048
Name-Real: User 1
Name-Comment: User 1
Name-Email: user@1.com
Expire-Date: 0
Passphrase: kljfhslfjkhsaljkhsdflgjkhsd
%pubring foo.pub
%secring foo.sec
# Do a commit here, so that we can later print "done" :-)
%commit
%echo done
EOF
gpg2 --verbose …
Run Code Online (Sandbox Code Playgroud) 我正在尝试测试 LVM,但我在第一个可能很简单的任务上失败了 - 创建快照。
我有以下情况:
root@debian:~# vgs
VG #PV #LV #SN Attr VSize VFree
big 1 1 0 wz--n- 14.99g 5.68g
fast 1 2 0 wz--n- 14.99g 4.75g
Run Code Online (Sandbox Code Playgroud)
和
root@debian:~# lvs
Internal error: Using string as sort value for numerical field.
Internal error: Using string as sort value for numerical field.
Internal error: Using string as sort value for numerical field.
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
home big -wi-ao-- 9.31g
root fast -wi-ao-- 9.31g …
Run Code Online (Sandbox Code Playgroud)