mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-01 06:45:24 +00:00
Tell the user if we are going to overwrite an existing
/etc/sysconfig/lm_sensors configuration file. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4134 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -5473,8 +5473,9 @@ sub main
|
||||
"modules are loaded.\n\n";
|
||||
|
||||
my $have_sysconfig = -d '/etc/sysconfig';
|
||||
print "Do you want to generate /etc/sysconfig/lm_sensors? (".
|
||||
($have_sysconfig?"YES/no":"yes/NO")."): ";
|
||||
printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ",
|
||||
(-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'),
|
||||
($have_sysconfig ? 'YES/no' : 'yes/NO');
|
||||
$_ = <STDIN>;
|
||||
if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) {
|
||||
unless ($have_sysconfig) {
|
||||
|
Reference in New Issue
Block a user