From ff47776a883e4137dfa4281380ab8d2839eb615f Mon Sep 17 00:00:00 2001 From: Sebastien Dupont Date: Wed, 20 Mar 2002 14:32:49 +0000 Subject: fixing problems --- perl-install/standalone/drakfont | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 0ba8dff91..80bcc560e 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -181,8 +181,9 @@ my $ttf2pt1 = '/usr/sbin/ttf2pt1'; my $pfm2afm = '/usr/sbin/pfm2afm'; my $type1inst = '/usr/sbin/type1inst'; my $chkfontpath = '/usr/sbin/chkfontpath'; -my $ttmkfdir = '/usr/X11R6/bin/mkttfdir'; #'/usr/sbin/ttmkfdir'; +my $mkttfdir = '/usr/X11R6/bin/mkttfdir'; my $ghostscript; +#my $ttmkfdir = '/usr/sbin/ttmkfdir'; # Global lists, just to manipulate it easily. # my @font_list => list of fonts to install. @@ -351,14 +352,15 @@ sub put_font_dir { } $interactive and progress($pbar1, 0.01, _("done")); $interactive and progress($pbar2, 0.10, _("True Type fonts installation")); - - system ('cd '.$drakfont_dir.'/tmp/tmp ; for i in *.TTF; do mv -f $i `basename $i .TTF`.ttf; done'); + glob ("$drakfont_dir/tmp/tmp/*.TTF") and + system ('cd '.$drakfont_dir.'/tmp/tmp ; for foo in *.TTF; do mv $foo `basename $foo .TTF`.ttf; done'); system ('cd '.$drakfont_dir.'/tmp/tmp && cp *.ttf ../../ttf'); $interactive and progress($pbar2, 0.20, _("please wait during ttmkfdir...")); # system ('cd '.$drakfont_dir.'/ttf && $ttmkfdir > fonts.dir' ); - system ('cd '.$drakfont_dir.'/ttf && $ttmkfdir ' ); + my $ttfdir = $drakfont_dir . "/ttf"; + `$mkttfdir $ttfdir`; $interactive and progress($pbar2, 0.10, _("True Type install done")); - my $restart_xfs = "$chkfontpath -a $drakfont_dir/ttf"; + my $update_chkfontpath = "$chkfontpath -a $drakfont_dir/ttf"; if ($so && $gs) { my @glob_drak = glob ("$drakfont_dir/tmp/tmp/*.ttf"); @@ -374,7 +376,7 @@ sub put_font_dir { system ("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.gsf *.afm *.pfb ../../Type1 "); system ("cd $drakfont_dir/Type1 && $type1inst"); $interactive and progress($pbar2, 0.05, _("Ghostscript referencing")); - $restart_xfs .= "; $chkfontpath -a $drakfont_dir/Type1"; + $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } if (!$so && $gs) { @@ -389,7 +391,7 @@ sub put_font_dir { system ("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.afm *.gsf *.pfb ../../Type1 "); system ("cd $drakfont_dir/Type1 && $type1inst"); $interactive and progress($pbar2, 0.05, _("Ghostscript referencing")); - $restart_xfs .= "; $chkfontpath -a $drakfont_dir/Type1"; + $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } if ($so && !$gs) { @@ -405,7 +407,7 @@ sub put_font_dir { system ("cd $drakfont_dir/tmp/Type1 && mv *.afm ../../Type1 "); system ("cd $drakfont_dir/Type1 && $type1inst"); $interactive and progress($pbar2, 0.14, _("type1inst building")); - $restart_xfs .= "; $chkfontpath -a $drakfont_dir/Type1"; + $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1"; } $interactive and progress($pbar2, 0.01, _("done")); @@ -413,8 +415,10 @@ sub put_font_dir { rm_rf("$drakfont_dir/tmp/"); print "\n\nretarting xfs......\n"; $interactive and progress($pbar3, 0.5 , _("Restart XFS")); - system ($restart_xfs); - system('kill -USR1 `/sbin/pidof xfs` 2&1>/dev/null'); + system ($update_chkfontpath); +# system ($restart_xfs); +# system('kill -USR1 `/sbin/pidof xfs` 2&1>/dev/null'); + system ('/etc/rc.d/init.d/xfs restart'); $interactive and progress($pbar3, 0.30, _("done")); } } -- cgit v1.2.1