Subversion Repositories ALCASAR

Rev

Rev 1594 | Rev 1601 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1594 Rev 1600
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1594 2015-03-10 20:32:27Z richard $ 
2
#  $Id: alcasar.sh 1600 2015-03-19 18:09:12Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 1928... Line 1928...
1928
	echo "net.ipv4.conf.all.log_martians = 0" >> /etc/sysctl.d/alcasar.conf
1928
	echo "net.ipv4.conf.all.log_martians = 0" >> /etc/sysctl.d/alcasar.conf
1929
# remove Magic SysReq Keys
1929
# remove Magic SysReq Keys
1930
	[ -e /etc/sysctl.d/51-alt-sysrq.conf ] && rm /etc/sysctl.d/51-alt-sysrq.conf
1930
	[ -e /etc/sysctl.d/51-alt-sysrq.conf ] && rm /etc/sysctl.d/51-alt-sysrq.conf
1931
# switch to multi-users runlevel (instead of x11)
1931
# switch to multi-users runlevel (instead of x11)
1932
	ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
1932
	ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
1933
#	GRUB modifications
1933
#	GRUB modifications (only one time)
1934
# limit wait time to 3s
1934
# limit wait time to 3s
1935
# create an alcasar entry instead of linux-nonfb
1935
# create an alcasar entry instead of linux-nonfb
1936
# change display to 1024*768 (vga791)
1936
# change display to 1024*768 (vga791)
-
 
1937
	grub_already_modified=`grep ALCASAR /boot/grub/menu.lst|wc -l`
-
 
1938
	if [ $grub_already_modified == 0 ]
-
 
1939
		then
1937
	$SED "s?^timeout.*?timeout 3?g" /boot/grub/menu.lst
1940
		$SED "s?^timeout.*?timeout 3?g" /boot/grub/menu.lst
1938
	$SED "s?^title linux?title ALCASAR?g" /boot/grub/menu.lst
1941
		$SED "s?^title linux?title ALCASAR?g" /boot/grub/menu.lst
1939
	$SED "/^kernel/s/splash quiet //" /boot/grub/menu.lst
1942
		$SED "/^kernel/s/splash quiet //" /boot/grub/menu.lst
1940
	$SED "/^kernel/s/vga=.*/vga=791 nomodeset/" /boot/grub/menu.lst
1943
		$SED "/^kernel/s/vga=.*/vga=791 nomodeset/" /boot/grub/menu.lst
1941
	$SED "/^kernel/s/BOOT_IMAGE=linux /BOOT_IMAGE=linux-nonfb /" /boot/grub/menu.lst
1944
		$SED "/^kernel/s/BOOT_IMAGE=linux /BOOT_IMAGE=linux-nonfb /" /boot/grub/menu.lst
1942
	$SED "/^gfxmenu/d" /boot/grub/menu.lst
1945
		$SED "/^gfxmenu/d" /boot/grub/menu.lst
-
 
1946
	fi
1943
# Remove unused services and users
1947
# Remove unused services and users
1944
	for svc in sshd
1948
	for svc in sshd
1945
	do
1949
	do
1946
		/usr/bin/systemctl -q disable $svc.service
1950
		/usr/bin/systemctl -q disable $svc.service
1947
	done
1951
	done