Commit 71cb2a0d by Denis Pynkin Committed by Stéphane Graber

Additional checks in ALTLinux template

Added check of services in container before start or stop. Added check of syslog config existence prior changing. Signed-off-by: 's avatarDenis Pynkin <dans@altlinux.org> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 4791b80e
...@@ -108,16 +108,22 @@ EOF ...@@ -108,16 +108,22 @@ EOF
echo "pts/0" >> ${rootfs_path}/etc/securetty echo "pts/0" >> ${rootfs_path}/etc/securetty
echo "console" >> ${rootfs_path}/etc/securetty echo "console" >> ${rootfs_path}/etc/securetty
chroot ${rootfs_path} chkconfig network on # Enable services
chroot ${rootfs_path} chkconfig syslogd on for service in network syslogd random
chroot ${rootfs_path} chkconfig random on do
chroot ${rootfs_path} chkconfig rawdevices off chroot ${rootfs_path} chkconfig $service --list &>/dev/null && chroot ${rootfs_path} chkconfig $service on || true
chroot ${rootfs_path} chkconfig fbsetfont off done
# chroot ${rootfs_path} chkconfig keytable off # Disable services
for service in rawdevices fbsetfont
do
chroot ${rootfs_path} chkconfig $service --list &>/dev/null && chroot ${rootfs_path} chkconfig $service off || true
done
subst 's/^\([3-9]\+:[0-9]\+:respawn:\/sbin\/mingetty.*\)/#\1/' ${rootfs_path}/etc/inittab subst 's/^\([3-9]\+:[0-9]\+:respawn:\/sbin\/mingetty.*\)/#\1/' ${rootfs_path}/etc/inittab
echo "c1:2345:respawn:/sbin/mingetty --noclear console" >> ${rootfs_path}/etc/inittab echo "c1:2345:respawn:/sbin/mingetty --noclear console" >> ${rootfs_path}/etc/inittab
subst 's,\/dev\/tty12,/var/log/syslog/console,' ${rootfs_path}/etc/syslog.conf
[ -f "${rootfs_path}/etc/syslog.conf" ] && \
subst 's,\/dev\/tty12,/var/log/syslog/console,' ${rootfs_path}/etc/syslog.conf
# touch file for fastboot # touch file for fastboot
touch ${rootfs_path}/fastboot touch ${rootfs_path}/fastboot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment