diff options
author | Deepti Kulkarni <deepti@vyatta.com> | 2012-04-16 05:00:06 -0700 |
---|---|---|
committer | Deepti Kulkarni <deepti@vyatta.com> | 2012-04-16 05:00:06 -0700 |
commit | d0010ebf6e814b6ef91ddb67a2748860108797fc (patch) | |
tree | 82073eef2c43ec097e5c5003d212cda9b4fcd4a0 /scripts | |
parent | f5102f6f21c9b7fa5dee7c537f8fe582bd53c379 (diff) | |
download | vyatta-op-d0010ebf6e814b6ef91ddb67a2748860108797fc.tar.gz vyatta-op-d0010ebf6e814b6ef91ddb67a2748860108797fc.zip |
bug 7985: fix regex for rename system image command
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/rename-image.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/rename-image.pl b/scripts/rename-image.pl index 6f3084c..2c77d70 100644 --- a/scripts/rename-image.pl +++ b/scripts/rename-image.pl @@ -39,7 +39,7 @@ GetOptions( ); if (!defined($old_name) || !defined($new_name)) { - printf("Must specify both old ane new name.\n"); + printf("Must specify both old and new name.\n"); exit 1; } @@ -109,10 +109,11 @@ open (my $grubfh, '<', "${image_path}/grub/grub.cfg") # my $line; while ($line = <$grubfh>) { - $line =~ s/\/boot\/$old_name/\/boot\/$new_name/g; - $line =~ s/Vyatta $old_name/Vyatta $new_name/; - $line =~ s/Vyatta image $old_name/Vyatta image $new_name/; - $line =~ s/Lost password change $old_name/Lost password change $new_name/; + $line =~ s/\/boot\/$old_name\//\/boot\/$new_name\//g; + $line =~ s/\/boot\/$old_name /\/boot\/$new_name /g; + $line =~ s/Vyatta $old_name /Vyatta $new_name /; + $line =~ s/Vyatta image $old_name /Vyatta image $new_name /; + $line =~ s/Lost password change $old_name /Lost password change $new_name /; printf($tmpfh $line); } |