]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Die when asking for interactive mode without being on terminal
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Jan 2014 11:36:18 +0000 (12:36 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 10 Jan 2014 11:36:18 +0000 (12:36 +0100)
novaboot

index 95f7fc6d25e29ca05b4e2e6c84ab01fc6f00d430..1c3c402ec2abc5be44059c37704184917ad989fb 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -182,6 +182,10 @@ if ($dump_config) {
 
 ### Sanitize configuration
 
+if ($interactive && !-t STDIN) {
+    die("novaboot: Interactive mode not supported when not on terminal");
+}
+
 if (defined $config_name_opt && scalar(@ARGV) > 1) { die "You cannot use --name with multiple scripts"; }
 
 # Default options