Search
j0ke.net Open Build Service
>
Projects
>
stresslinux
:
12.3
>
stresslinux-image
> build-custom
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File build-custom of Package stresslinux-image (Revision 9)
Currently displaying revision
9
,
show latest
#!/bin/bash # # This script is executed at the end of appliance creation. Here you can do # one-time actions to modify your appliance before it is ever used, like # removing files and directories to make it smaller, creating symlinks, # generating indexes, etc. # # The 'kiwi_type' variable will contain the format of the appliance (oem = # disk image, vmx = VMware, iso = CD/DVD, xen = Xen). # # read in some variables . /studio/profile #====================================== # Prune extraneous files #-------------------------------------- # Remove all documentation docfiles=`find /usr/share/doc/packages -type f |grep -iv "copying\|license\|copyright\|y-cruncher"` rm -f $docfiles rm -rf /usr/share/info rm -rf /usr/share/man function addmemtest { if [ -f /boot/memtest86.bin ] ; then echo "title _Memory test ( memtest86 )_" >> /boot/grub/menu.lst echo " kernel (hd0,0)/boot/memtest86.bin" >> /boot/grub/menu.lst else echo "/boot/memtest86.bin not found!" fi if [ -f /boot/memtest86+.bin ] ; then echo "title _Memory test ( memtest86+ )_" >> /boot/grub/menu.lst echo " kernel (hd0,0)/boot/memtest86+.bin" >> /boot/grub/menu.lst else echo "/boot/memtest86+.bin not found!" fi } function fixmemtest { mkdir -p /livecd/boot/x86_64/loader cp /boot/memtest /livecd/boot/x86_64/loader/memtest } function disable_services { /sbin/chkconfig hddtemp off /sbin/chkconfig smartd off } function cleanup_build { rm -rf /overlay.tar.bz2 # rm -rf /build-custom # rm -rf /studio } case "${kiwi_type}" in oem) ##addmemtest ;; vmx) ##addmemtest disable_services ;; xen) ##addmemtest disable_services ;; iso) ##fixmemtest ;; esac cleanup_build echo stresslinux > /etc/HOSTNAME sed -i s@"0.7.177"@"${kiwi_iversion}"@ /etc/stresslinux-release for a in `seq 6 12` ; do grep ^tty${a} /etc/securetty >/dev/null || echo tty$a >> /etc/securetty ; done systemctl enable if_status.service systemctl enable hddtemp-watch.service systemctl enable sensors-watch.service cat > /etc/motd << EOF +-----------------------------------------------------------------------------+ | Welcome to StressLinux made by stresslinux.org | | | | Commands that can be used for testing your hardware: | | | | burnBX - for Intel BX Chipset based boards | | burnMMX - for Intel Pentium MMX Chips | | burnP5 - for Intel P5 Pentium Chips | | burnP6 - for Intel Pentium Pro/II/III/IV and Celeron TM | | burnK6 - for AMD K6 | | burnK7 - for AMD K7 Athlon/Duron/Thunderbird TM | | stress - for testing cpu,i/o,vm,harddisk | | netio - network performance benchmark (needs 2nd engine running SL) | | bonnie++/zcav - harddisk benchmark | | smartctl - for S.M.A.R.T. Tests | | lshw - Hardware lister | | x86info - CPU Information | +-----------------------------------------------------------------------------+ | Commands for monitoring some data of your hardware: | | | | hddtemp - for monitoring temprature of S.M.A.R.T. capable devices | | sensors - for monitoring voltages and temprature of your mainboard | +-----------------------------------------------------------------------------+ | sl-wizard.sh - Select your mainboard (lm_sensors configuration frontend) | +-----------------------------------------------------------------------------+ EOF cat > /home/stress/.bashrc << EOF #!/bin/bash export PATH=${PATH}:/usr/sbin:/sbin if [ ! -f /tmp/keyboard ] ; then sudo /sbin/yast2 keyboard if [ $? == 0 ] ; then touch /tmp/keyboard fi fi sudo /usr/bin/sl-wizard.sh clear cat /etc/motd EOF chown stress:root /home/stress/.bashrc echo "stress ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/90_stress chmod 0440 /etc/sudoers.d/90_stress