summaryrefslogtreecommitdiffstats
path: root/move/move.pm
diff options
context:
space:
mode:
Diffstat (limited to 'move/move.pm')
-rw-r--r--move/move.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/move/move.pm b/move/move.pm
index e432436fa..ac2142a8e 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -43,11 +43,12 @@ sub handle_etcfiles {
}
sub handle_virtual_key {
- if (my ($device, $file) = cat_('/proc/cmdline') =~ /\bvirtual_key=(\S+),(\S+)/) {
- log::l("using device=$device file=$file as a virtual key");
+ if (my ($device, $file, $options) = cat_('/proc/cmdline') =~ /\bvirtual_key=([^,\s]+),([^,\s]+)(,\S+)?/) {
+ log::l("using device=$device file=$file as a virtual key with options $options");
my $dir = '/virtual_key_mount';
mkdir $dir;
run_program::run('mount', $device, $dir);
+ $options =~ /format/ and run_program::run('mkdosfs', "$dir$file");
require devices;
my $loop = devices::find_free_loop();
run_program::run('losetup', $loop, "$dir$file");