aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>2001-07-31 13:29:51 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>2001-07-31 13:29:51 +0000
commit3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc (patch)
tree3615730060f30c288d1d82c003bbc9d0203254d7 /sbin
parent5437237428e6559e2ec2c08d4b8d9ab6ab0b9ec9 (diff)
downloadcommon-data-3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc.tar
common-data-3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc.tar.gz
common-data-3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc.tar.bz2
common-data-3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc.tar.xz
common-data-3f71f8a4ff88b257eb0d3bc8794b57b7e07e95fc.zip
Ignore backup files. Cleanup codes.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/chksession14
1 files changed, 10 insertions, 4 deletions
diff --git a/sbin/chksession b/sbin/chksession
index 37108a4..3fbd150 100644
--- a/sbin/chksession
+++ b/sbin/chksession
@@ -32,10 +32,11 @@ sub parse_file {
while (<F>) {
$n = $1 if /^NAME=(.*)/m;
$e = $1 if /^EXEC=(.*)/m;
- $d = $1 if /^DESC=(.*)/m;
- $i = $1 if /^ICON=(.*)/m;
+# $d = $1 if /^DESC=(.*)/m;
+# $i = $1 if /^ICON=(.*)/m;
$s = $1 while /SCRIPT:(.*?)$/gs; chomp $s;
- if (-x $e) { $script{$n} = $s; $exec{$n} = $e; $desc{$n} = $d; $icon{$n} = $i; push @lf, $n; }
+ if (-x $e) { $script{$n} = $s; push @lf, $n; }
+# if (-x $e) { $script{$n} = $s; $exec{$n} = $e; $desc{$n} = $d; $icon{$n} = $i; push @lf, $n; }
}
}
@@ -68,7 +69,12 @@ while ($ARGV[0] =~ /^--/ || $ARGV[0] =~ /^-/) {
}
$dir = $test ? './wmsession.d/' : '/etc/X11/wmsession.d/' unless $dir;
-chdir $dir; parse_file ("$dir/$_") for <*>;
+chdir $dir;
+for (<*>) {
+ next if /.*~/;
+ next if /.*\\.rpm(save|old)/;
+ parse_file ("$dir/$_");
+}
sub cat { my ($f) = @_; local *F; open F, $f; join '', <F> }
my ($e) = cat("/etc/sysconfig/desktop") =~ /(\S+)/;