Debian only image creation
This commit is contained in:
parent
4c853944e1
commit
bb8b0c9c2d
Binary file not shown.
|
@ -97,6 +97,9 @@ ONION_ONLY="no"
|
|||
#MIRROR='http://httpredir.debian.org/debian'
|
||||
MIRROR='http://ftp.de.debian.org/debian'
|
||||
|
||||
# Whether to only install debian but nothing else
|
||||
DEBIAN_INSTALL_ONLY='no'
|
||||
|
||||
mesh_router_setup_script() {
|
||||
# create a setup script for a mesh router
|
||||
mesh_script_filename=$1
|
||||
|
@ -213,6 +216,10 @@ do
|
|||
shift
|
||||
MIRROR="$1"
|
||||
;;
|
||||
--debianonly|--basic|--minimal)
|
||||
shift
|
||||
DEBIAN_INSTALL_ONLY="$1"
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
|
@ -314,7 +321,8 @@ make $IMAGE_TYPE \
|
|||
IMAGE_NAME="$IMAGE_NAME" \
|
||||
PROJECT_REPO="$PROJECT_REPO" \
|
||||
MIRROR="$MIRROR" \
|
||||
BUILD_MIRROR="$MIRROR"
|
||||
BUILD_MIRROR="$MIRROR" \
|
||||
DEBIAN_INSTALL_ONLY="$DEBIAN_INSTALL_ONLY"
|
||||
|
||||
if [ ! "$?" = "0" ]; then
|
||||
echo $'Build failed'
|
||||
|
|
|
@ -75,6 +75,9 @@ TRACKER_PORT=6969
|
|||
# Whether sites are accessible only within a Tor browser
|
||||
ONION_ONLY="no"
|
||||
|
||||
# Whether to only install debian and nothing else
|
||||
DEBIAN_INSTALL_ONLY="no"
|
||||
|
||||
WIFI_INTERFACE='wlan0'
|
||||
|
||||
enable_eatmydata_override() {
|
||||
|
@ -136,27 +139,27 @@ iface eth0 inet static
|
|||
netmask 255.255.255.0
|
||||
gateway $ROUTER_IP_ADDRESS
|
||||
dns-nameservers $NAMESERVER1 $NAMESERVER2
|
||||
# Example to keep MAC address between reboots
|
||||
#hwaddress ether B5:A2:BE:3F:1A:FE
|
||||
# Example to keep MAC address between reboots
|
||||
#hwaddress ether B5:A2:BE:3F:1A:FE
|
||||
|
||||
# The secondary network interface
|
||||
#auto eth1
|
||||
#iface eth1 inet dhcp
|
||||
# The secondary network interface
|
||||
#auto eth1
|
||||
#iface eth1 inet dhcp
|
||||
|
||||
# WiFi Example
|
||||
#auto wlan0
|
||||
#iface wlan0 inet dhcp
|
||||
# wpa-ssid \"essid\"
|
||||
# wpa-psk \"password\"
|
||||
# WiFi Example
|
||||
#auto wlan0
|
||||
#iface wlan0 inet dhcp
|
||||
# wpa-ssid \"essid\"
|
||||
# wpa-psk \"password\"
|
||||
|
||||
# Ethernet/RNDIS gadget (g_ether)
|
||||
# ... or on host side, usbnet and random hwaddr
|
||||
# Note on some boards, usb0 is automaticly setup with an init script
|
||||
#iface usb0 inet static
|
||||
# address 192.168.7.2
|
||||
# netmask 255.255.255.0
|
||||
# network 192.168.7.0
|
||||
# gateway 192.168.7.1" > $rootdir/etc/network/interfaces
|
||||
# Ethernet/RNDIS gadget (g_ether)
|
||||
# ... or on host side, usbnet and random hwaddr
|
||||
# Note on some boards, usb0 is automaticly setup with an init script
|
||||
#iface usb0 inet static
|
||||
# address 192.168.7.2
|
||||
# netmask 255.255.255.0
|
||||
# network 192.168.7.0
|
||||
# gateway 192.168.7.1" > $rootdir/etc/network/interfaces
|
||||
|
||||
hexarray=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )
|
||||
a=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]}
|
||||
|
@ -211,6 +214,9 @@ admin_user_sudo() {
|
|||
}
|
||||
|
||||
create_generic_image() {
|
||||
if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ $GENERIC_IMAGE == "no" ]]; then
|
||||
return
|
||||
fi
|
||||
|
@ -380,7 +386,7 @@ atheros_wifi() {
|
|||
|
||||
|
||||
initialise_mesh() {
|
||||
if [[ $VARIANT != "mesh" ]]; then
|
||||
if [[ $VARIANT != "mesh" || $DEBIAN_INSTALL_ONLY != "no" ]]; then
|
||||
return
|
||||
fi
|
||||
freedombone-mesh-install -f firewall -r "${rootdir}"
|
||||
|
|
|
@ -55,6 +55,7 @@ export MINIMAL_INSTALL
|
|||
export SSH_PORT
|
||||
export ONION_ONLY
|
||||
export PROJECT_REPO
|
||||
export DEBIAN_INSTALL_ONLY
|
||||
|
||||
# Locate vmdebootstrap program fetched in Makefile
|
||||
basedir=`pwd`
|
||||
|
@ -169,6 +170,7 @@ sudo sed -i "s|MINIMAL_INSTALL=.*|MINIMAL_INSTALL=\"${MINIMAL_INSTALL}\"|g" $TEM
|
|||
sudo sed -i "s|SSH_PORT=.*|SSH_PORT=\"${SSH_PORT}\"|g" $TEMP_CUSTOMISE
|
||||
sudo sed -i "s|ONION_ONLY=.*|ONION_ONLY=\"${ONION_ONLY}\"|g" $TEMP_CUSTOMISE
|
||||
sudo sed -i "s|PROJECT_REPO=.*|PROJECT_REPO=\"${PROJECT_REPO}\"|g" $TEMP_CUSTOMISE
|
||||
sudo sed -i "s|DEBIAN_INSTALL_ONLY=.*|DEBIAN_INSTALL_ONLY=\"${DEBIAN_INSTALL_ONLY}\"|g" $TEMP_CUSTOMISE
|
||||
|
||||
echo $"starting $VMDEBOOTSTRAP"
|
||||
# Run vmdebootstrap script to create image
|
||||
|
|
Loading…
Reference in New Issue