258
258
fprintf(stderr, "%s ", prefix);
261
const char *cryptsource = getenv("cryptsource");
262
const char *crypttarget = getenv("crypttarget");
263
const char *const prompt
264
= "Enter passphrase to unlock the disk";
261
const char *cryptsource = getenv("CRYPTTAB_SOURCE");
262
const char *crypttarget = getenv("CRYPTTAB_NAME");
263
/* Before cryptsetup 1.1.0~rc2 */
264
if(cryptsource == NULL){
265
cryptsource = getenv("cryptsource");
267
if(crypttarget == NULL){
268
crypttarget = getenv("crypttarget");
270
const char *const prompt1 = "Unlocking the disk";
271
const char *const prompt2 = "Enter passphrase";
265
272
if(cryptsource == NULL){
266
273
if(crypttarget == NULL){
267
fprintf(stderr, "%s: ", prompt);
274
fprintf(stderr, "%s to unlock the disk: ", prompt2);
269
fprintf(stderr, "%s (%s): ", prompt, crypttarget);
276
fprintf(stderr, "%s (%s)\n%s: ", prompt1, crypttarget,
272
280
if(crypttarget == NULL){
273
fprintf(stderr, "%s %s: ", prompt, cryptsource);
281
fprintf(stderr, "%s %s\n%s: ", prompt1, cryptsource,
275
fprintf(stderr, "%s %s (%s): ", prompt, cryptsource,
284
fprintf(stderr, "%s %s (%s)\n%s: ", prompt1, cryptsource,
285
crypttarget, prompt2);