浏览代码

Add dialog asking to continue with download

Bob Mottram 7 年前
父节点
当前提交
e7e69d4877
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11
    2
      src/freedombone-app-keyserver

+ 11
- 2
src/freedombone-app-keyserver 查看文件

@@ -182,11 +182,20 @@ function install_interactive_keyserver {
182 182
 }
183 183
 
184 184
 function keyserver_import_keys {
185
+    dialog --title $"Import public keys database" \
186
+           --backtitle $"Freedombone Control Panel" \
187
+           --defaultno \
188
+           --yesno $"\nThis will download multiple gigabytes of data and so will take a long time.\n\nContinue?" 10 60
189
+    sel=$?
190
+    case $sel in
191
+        1) return;;
192
+        255) return;;
193
+    esac
185 194
     if [ ! -d /var/lib/sks/dump ]; then
186 195
         mkdir -p /var/lib/sks/dump
187 196
     fi
188 197
     cd /var/lib/sks/dump
189
-    echo $'Getting keyserver dump. This may take a few hours, so be patient.'
198
+    echo $'Getting keyserver dump. This may take a few hours or longer, so be patient.'
190 199
     wget -crp -e robots=off --level=1 --cut-dirs=3 -nH \
191 200
          -A pgp,txt $KEYSERVER_DUMP_URL
192 201
 
@@ -203,7 +212,7 @@ function configure_interactive_keyserver {
203 212
         dialog --backtitle $"Freedombone Control Panel" \
204 213
                --title $"SKS Keyserver" \
205 214
                --radiolist $"Choose an operation:" 10 70 2 \
206
-               1 $"Import keys database" off \
215
+               1 $"Import public keys database" off \
207 216
                2 $"Exit" on 2> $data
208 217
         sel=$?
209 218
         case $sel in