diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-06-09 19:01:10 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-06-09 19:01:10 -0700 |
commit | 0a45e74a8fadd4f434752bb70b0da936c68359f5 (patch) | |
tree | 7b20a154348bee052340d59114cd03f684c3b381 /scripts/vyatta-reboot.pl | |
parent | b99284b11940944bc0781dfbab9905c3114e4c4a (diff) | |
download | vyatta-op-0a45e74a8fadd4f434752bb70b0da936c68359f5.tar.gz vyatta-op-0a45e74a8fadd4f434752bb70b0da936c68359f5.zip |
Add sanity check if getlogin() fails.
Diffstat (limited to 'scripts/vyatta-reboot.pl')
-rw-r--r-- | scripts/vyatta-reboot.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/vyatta-reboot.pl b/scripts/vyatta-reboot.pl index 9ed369a..2106ade 100644 --- a/scripts/vyatta-reboot.pl +++ b/scripts/vyatta-reboot.pl @@ -77,7 +77,7 @@ if (! defined $action) { } openlog($0, "", LOG_USER); -my $login = getlogin(); +my $login = getlogin() || getpwuid($<) || "unknown"; # # reboot |