Jump to content

BennySt

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

2888 profile views
  1. I know is WIP & POC. I was the one who posted the initial customized-image.sh and tkaiser improved it a lot and take a lot of effort on this. If you are in favor to separate it, tell me more about it and I will help you, if you want.
  2. My changes are not gone break much. existing scripts will work in the same favour as before, just renamed/changed location. In my opinion it is just flexible if you have not more than one customization, like atm OMV. When adding in the future e.g own/nextcloud it will become unflexible But I understand your concerns. Putting all logic to customize-image.sh may be also a way. This would mean no dialog options but flexibility while retain full backward compatibility. Adding extra variables to customize-image.sh should be no big problem. Will have a look a it.
  3. Hi there, while the customize-image.sh got some attention lately because of OMV integration, I've started a try to enhance the customization process. At the moment any changes to the script are valid for the whole buildenv. That might be good when building just one image but all over I think thats not a good situation, especially for automated building or with more then one customization. I startet to define a $CUSTOM Buildvar and redefined the script locations, starting with the following changes: - delete customize-image.sh an overlay dir - placed it under config/customizations with following layout *-chroot.sh, *-host.sh, *-overlay dir - changed the buildenv script to show a new dialog when $CUSTOM is not set or set to 'none' - append $CUSTOM to .img name At the moment I do some testings but it should work already. Want to share this for some feedback, thoughts and opinions The code is her: https://github.com/Diggen85/build/tree/customize-image
  4. Sorry for answering late, had much todo at work and some other Projects No Problem when "stealing" this way ;-) I'll fire up my build env and have a look. In the meantime an Image based on the script + tvheadend runs since October flawlessly at my home for watching TV+Media on 3 Kodi installations. But now with the fixed kernel config, a comfortable way of upgrading is created edit: @tkiaiser at a quick look I've seen you doesn't disable the extra services enabled by apt-get/default ? Need to find an mSD-Card then I will test it on my OPIZero. Anything I should specally look at? Except the points here
  5. Thanks for the praise. I'va already found a few Bugs / ToDos for v0.2 - Pinning Kernel & Headers because of custom kernel - apt-get update with new kernels will ruin OMV mounts - Change Hostname in /root/.ssh, maybe at other places - Comment jessie-backports in sources.list because its doubly in omv-extras.list - OMV Flashmemory disables swap, but Armbian set vm.swapiness to 0 which should be better - maybe set it on mainline kernels to 1? PS: If i read above, i notice my english is not the best. Please correct me if something is to awful ;-)
  6. Hi, I'am the new one. I'am German and bought last month an OrangePi PC+ from AliExpress without a clue what todo with it, but it was cheap ;-) And it was perfect for my new OMV. Just installing OMV on top of Armbian / Jessie was not enough because of missing Quota Kernel Options. When setting up a development Enviroment, I found the excellent Build-Scripts of Armbian and thought, why not making an OMV-Image with the customize-image.sh. And here is it (quick and dirty v0.1) Just copy it with a modified kernel.config under userpatches. It should work with every supported Armbian Board as long as its working with Debian Jessie, because it installes OMV3.X I compiled my Image with the legacy Kernel but it should also work with mainline. If wanted I can build some Images for testing. Please give some feedback or critics, I hope its helpfull for someone. Sorry for attaching this as Code but I can't upload attachments? #!/bin/bash ################################################################################################################################# ## customize-image.sh - for installing openmediavault 3 ## ## installs omv, omv-extras, omv-flashmemory ## and making some changes to the System ## started in chroot from /tmp ## ## arguments: $RELEASE $FAMILY $BOARD $BUILD_DESKTOP ## ## Author : Benny St <Benny_Stark@live.de> ## Version : 0.1 ## ## Version 0.1 - first Release ## ################################################################################################################################# RELEASE=$1 FAMILY=$2 BOARD=$3 BUILD_DESKTOP=$4 #Modified display alert from lib/general.sh display_alert() #-------------------------------------------------------------------------------------------------------------------------------- # Let's have unique way of displaying alerts #-------------------------------------------------------------------------------------------------------------------------------- { # log function parameters to install.log #[[ -n $DEST ]] && echo "Displaying message: $@" >> $DEST/debug/output.log local tmp="" [[ -n $2 ]] && tmp="[\e[0;33m $2 \x1B[0m]" case $3 in err) echo -e "[\e[0;31m error \x1B[0m] $1 $tmp" ;; wrn) echo -e "[\e[0;35m warn \x1B[0m] $1 $tmp" ;; ext) echo -e "[\e[0;32m o.k. \x1B[0m] \e[1;32m$1\x1B[0m $tmp" ;; info) echo -e "[\e[0;32m o.k. \x1B[0m] $1 $tmp" ;; *) echo -e "[\e[0;32m .... \x1B[0m] $1 $tmp" ;; esac } case $RELEASE in wheezy) # your code here ;; jessie) #change root passs first #else we get some configure-errors display_alert "Change Root PW" "custom-image.sh" "info" echo root:openmediavault|chpasswd display_alert "Change /etc/hostname" "custom-image.sh" "info" echo "openmediavault" > /etc/hostname ## works after reboot #generate locales #they are not there display_alert "Generate Locals and set them" "custom-image.sh" "info" locale-gen "en_US.UTF-8" locale-gen "C" export LANG=C export LC_ALL="en_US.UTF-8" #Unattended apt-get export DEBIAN_FRONTEND=noninteractive #Add OMV source.list and Update System display_alert "Adding OMV-Repo erasmus and update" "custom-image.sh" "info" cat > /etc/apt/sources.list.d/openmediavault.list << EOF deb http://packages.openmediavault.org/public erasmus main ## Uncomment the following line to add software from the proposed repository. # deb http://packages.openmediavault.org/public erasmus-proposed main ## This software is not part of OpenMediaVault, but is offered by third-party ## developers as a service to OpenMediaVault users. # deb http://packages.openmediavault.org/public erasmus partner EOF apt-get update # OMV Key display_alert "Install OMV Keys" "custom-image.sh" "info" #wget -O - packages.openmediavault.org/public/archive.key | apt-key add - apt-get --yes --force-yes --allow-unauthenticated install openmediavault-keyring # OMV Plugin developer Key apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7AA630A1EDEE7D73 #install debconf-utils for postfix configuration display_alert "Install debconf-utils" "custom-image.sh" "info" apt-get --yes --force-yes --allow-unauthenticated --fix-missing --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install debconf-utils #install postfix #Postfix configuration display_alert "Install postfix and configure it - No configuration" "custom-image.sh" "info" debconf-set-selections <<< "postfix postfix/main_mailer_type select No configuration" apt-get --yes --force-yes --allow-unauthenticated --fix-missing --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install postfix #install OMV #--allow-unauthenticated because openmediavault-keyring doesn't contain all keys??? display_alert "Install OMV" "custom-image.sh" "info" apt-get --yes --force-yes --allow-unauthenticated --fix-missing --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install openmediavault #install OMV extras display_alert "Download and install OMV Keys" "custom-image.sh" "info" wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all3.deb -O /tmp/omvextras3.deb dpkg -i /tmp/omvextras3.deb rm -f /tmp/omvextras3.deb /usr/sbin/omv-update #install openmediavault-flashmemory display_alert "Install openmediavault-flashmemory" "custom-image.sh" "info" apt-get --yes --force-yes --fix-missing --no-install-recommends install openmediavault-flashmemory sed -i '/<flashmemory>/,/<\/flashmemory>/ s/<enable>0/<enable>1/' /etc/openmediavault/config.xml /usr/sbin/omv-mkconf flashmemory # Tidy up display_alert "apt-get autoremove / autoclean" "custom-image.sh" "info" apt-get autoremove apt-get autoclean #remove first-login Script display_alert "Remove first-login Script" "custom-image.sh" "info" rm /root/.not_logged_in_yet #remove some services #ändern auf systemctl enable dienstname.service # /etc/systemd/system, /run/systemd/system, /usr/local/lib/systemd/system, and /usr/lib/systemd/system are four of those directories. display_alert "Disable Services - tftpd-hpa, proftpd, nfs-common, smbd, snmpd, ssh" #tftpd-hpa.service systemctl disable tftpd-hpa #proftpd.service systemctl disable proftpd #nfs-kernel-server.service #nfs-common.service systemctl disable nfs-kernel-server systemctl disable nfs-common #snmpd.service systemctl disable snmpd #samba.service systemctl disable nmbd systemctl disable samba-ad-dc systemctl disable smbd #ssh.service #systemctl disable ssh display_alert "SSH enable" "custom-image.sh" "info" systemctl enable ssh sed -i '/<ssh>/,/<\/ssh>/ s/<enable>0/<enable>1/' /etc/openmediavault/config.xml #FIX TFTPD ipv4? display_alert "tftpd-hpa ipv4 startup fix" "custom-image.sh" "info" sed -i 's/--secure/--secure --ipv4/' /etc/default/tftpd-hpa #adding omv-initsystem to firststart display_alert "adding omv-initsystem to firstrun" "custom-image.sh" "info" echo "/usr/sbin/omv-initsystem" >> /etc/init.d/firstrun #debug shell #/bin/bash ;; trusty) # your code here ;; xenial) # your code here ;; esac
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines