258
258
fprintf(stderr, "%s ", prefix);
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";
261
const char *cryptsource = getenv("cryptsource");
262
const char *crypttarget = getenv("crypttarget");
263
const char *const prompt
264
= "Enter passphrase to unlock the disk";
272
265
if(cryptsource == NULL){
273
266
if(crypttarget == NULL){
274
fprintf(stderr, "%s to unlock the disk: ", prompt2);
267
fprintf(stderr, "%s: ", prompt);
276
fprintf(stderr, "%s (%s)\n%s: ", prompt1, crypttarget,
269
fprintf(stderr, "%s (%s): ", prompt, crypttarget);
280
272
if(crypttarget == NULL){
281
fprintf(stderr, "%s %s\n%s: ", prompt1, cryptsource,
273
fprintf(stderr, "%s %s: ", prompt, cryptsource);
284
fprintf(stderr, "%s %s (%s)\n%s: ", prompt1, cryptsource,
285
crypttarget, prompt2);
275
fprintf(stderr, "%s %s (%s): ", prompt, cryptsource,