[Midnightbsd-cvs] src: firstboot: Add kdm enable code so anyone using the sysinstall to
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Aug 26 15:05:29 EDT 2008
Log Message:
-----------
Add kdm enable code so anyone using the sysinstall to add KDE can get a gui desktop easier.
Add bsdstats enable and pkg_add -r bsdstats to fetch it if it's not installed after asking the user. This will let more installs get reported.
If a user selects a gui destkop and has not installed kde, slim + windowmaker are fetched.
Tags:
----
RELENG_0_2
Modified Files:
--------------
src/etc/rc.d:
firstboot (r1.2 -> r1.2.2.1)
-------------- next part --------------
Index: firstboot
===================================================================
RCS file: /home/cvs/src/etc/rc.d/firstboot,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -L etc/rc.d/firstboot -L etc/rc.d/firstboot -u -r1.2 -r1.2.2.1
--- etc/rc.d/firstboot
+++ etc/rc.d/firstboot
@@ -26,16 +26,35 @@
if [ ! -f ${receipt} ]; then
echo -e "\r${red}MidnightBSD FirstBoot Configuration${lsuffix}"
-
echo "This utility requires an active Internet connection."
- echo -e "\r${yellow}Do you wish to install a graphical environment? (yes or no)${lsuffix}"
+
+ echo -e "\r${yellow}Would you like to report your install via bsdstats? (yes or no)${lsuffix}"
+ read installbstat
+ if [ ${installbstat} = "yes" ]; then
+ if [ ! -f /usr/local/etc/rc.d/bsdstats.sh ]; then
+ /usr/sbin/pkg_add -r bsdstats
+ fi
+ echo "bsdstats_enable=\"YES\"" >> /etc/rc.conf
+ /bin/sh /usr/local/etc/periodic/monthly/300.statistics
+ fi
+
+ echo -e "\r${yellow}Do you wish to enable a graphical environment? (yes or no)${lsuffix}"
read installgui
if [ ${installgui} = "yes" ]; then
echo -e "\r${red}Installing Graphical User Interface${lsuffix}"
- /usr/sbin/pkg_add -r gnustep
- /usr/sbin/pkg_add -r slim
- /usr/sbin/pkg_add -r windowmaker
+# KDE CASE
+ if [ -f /usr/local/bin/kdm ]; then
+ echo "KDE detected"
+ echo "ttyv8 \"/usr/local/bin/kdm -nodaemon\" xterm on secure" >> /etc/ttys
+ else
+# GNUSTEP/WindowMaker/Slim
+ /usr/sbin/pkg_add -r gnustep
+ /usr/sbin/pkg_add -r slim
+ /usr/sbin/pkg_add -r windowmaker
+ echo "slim_enable=\"YES\"" >> /etc/rc.conf
+ fi
+ echo "Please restart to enable graphical login."
echo -e "\r${yellow}Done.${lsuffix}"
else
echo "To run this utility again, rm ${receipt} and restart."
More information about the Midnightbsd-cvs
mailing list