Runlevel 3 and rpm problem

From: Sascha Nonn (sascha_at_heineken.chemie.uni-dortmund.de)
Date: Wed Oct 10 2001 - 09:24:57 CEST


Message-Id: <200110100724.f9A7Ow420857@heineken.chemie.uni-dortmund.de>
From: Sascha Nonn <sascha@heineken.chemie.uni-dortmund.de>
Date: Wed, 10 Oct 2001 09:24:57 +0200
Subject: Runlevel 3 and rpm problem

Hi there,

ich have two problems using alice:

a) When the first installation step is ready, init switches to runlevel 2,
after that make_all from alice starts correctly, but after that, init stays in
runlevel 2. But the default runlevel is 3. How can I tell alice to switch to
3?

b) I need a different sshd_config from the default one. So I tried to make a
rpm-package, containing /etc/ssh/sshd_config and /root/.shost in order to
login as root without password. (I have a cluster installation with 50
computers, don't want to typ in the password 50 times). I can install this
package on a running system, but not in the installation process. I need to do
it in the following way, because I can't simply overwrite the sshd_config, rpm
denies doing it.
The package results in a "prein-error". I guess, because the system is
mounted to /mnt and not to / like in a running system. What do I have to
change in the spec-file?

The spec-file for the rpm:

Summary: SSH-Config files for PC2a usage
Name: sshpc2a
Version: 1.0
Release: 1
License: GPL
Group: config

BuildRoot: /root/temp/

%description
This package contains all the files used for ssh-config

%install
mkdir -p $RPM_BUILD_ROOT/etc/ssh/
mkdir -p $RPM_BUILD_ROOT/root/.ssh/

install -m 600 $RPM_BUILD_ROOT/etc/ssh/sshd_config_new
/etc/ssh/sshd_config_new
install -m 600 $RPM_BUILD_ROOT/root/.shosts /root/.shosts
install -m 600 $RPM_BUILD_ROOT/root/.ssh/known_hosts /root/.ssh/known_hosts

%files
/etc/ssh/sshd_config_new
/root/.shosts
/root/.ssh/known_hosts

%pre
test -r /etc/ssh/sshd_config && mv /etc/ssh/sshd_config
/etc/ssh/sshd_config.rpmsave

%post
test -r /etc/ssh/sshd_config_new && mv /etc/ssh/sshd_config_new
/etc/ssh/sshd_config

%preun
test -r /etc/ssh/sshd_config && mv /etc/ssh/sshd_config
/etc/ssh/sshd_config_new

%postun
if test -r /etc/ssh/sshd_config.rpmsave; then
        mv /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config
        test -x /etc/init.d/sshd && /etc/init.d/sshd restart
fi

Thanks a lot
Sascha



This archive was generated by hypermail 2.1.7 : Wed Jun 25 2003 - 22:19:24 CEST