aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/chksession
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/chksession')
-rw-r--r--sbin/chksession12
1 files changed, 10 insertions, 2 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 7226a84..a735c0c 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -124,5 +124,13 @@ if ($xsession) {
exit (0);
}
-print shift @lf, "\n" if $first;
-if ($list) { my $p; for(@lf) { $p .= /$lf[-1]/ ? "$_ default failsafe" : "$_ " } print "$p\n"; }
+@lf ? print shift @lf, "\n" : print "Default\n"
+ if $first;
+
+if ($list) {
+ if (@lf) {
+ my $p; for(@lf) { $p .= /$lf[-1]/ ? "$_ default failsafe" : "$_ " } print "$p\n";
+ } else {
+ print "Default\n";
+ }
+}