summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Tappe2007-05-28 23:53:13 +0200
committerOliver Tappe2007-05-28 23:53:13 +0200
commit186cc89e440017fc49907929105e0eb7ed31eaa9 (patch)
tree18040459f9bf1f85991673b4817384c8fb17aa85
parent* added support for 'local:'-URLs, which trigger the automatic start of a (diff)
downloadcore-186cc89e440017fc49907929105e0eb7ed31eaa9.tar.gz
core-186cc89e440017fc49907929105e0eb7ed31eaa9.tar.xz
core-186cc89e440017fc49907929105e0eb7ed31eaa9.zip
* part one of settings file related changes (ticket#122):
- 'settings.default' now lives in /opt/openslx/share - 'settings.local' has been renamed to 'settings' git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1103 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--Makefile14
-rwxr-xr-xconfig-db/slxsettings10
-rwxr-xr-xinitramfs/mkdxsinitrd18
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm2
-rw-r--r--lib/OpenSLX/Basics.pm6
-rw-r--r--lib/distro-info/fedora-6/settings.local.example6
-rw-r--r--lib/distro-info/fedora-6_x86_64/settings.local.example6
-rw-r--r--lib/distro-info/suse-10.1/settings.local.example2
-rw-r--r--lib/distro-info/suse-10.1_x86_64/settings.local.example2
-rw-r--r--lib/distro-info/suse-10.2/settings.local.example2
-rw-r--r--lib/distro-info/suse-10.2_x86_64/settings.local.example2
11 files changed, 43 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 3efb42b3..323943bd 100644
--- a/Makefile
+++ b/Makefile
@@ -125,9 +125,9 @@ install:
@ # specific database modules are optional, but we tell the user if
@ # support for a database is missing:
@DEFAULT_DB_TYPE=""; \
- if test -e ${SLX_CONFIG_PATH}/settings.local; then \
+ if test -e ${SLX_CONFIG_PATH}/settings; then \
echo "Reading local settings..."; \
- . ${SLX_CONFIG_PATH}/settings.local; \
+ . ${SLX_CONFIG_PATH}/settings; \
fi; \
for m in $${SLX_DB_TYPE} SQLite CSV mysql; do \
if ! perl -Ilib -Iconfig-db -e "use OpenSLX::MetaDB::$$m" 2>>${SLX_INSTALL_LOG} ; then \
@@ -234,10 +234,12 @@ functions via\n# inclusion: '. /etc/functions' ..." \
\nSLX_TEMP_PATH=${SLX_TEMP_PATH}\
\nSLX_TFTPBOOT_PATH=${SLX_TFTPBOOT_PATH}\
\nSLX_VMWARE_PATH=${SLX_VMWARE_PATH}\n" \
- > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.default; \
- test -e $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local || \
- echo -e "# local setup for openslx (overrides settings.default)\n" \
- > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local; \
+ > $(DESTDIR)$(SLX_SHARE_PATH)/settings.default; \
+ test -e $(DESTDIR)$(SLX_CONFIG_PATH)/settings || \
+ echo -e "# Local setup for OpenSLX (overrides default settings).\
+\n#\n# Please look at $(SLX_SHARE_PATH)/settings.default and the docs to learn\
+\n# about the available options.\n" \
+ > $(DESTDIR)$(SLX_CONFIG_PATH)/settings; \
@ # create slxversion script:
@if test -e REVISION; then \
diff --git a/config-db/slxsettings b/config-db/slxsettings
index a95623c0..b6fd6e1e 100755
--- a/config-db/slxsettings
+++ b/config-db/slxsettings
@@ -20,7 +20,7 @@ slxsettings
This script can be used to show or change the local settings for OpenSLX.
Any cmdline-argument passed to this script will change the local OpenSLX
- settings file (usually /etc/opt/openslx/settings.local).
+ settings file (usually /etc/opt/openslx/settings).
If you invoke the script without any arguments, it will print the current
settings and exit.
@@ -82,14 +82,14 @@ while (scalar @ARGV) {
}
# fetch current content of local settings file...
-my $settings = slurpFile("$openslxConfig{'config-path'}/settings.local");
+my $settings = slurpFile("$openslxConfig{'config-path'}/settings");
my $changeCount;
# ...set new values...
foreach my $key (keys %givenSettings) {
next if $key eq 'config-path';
- # config-path can't be changed, it is used to find settings.local
+ # config-path can't be changed, it is used to find settings
my $value = $givenSettings{$key};
next if !defined $value;
vlog 0, _tr("setting %s to '%s'", $key, $value) unless $quiet;
@@ -113,7 +113,7 @@ foreach my $key (@reset) {
# ... and write local settings file if necessary
if ($changeCount) {
- my $f = "$openslxConfig{'config-path'}/settings.local";
+ my $f = "$openslxConfig{'config-path'}/settings";
open(SETTINGS, "> $f")
or die _tr("Unable to write local settings file '%s' (%s)", $f, $!);
print SETTINGS $settings;
@@ -208,7 +208,7 @@ value)
B<slxsettings> can be used to show or change the local settings for OpenSLX.
Any cmdline-argument passed to this script will change the local OpenSLX
-settings file (usually /etc/opt/openslx/settings.local).
+settings file (usually /etc/opt/openslx/settings).
If you invoke the script without any arguments, it will print the current
settings and exit.
diff --git a/initramfs/mkdxsinitrd b/initramfs/mkdxsinitrd
index 15c05ae7..545add5a 100755
--- a/initramfs/mkdxsinitrd
+++ b/initramfs/mkdxsinitrd
@@ -53,10 +53,10 @@ D_XFONTPATH="<set in ~/distro-config/distro file>"
D_DEFAULTCOUNTRY="<set in ~/distro-config/distro file>"
# read in the global settings
SLX_CONFIG_PATH=@@@SLX_CONFIG_PATH@@@
-[ -f $SLX_CONFIG_PATH/settings.default ] && \
- . $SLX_CONFIG_PATH/settings.default
-[ -f $SLX_CONFIG_PATH/settings.local ] && \
- . $SLX_CONFIG_PATH/settings.local
+[ -f $SLX_SHARE_PATH/settings.default ] && \
+ . $SLX_SHARE_PATH/settings.default
+[ -f $SLX_CONFIG_PATH/settings ] && \
+ . $SLX_CONFIG_PATH/settings
#########################################################################
# End of global variable declaration, nothing needed to be changed at
@@ -107,7 +107,7 @@ precheck() {
echo "i.e. install it using the provided Makefile. Thanks."
else
echo "Essential configuration is missing. Please verify"
- echo "existence and correctness of $SLX_CONFIG_PATH/settings.default"
+ echo "existence and correctness of $SLX_SHARE_PATH/settings.default"
fi
exit 1
fi
@@ -199,10 +199,10 @@ copy_distro_stuff() {
# definitions in distro/version specific files
cat ${SLX_SHARE_PATH}/distro-specs/$1/config-default >${INSTDIR}/etc/sysconfig/config
cat ${SLX_SHARE_PATH}/distro-specs/$1/config-$2 >>${INSTDIR}/etc/sysconfig/config
- #[ -f $SLX_CONFIG_PATH/settings.default ] && \
- # cat $SLX_CONFIG_PATH/settings.default >>${INSTDIR}/etc/sysconfig/config
- #[ -f $SLX_CONFIG_PATH/settings.local ] && \
- # cat $SLX_CONFIG_PATH/settings.local >>${INSTDIR}/etc/sysconfig/config
+ #[ -f $SLX_SHARE_PATH/settings.default ] && \
+ # cat $SLX_SHARE_PATH/settings.default >>${INSTDIR}/etc/sysconfig/config
+ #[ -f $SLX_CONFIG_PATH/settings ] && \
+ # cat $SLX_CONFIG_PATH/settings >>${INSTDIR}/etc/sysconfig/config
cat ${SLX_SHARE_PATH}/distro-specs/$1/functions-default >${INSTDIR}/etc/distro-functions
cat ${SLX_SHARE_PATH}/distro-specs/$1/functions-$2 >>${INSTDIR}/etc/distro-functions
# would be cool not to copy .svn here ...
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 9d7d31ab..4240c5f5 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -407,7 +407,7 @@ sub readDistroInfo
my $bootstrap_packages = $self->{distro}->{config}->{'bootstrap-packages'};
my $metapackager_packages
= $self->{distro}->{config}->{'metapackager-packages'};
- my $file = "$self->{'distro-info-dir'}/settings.local";
+ my $file = "$self->{'distro-info-dir'}/settings";
if (-e $file) {
vlog 2, "reading configuration file $file...";
my $config = slurpFile($file);
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm
index f673d279..fad4903a 100644
--- a/lib/OpenSLX/Basics.pm
+++ b/lib/OpenSLX/Basics.pm
@@ -164,8 +164,10 @@ sub openslxInit
# try to read and evaluate config files:
my $configPath = $cmdlineConfig{'config-path'}
|| $openslxConfig{'config-path'};
- foreach my $f ("$configPath/settings.default",
- "$configPath/settings.local",
+ my $sharePath = $cmdlineConfig{'share-path'}
+ || $openslxConfig{'share-path'};
+ foreach my $f ("$sharePath/settings.default",
+ "$configPath/settings",
"$ENV{HOME}/.openslx/settings") {
next unless open(CONFIG, "<$f");
if ($cmdlineConfig{'verbose-level'} >= 2) {
diff --git a/lib/distro-info/fedora-6/settings.local.example b/lib/distro-info/fedora-6/settings.local.example
index b41c94f8..5fbe942d 100644
--- a/lib/distro-info/fedora-6/settings.local.example
+++ b/lib/distro-info/fedora-6/settings.local.example
@@ -1,6 +1,8 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
-$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/SL-10.1/inst-source";
-$repository{'base_update'}->{'url'} = "local://localhost:5082/srv/ftp/pub/suse/update/10.1";
+$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/pub/linux/fedora/linux/core/6/i386/os";
+$repository{'base_update'}->{'url'} = "local://localhost:5082/srv/ftp/pub/linux/fedora/linux/core/updates/6/i386/";
# Add a new selection:
# $selection{'my-kde'} = "$selection{default}
diff --git a/lib/distro-info/fedora-6_x86_64/settings.local.example b/lib/distro-info/fedora-6_x86_64/settings.local.example
index b41c94f8..5e4fec32 100644
--- a/lib/distro-info/fedora-6_x86_64/settings.local.example
+++ b/lib/distro-info/fedora-6_x86_64/settings.local.example
@@ -1,6 +1,8 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
-$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/SL-10.1/inst-source";
-$repository{'base_update'}->{'url'} = "local://localhost:5082/srv/ftp/pub/suse/update/10.1";
+$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/pub/linux/fedora/linux/core/6/x86_64/os";
+$repository{'base_update'}->{'url'} = "local://localhost:5082/srv/ftp/pub/linux/fedora/linux/core/updates/6/x86_64/";
# Add a new selection:
# $selection{'my-kde'} = "$selection{default}
diff --git a/lib/distro-info/suse-10.1/settings.local.example b/lib/distro-info/suse-10.1/settings.local.example
index 3588750a..d56f393a 100644
--- a/lib/distro-info/suse-10.1/settings.local.example
+++ b/lib/distro-info/suse-10.1/settings.local.example
@@ -1,3 +1,5 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/SL-10.1/inst-source";
$repository{'base_non-oss'}->{'url'} = "local://localhost:5081/srv/ftp/pub/opensuse/distribution/SL-10.1/non-oss-inst-source";
diff --git a/lib/distro-info/suse-10.1_x86_64/settings.local.example b/lib/distro-info/suse-10.1_x86_64/settings.local.example
index 3588750a..d56f393a 100644
--- a/lib/distro-info/suse-10.1_x86_64/settings.local.example
+++ b/lib/distro-info/suse-10.1_x86_64/settings.local.example
@@ -1,3 +1,5 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/SL-10.1/inst-source";
$repository{'base_non-oss'}->{'url'} = "local://localhost:5081/srv/ftp/pub/opensuse/distribution/SL-10.1/non-oss-inst-source";
diff --git a/lib/distro-info/suse-10.2/settings.local.example b/lib/distro-info/suse-10.2/settings.local.example
index d0afaa7f..7021fa6a 100644
--- a/lib/distro-info/suse-10.2/settings.local.example
+++ b/lib/distro-info/suse-10.2/settings.local.example
@@ -1,3 +1,5 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/10.2/repo/oss";
$repository{'base_non-oss'}->{'url'} = "local://localhost:5081/srv/ftp/pub/opensuse/distribution/10.2/repo/non-oss";
diff --git a/lib/distro-info/suse-10.2_x86_64/settings.local.example b/lib/distro-info/suse-10.2_x86_64/settings.local.example
index d0afaa7f..7021fa6a 100644
--- a/lib/distro-info/suse-10.2_x86_64/settings.local.example
+++ b/lib/distro-info/suse-10.2_x86_64/settings.local.example
@@ -1,3 +1,5 @@
+# copy this file to 'settings' and edit it as you please
+
# use local installation sources
$repository{'base'}->{'url'} = "local://localhost:5080/srv/ftp/pub/opensuse/distribution/10.2/repo/oss";
$repository{'base_non-oss'}->{'url'} = "local://localhost:5081/srv/ftp/pub/opensuse/distribution/10.2/repo/non-oss";