From 7dbd61df3b2430bfec54672e4e7e48dfa0656c15 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 21 Nov 2003 18:53:51 +0000 Subject: allow formatting the virtual key with a commandline param, for easy mode-2 testing --- move/move.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'move/move.pm') 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"); -- cgit v1.2.1