Changes

From SME Server
Jump to navigationJump to search
352 bytes added ,  09:13, 29 January 2013
m
Keep upstart
Line 346: Line 346:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
==== Replace upstart with SysVinit ====
+
==== Tweak the system so it can start with upstart (and runlevel4) ====
We've almost finished, we just have to replace upstart with the good old SysVinit, because upstart doesn't support the custom runlevel 7 SME uses.
+
Upstart (the default init in EL6) doesn't support runlevel 7 SME uses. So we'll switch to runlevel 4:
   −
(This topic is currently being discussed here: [[bugzilla:7217|Bug 7217 - Usage of SysVinit, upstart or systemd]] )
+
*Create a custom template for /etc/inittab to change the default runlevel to 4
 
<syntaxhighlight lang="Bash">
 
<syntaxhighlight lang="Bash">
rpm -e --nodeps upstart sysvinit-tools
+
mkdir -p /etc/e-smith/templates-custom/etc/inittab/
rpm -Uvh http://sme-mirror.firewall-services.com/releases/8/smeos/x86_64/SME/SysVinit-2.86-17.el5.x86_64.rpm
+
cat <<'EOF' > /etc/e-smith/templates-custom/etc/inittab/10defaultlevel
 +
# Default runlevel.
 +
#
 +
id:4:initdefault:
 +
EOF
 +
</syntaxhighlight>
 +
 
 +
 
 +
* Create a upstart job to start runsvdir (/etc/init/runsvdir.conf)
 +
 
 +
<syntaxhighlight lang="Bash">
 +
start on runlevel 4
 +
stop on shutdown
 +
respawn
 +
exec /etc/runit/2
 +
</syntaxhighlight>
 +
 
 +
* Move everything from rc7.d to rc4.d (all the links in rc4.d should then point to e-smith-service)
 +
<syntaxhighlight lang="Bash">
 +
rm -f /etc/rc4.d/*
 +
cp -a /etc/rc7.d/* /etc/rc4.d/
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Navigation menu