summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-01-26 16:13:05 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-01-26 16:13:05 +0000
commit992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99 (patch)
tree87a8ff86c6802cd80f1e4818fc8da89873a5768d /perl-install
parent4ecc84061788d2358194b69e6a45a1d90175c508 (diff)
downloaddrakx-backup-do-not-use-992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99.tar
drakx-backup-do-not-use-992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99.tar.gz
drakx-backup-do-not-use-992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99.tar.bz2
drakx-backup-do-not-use-992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99.tar.xz
drakx-backup-do-not-use-992d0c10b4c26f0e0d3f52bec472f3bf9c55cd99.zip
- move convert script from spec file into standalone/convert
- btw, do not try converting if uneeded
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/Makefile.drakxtools3
-rw-r--r--perl-install/drakxtools.spec1
-rw-r--r--perl-install/standalone/convert10
4 files changed, 13 insertions, 3 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 3068f4d6c..2a228826d 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -8,7 +8,7 @@ include Makefile.config
POFILES = $(shell ls share/po/*.po)
MOFILES = $(POFILES:%.po=%.mo)
-DISTFILES = *.pm $(PMS_DIRS) Makefile Makefile.config ddcprobe drakxtools.spec serial_probe share/po share/diskdrake.rc $(STANDALONEPMS) standalone/icons standalone/man/C/* pixmaps pixmaps/langs standalone/interactive_http rpcinfo-flushed.c standalone/service_harddrake.sh standalone/finish-install.xsetup
+DISTFILES = *.pm $(PMS_DIRS) Makefile Makefile.config ddcprobe drakxtools.spec serial_probe share/po share/diskdrake.rc $(STANDALONEPMS) standalone/icons standalone/man/C/* pixmaps pixmaps/langs standalone/interactive_http rpcinfo-flushed.c standalone/convert standalone/finish-install.xsetup standalone/service_harddrake.sh
OTHERS = $(OTHERDIRS) $(OTHERFILES)
OTHERDIRS = tools/ddcprobe tools/serial_probe
OTHERFILES = tools/rpcinfo-flushed.c
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index 623ae8cdd..ec1383ba0 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -30,7 +30,7 @@ $(DIRS):
install:
mkdir -p $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR)/{harddrake,pixmaps,icons/{large,mini},autostart} $(BINX11DEST) $(LIBX11DEST) $(PIXDIR) $(INITDIR) $(MENUDIR)
install -d $(INLIBDEST_DIRS:%=$(LIBDEST)/%)
- install $(STANDALONEPMS) standalone/service_harddrake.sh $(SBINDEST)
+ install $(STANDALONEPMS) standalone/service_harddrake.sh standalone/convert $(SBINDEST)
install -s rpcinfo-flushed ddcprobe/ddcxinfos serial_probe/serial_probe $(SBINDEST)
ln -s ../../$(patsubst $(PREFIX)/usr%,%,$(SBINDEST))/XFdrake $(BINX11DEST)/Xdrakres
ln -s fileshareset $(SBINDEST)/filesharelist
@@ -67,6 +67,7 @@ install:
rmdir $(LIBDEST)/icons/harddrake2/menu
mv $(LIBDEST)/icons/harddrake2/ $(DATADIR)/pixmaps/
mv $(SBINDEST)/service_harddrake.sh $(INITDIR)/harddrake
+ mv $(SBINDEST)/convert $(DATADIR)/harddrake
mv $(SBINDEST)/service_harddrake $(DATADIR)/harddrake/
ln -s {XFdrake,$(SBINDEST)/drakx11}
ln -s {diskdrake,$(SBINDEST)/drakdisk}
diff --git a/perl-install/drakxtools.spec b/perl-install/drakxtools.spec
index c1ff69a72..b81d311e5 100644
--- a/perl-install/drakxtools.spec
+++ b/perl-install/drakxtools.spec
@@ -252,7 +252,6 @@ case \$DESKTOP in
esac
EOF
-mv $RPM_BUILD_ROOT%_sbindir/convert $RPM_BUILD_ROOT%_datadir/harddrake/
mv $RPM_BUILD_ROOT%_sbindir/service_harddrake_confirm $RPM_BUILD_ROOT%_datadir/harddrake/confirm
chmod +x $RPM_BUILD_ROOT{%_datadir/harddrake/*,%_sysconfdir/X11/xinit.d/{harddrake2,net_applet}}
diff --git a/perl-install/standalone/convert b/perl-install/standalone/convert
new file mode 100644
index 000000000..f86039297
--- /dev/null
+++ b/perl-install/standalone/convert
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use Storable;
+use MDK::Common::File qw(cat_);
+
+my $last_boot_config = "/etc/sysconfig/harddrake2/previous_hw";
+
+if (cat_($last_boot_config) !~ /^pst0/) {
+ my $config = do $last_boot_config;
+ store($config, $last_boot_config);
+}