summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTed Hess <thess@kitschensync.net>2018-06-05 10:05:35 -0400
committerJo-Philipp Wich <jo@mein.io>2018-12-18 09:43:57 +0100
commit2b51cac21a5a8c0c4f396f5a56c7c29be090f556 (patch)
tree2ec9f9ea891df7a93218cd7d8dfb3a88b1da8ff0 /scripts
parentfc0907bc25991a526ce4da001217d6a64045ffda (diff)
downloadopenwrt-2b51cac21a5a8c0c4f396f5a56c7c29be090f556.tar.gz
openwrt-2b51cac21a5a8c0c4f396f5a56c7c29be090f556.tar.bz2
openwrt-2b51cac21a5a8c0c4f396f5a56c7c29be090f556.zip
scripts: Replace obsolete POSIX tmpnam in slugimage.pl with File::Temp function
Signed-off-by: Ted Hess <thess@kitschensync.net> (backported from 7590c3c58f5e9d580c86da10473d1d29a2f081c9)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/slugimage.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/slugimage.pl b/scripts/slugimage.pl
index deac6ac6dd..8c0654d4f6 100755
--- a/scripts/slugimage.pl
+++ b/scripts/slugimage.pl
@@ -40,7 +40,7 @@ use strict;
use warnings;
use Getopt::Long qw(:config no_ignore_case);
-use POSIX qw(tmpnam);
+use File::Temp qw(tempfile);
my($debug) = 0;
my($quiet) = 0;
@@ -993,7 +993,7 @@ if ($pack) {
# don't touch RedBoot and SysConf anyway. If no Trailer is specified,
# put in one.
if (not defined $redboot and not -e "RedBoot") {
- $redboot = tmpnam();
+ $redboot = tempfile();
open TMP, ">$redboot" or die "Cannot open file $redboot: $!";
push @cleanup, $redboot;
# The RedBoot partition is 256 * 1024 = 262144; the trailer we add
@@ -1006,7 +1006,7 @@ if ($pack) {
close TMP;
}
if (not defined $sysconf and not -e "SysConf") {
- $sysconf = tmpnam();
+ $sysconf = tempfile();
open TMP, ">$sysconf" or die "Cannot open file $sysconf: $!";
push @cleanup, $sysconf;
# The SysConf partition is 128 * 1024 = 131072
@@ -1014,7 +1014,7 @@ if ($pack) {
close TMP;
}
if (not defined $trailer and not -e "Trailer") {
- $trailer = tmpnam();
+ $trailer = tempfile();
open TMP, ">$trailer" or die "Cannot open file $trailer: $!";
push @cleanup, $trailer;
for my $i (@sercomm_flash_trailer) {