diff --git a/RootStock-NG.sh b/RootStock-NG.sh index b2cb6ea243443e05d3c6ab0962b3ef6f79739ca9..67d8acfb811e4f15b88a542b778c5cbe0ef6ac53 100755 --- a/RootStock-NG.sh +++ b/RootStock-NG.sh @@ -66,7 +66,7 @@ run_project () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" diff --git a/beagleboard.org_image.sh b/beagleboard.org_image.sh index d524394a0a13d799c36a430cf843f931b4516ba1..ac69e1e9c9208f74ef14f4db4f8d96e67bd1b99c 100755 --- a/beagleboard.org_image.sh +++ b/beagleboard.org_image.sh @@ -79,16 +79,16 @@ minimal_armel () { case "${release}" in wheezy) #http://www.debian.org/releases/wheezy/ - export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" ;; quantal) - export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" ;; saucy) - export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" ;; *) - export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}" ;; esac @@ -101,7 +101,7 @@ minimal_armel () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -285,8 +285,9 @@ pkg_list () { } is_ubuntu () { + deb_distribution="ubuntu" + rfs_hostname="beaglebone" - distro="ubuntu" rfs_username="ubuntu" rfs_password="temppwd" rfs_fullname="Demo User" @@ -298,8 +299,9 @@ is_ubuntu () { } is_debian () { + deb_distribution="debian" + rfs_hostname="beaglebone" - distro="debian" rfs_username="debian" rfs_password="temppwd" rfs_fullname="Demo User" diff --git a/eewiki_barefs_image.sh b/eewiki_barefs_image.sh index 8e78d7cd538487758f8a4bfe63b848ba1c88da6c..ed76947efc1ff96f5e9ea39e7a646778d7651e2b 100755 --- a/eewiki_barefs_image.sh +++ b/eewiki_barefs_image.sh @@ -40,16 +40,16 @@ minimal_armel () { case "${release}" in wheezy) #http://www.debian.org/releases/wheezy/ - export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" ;; quantal) - export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" ;; saucy) - export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" ;; *) - export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}" ;; esac @@ -59,7 +59,7 @@ minimal_armel () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -134,7 +134,7 @@ production () { if [ -f ${DIR}/release ] ; then if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then if [ -d /mnt/farm/testing/pending/ ] ; then - cp -v arm*.tar /mnt/farm/images/ + cp -v arm*.tar /mnt/farm/images/ || true actual_dir="/mnt/farm/testing/pending" fi fi @@ -175,8 +175,9 @@ pkg_list () { } is_ubuntu () { + deb_distribution="ubuntu" + rfs_hostname="arm" - distro="ubuntu" rfs_username="ubuntu" rfs_password="temppwd" rfs_fullname="Demo User" @@ -188,8 +189,9 @@ is_ubuntu () { } is_debian () { + deb_distribution="debian" + rfs_hostname="arm" - distro="debian" rfs_username="debian" rfs_password="temppwd" rfs_fullname="Demo User" diff --git a/eewiki_base_image.sh b/eewiki_base_image.sh index 54335ec0e47e4770e6c027c035d04a5d64792028..69cbf5a608cd2f94b293f7e780dd470f0710aac5 100755 --- a/eewiki_base_image.sh +++ b/eewiki_base_image.sh @@ -41,16 +41,16 @@ minimal_armel () { case "${release}" in wheezy) #http://www.debian.org/releases/wheezy/ - export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" ;; quantal) - export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" ;; saucy) - export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" ;; *) - export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}" ;; esac @@ -60,7 +60,7 @@ minimal_armel () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -135,7 +135,7 @@ production () { if [ -f ${DIR}/release ] ; then if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then if [ -d /mnt/farm/testing/pending/ ] ; then - cp -v arm*.tar /mnt/farm/images/ + cp -v arm*.tar /mnt/farm/images/ || true actual_dir="/mnt/farm/testing/pending" fi fi @@ -178,8 +178,9 @@ pkg_list () { } is_ubuntu () { + deb_distribution="ubuntu" + rfs_hostname="arm" - distro="ubuntu" rfs_username="ubuntu" rfs_password="temppwd" rfs_fullname="Demo User" @@ -191,8 +192,9 @@ is_ubuntu () { } is_debian () { + deb_distribution="debian" + rfs_hostname="arm" - distro="debian" rfs_username="debian" rfs_password="temppwd" rfs_fullname="Demo User" diff --git a/generic_image.sh b/generic_image.sh index dd9b0f2fcb8d6d0cdb263bc8093ec9ac27089dbf..ca2b00d9b42bfdcc57c0d4b359c550c2e453182a 100755 --- a/generic_image.sh +++ b/generic_image.sh @@ -45,7 +45,7 @@ run_rootstock () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -83,18 +83,18 @@ if [ -f ${DIR}/circuitco.host ] ; then . ${DIR}/host/circuitco-host.sh fi -if [ ! "${distro}" ] ; then - ##Selects which base distro - distro="debian" - #distro="ubuntu" +if [ ! "${deb_distribution}" ] ; then + ##Selects which base deb_distribution + deb_distribution="debian" + #deb_distribution="ubuntu" fi if [ ! "${release}" ] ; then - if [ "x${distro}" = "xdebian" ] ; then + if [ "x${deb_distribution}" = "xdebian" ] ; then release="wheezy" #release="jessie" #release="sid" fi - if [ "x${distro}" = "xubuntu" ] ; then + if [ "x${deb_distribution}" = "xubuntu" ] ; then #release="precise" #release="quantal" #release="raring" @@ -104,11 +104,11 @@ if [ ! "${release}" ] ; then fi if [ ! "${dpkg_arch}" ] ; then ##Selects which base archtecture - if [ "x${distro}" = "xdebian" ] ; then + if [ "x${deb_distribution}" = "xdebian" ] ; then dpkg_arch="armhf" #dpkg_arch="armel" fi - if [ "x${distro}" = "xubuntu" ] ; then + if [ "x${deb_distribution}" = "xubuntu" ] ; then dpkg_arch="armhf" fi fi @@ -118,10 +118,10 @@ if [ ! "${image_name}" ] ; then fi if [ ! "${export_filename}" ] ; then ##Generic file name - export_filename="${distro}-${release}-${image_name}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_name}-${dpkg_arch}-${time}" fi rfs_hostname=${rfs_hostname:-"arm"} -rfs_username=${rfs_username:-"${distro}"} +rfs_username=${rfs_username:-"${deb_distribution}"} rfs_password=${rfs_password:-"temppwd"} rfs_fullname=${rfs_fullname:-"Demo User"} diff --git a/rcn-ee_image.sh b/rcn-ee_image.sh index 0e67fbdb5b798da8c07dc8dc630958116808c16a..5098b039ebcb760ae36b27a24004a95190f2def8 100755 --- a/rcn-ee_image.sh +++ b/rcn-ee_image.sh @@ -44,16 +44,16 @@ minimal_armel () { case "${release}" in wheezy) #http://www.debian.org/releases/wheezy/ - export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" ;; quantal) - export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" ;; saucy) - export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" ;; *) - export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}" ;; esac @@ -69,7 +69,7 @@ minimal_armel () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -149,7 +149,7 @@ production () { if [ -f ${DIR}/release ] ; then if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then if [ -d /mnt/farm/testing/pending/ ] ; then - cp -v arm*.tar /mnt/farm/images/ + cp -v arm*.tar /mnt/farm/images/ || true actual_dir="/mnt/farm/testing/pending" fi fi @@ -240,8 +240,9 @@ pkg_list () { } is_ubuntu () { + deb_distribution="ubuntu" + rfs_hostname="arm" - distro="ubuntu" rfs_username="ubuntu" rfs_password="temppwd" rfs_fullname="Demo User" @@ -253,8 +254,9 @@ is_ubuntu () { } is_debian () { + deb_distribution="debian" + rfs_hostname="arm" - distro="debian" rfs_username="debian" rfs_password="temppwd" rfs_fullname="Demo User" diff --git a/rcn-ee_test_image.sh b/rcn-ee_test_image.sh index 2a12702836e133dbb534f6eb40b6b192f309111d..1649e9b01bc0f42beccf11c2a941793224b775ee 100755 --- a/rcn-ee_test_image.sh +++ b/rcn-ee_test_image.sh @@ -44,16 +44,16 @@ minimal_armel () { case "${release}" in wheezy) #http://www.debian.org/releases/wheezy/ - export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}" ;; quantal) - export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}" ;; saucy) - export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}" ;; *) - export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}" + export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}" ;; esac @@ -69,7 +69,7 @@ minimal_armel () { tempdir="${tempdir}" export_filename="${export_filename}" - distro="${distro}" + deb_distribution="${deb_distribution}" release="${release}" dpkg_arch="${dpkg_arch}" time="${time}" @@ -149,7 +149,7 @@ production () { if [ -f ${DIR}/release ] ; then if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then if [ -d /mnt/farm/testing/pending/ ] ; then - cp -v arm*.tar /mnt/farm/images/ + cp -v arm*.tar /mnt/farm/images/ || true actual_dir="/mnt/farm/testing/pending" fi fi @@ -211,8 +211,9 @@ pkg_list () { } is_ubuntu () { + deb_distribution="ubuntu" + rfs_hostname="arm" - distro="ubuntu" rfs_username="ubuntu" rfs_password="temppwd" rfs_fullname="Demo User" @@ -224,8 +225,9 @@ is_ubuntu () { } is_debian () { + deb_distribution="debian" + rfs_hostname="arm" - distro="debian" rfs_username="debian" rfs_password="temppwd" rfs_fullname="Demo User" diff --git a/releases.sh b/releases.sh index 99078d7340669fcd39cdd10b8e648424ac84a481..d125d6cef98cc160fe16554d7e9af8f21860b840 100644 --- a/releases.sh +++ b/releases.sh @@ -25,7 +25,7 @@ machinekit_release () { #is_debian - inlined below with some changes rfs_hostname="arm" - distro="debian" + deb_distribution="debian" rfs_username="linuxcnc" rfs_password="linuxcnc" rfs_fullname="Tux Chipcutter" diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 2c95d7bef35496da7be2cb574a759f869c3d0abf..539e68b7ad9a1578676d79e9980a3dd8de4e1690 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -37,8 +37,8 @@ check_defines () { exit 1 fi - if [ ! "${distro}" ] ; then - echo "scripts/deboostrap_first_stage.sh: Error: distro undefined" + if [ ! "${deb_distribution}" ] ; then + echo "scripts/deboostrap_first_stage.sh: Error: deb_distribution undefined" exit 1 fi @@ -57,7 +57,7 @@ check_defines () { fi if [ ! "${deb_mirror}" ] ; then - case "${distro}" in + case "${deb_distribution}" in debian) deb_mirror="ftp.us.debian.org/debian/" ;; @@ -68,7 +68,7 @@ check_defines () { fi if [ ! "${deb_components}" ] ; then - case "${distro}" in + case "${deb_distribution}" in debian) deb_components="main contrib non-free" ;; @@ -83,7 +83,7 @@ check_defines () { if [ "${user_name}" ] ; then rfs_username="${user_name}" else - rfs_username="${distro}" + rfs_username="${deb_distribution}" echo "rfs_username: undefined using: [${rfs_username}]" fi fi @@ -282,7 +282,7 @@ sudo mv /tmp/hosts ${tempdir}/etc/hosts echo "${rfs_hostname}" > /tmp/hostname sudo mv /tmp/hostname ${tempdir}/etc/hostname -case "${distro}" in +case "${deb_distribution}" in debian) sudo cp ${DIR}/target/init_scripts/generic-debian.sh ${tempdir}/etc/init.d/boot_scripts.sh sudo cp ${DIR}/target/init_scripts/capemgr-debian.sh ${tempdir}/etc/init.d/capemgr.sh @@ -290,6 +290,7 @@ debian) #Backward compatibility, as setup_sdcard.sh expects [lsb_release -si > /etc/rcn-ee.conf] echo "distro=Debian" > /tmp/rcn-ee.conf + echo "deb_distribution=Debian" > /tmp/rcn-ee.conf echo "rfs_username=${rfs_username}" >> /tmp/rcn-ee.conf echo "release_date=${time}" >> /tmp/rcn-ee.conf echo "third_party_modules=${third_party_modules}" >> /tmp/rcn-ee.conf @@ -326,6 +327,7 @@ ubuntu) #Backward compatibility, as setup_sdcard.sh expects [lsb_release -si > /etc/rcn-ee.conf] echo "distro=Ubuntu" > /tmp/rcn-ee.conf + echo "deb_distribution=Ubuntu" > /tmp/rcn-ee.conf echo "rfs_username=${rfs_username}" >> /tmp/rcn-ee.conf echo "release_date=${time}" >> /tmp/rcn-ee.conf sudo mv /tmp/rcn-ee.conf ${tempdir}/etc/rcn-ee.conf @@ -368,10 +370,10 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ EOF chmod +x /usr/sbin/policy-rc.d - #set distro: + #set deb_distribution: . /etc/rcn-ee.conf - if [ "x\${distro}" = "xUbuntu" ] ; then + if [ "x\${deb_distribution}" = "xUbuntu" ] ; then dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl fi @@ -428,7 +430,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ if [ "x\${pkg_is_not_installed}" = "x" ] ; then - case "\${distro}" in + case "\${deb_distribution}" in Debian) echo "Log: (chroot) Debian: setting up locales: [en_US.UTF-8]" sed -i -e 's:# en_US.UTF-8 UTF-8:en_US.UTF-8 UTF-8:g' /etc/locale.gen @@ -575,7 +577,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ useradd -G "\${default_groups}" -s /bin/bash -m -p \${pass_crypt} -c "${rfs_fullname}" ${rfs_username} - case "\${distro}" in + case "\${deb_distribution}" in Debian) echo "default username:password is [${rfs_username}:${rfs_password}]" >> /etc/issue echo "" >> /etc/issue @@ -628,7 +630,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ } startup_script () { - case "\${distro}" in + case "\${deb_distribution}" in Debian) debian_startup_script ;; @@ -669,7 +671,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ rm -f /usr/sbin/policy-rc.d - if [ "x\${distro}" = "xUbuntu" ] ; then + if [ "x\${deb_distribution}" = "xUbuntu" ] ; then rm -f /sbin/initctl || true dpkg-divert --local --rename --remove /sbin/initctl fi @@ -843,20 +845,20 @@ if [ "x${chroot_COPY_SETUP_SDCARD}" = "xenable" ] ; then fi if [ "x${chroot_ENABLE_DEB_SRC}" = "xenable" ] ; then - echo "Log: packaging src files: [${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar]" + echo "Log: packaging src files: [${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar]" cd ${tempdir}/tmp/pkg_src/ - sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar . + sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar . cd ${tempdir} - ls -lh ${DIR}/deploy/${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar + ls -lh ${DIR}/deploy/${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar sudo rm -rf ${tempdir}/tmp/pkg_src/ || true report_size fi cd ${tempdir} -echo "Log: packaging rootfs: [${dpkg_arch}-rootfs-${distro}-${release}.tar]" -sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${distro}-${release}.tar . +echo "Log: packaging rootfs: [${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar]" +sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar . cd ${DIR}/ -ls -lh ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${distro}-${release}.tar +ls -lh ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar sudo chown -R ${USER}:${USER} ${DIR}/deploy/${export_filename}/ # diff --git a/scripts/debootstrap.sh b/scripts/debootstrap.sh index 1a102f0bf1515fa2c650cb4f912142a1dfb031d2..a618a39bbf659b4162364c869a2a7a5269a2cddf 100755 --- a/scripts/debootstrap.sh +++ b/scripts/debootstrap.sh @@ -30,8 +30,8 @@ check_defines () { exit 1 fi - if [ ! "${distro}" ] ; then - echo "scripts/deboostrap_first_stage.sh: Error: distro undefined" + if [ ! "${deb_distribution}" ] ; then + echo "scripts/deboostrap_first_stage.sh: Error: deb_distribution undefined" exit 1 fi @@ -50,7 +50,7 @@ check_defines () { fi if [ ! "${deb_mirror}" ] ; then - case "${distro}" in + case "${deb_distribution}" in debian) deb_mirror="ftp.us.debian.org/debian/" ;; @@ -79,7 +79,7 @@ report_size () { check_defines -echo "Log: Creating: [${distro}] [${release}] image for: [${dpkg_arch}]" +echo "Log: Creating: [${deb_distribution}] [${release}] image for: [${dpkg_arch}]" if [ "${apt_proxy}" ] ; then echo "Log: using apt proxy: [${apt_proxy}]"