Patch attached. Please, test it and let me know.

Currently there is one redundant call `chdir' - but, I didn't want to
mess with the script
much.

Didar
--- /usr/sbin/lighty-enable-mod	2010-08-31 00:18:29.000000000 +0530
+++ lighty-enable-mod	2010-10-20 16:13:52.000000000 +0530
@@ -79,8 +79,12 @@
 		print qq{Enabling $do: };
 
 		my $st = stat($target);
+		my $relative;
 		unless ( -f $target ) {
-			if (symlink($available{$do}, $target)) {
+			$relative = sprintf("../conf-enabled/%s", basename($available{$do}));
+			print "$relative\n";
+			chdir($confdir.'/conf-enabled');
+			if (symlink($relative, $target)) {
 				print "ok\n";
 			}
 			else {

Reply via email to