mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
improved ARCH detection and bootstrap pkg.txz installation
This commit is contained in:
parent
ffe971290a
commit
fdd398fc8b
1 changed files with 22 additions and 28 deletions
|
@ -721,49 +721,43 @@ install_arch_post() {
|
|||
# FreeBSD Install Functions
|
||||
#
|
||||
install_freebsd_90_stable_deps() {
|
||||
if [ "$CPU_VENDOR_ID_L" = "AuthenticAMD" -a $CPU_ARCH_L = "x86_64" ]; then
|
||||
local ARCH="amd64"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "x86_64" ]; then
|
||||
if [ $CPU_ARCH_L = "amd64" ]; then
|
||||
local ARCH="x86:64"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "i386" ]; then
|
||||
local ARCH="i386"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "i686" ]; then
|
||||
elif [ $CPU_ARCH_L = "x86_64" ]; then
|
||||
local ARCH="x86:64"
|
||||
elif [ $CPU_ARCH_L = "i386" ]; then
|
||||
local ARCH="x86:32"
|
||||
elif [ $CPU_ARCH_L = "i686" ]; then
|
||||
local ARCH="x86:32"
|
||||
else
|
||||
local ARCH=$CPU_ARCH
|
||||
fi
|
||||
|
||||
portsnap fetch extract update
|
||||
cd /usr/ports/ports-mgmt/pkg
|
||||
make install clean
|
||||
cd
|
||||
fetch http://pkgbeta.freebsd.org/freebsd:9:${ARCH}/latest/Latest/pkg.txz
|
||||
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
|
||||
./pkg-static add ./pkg.txz
|
||||
/usr/local/sbin/pkg2ng
|
||||
echo "PACKAGESITE: http://pkgbeta.freebsd.org/freebsd-9-${ARCH}/latest" > /usr/local/etc/pkg.conf
|
||||
echo "PACKAGESITE: http://pkgbeta.freebsd.org/freebsd:9:${ARCH}/latest" > /usr/local/etc/pkg.conf
|
||||
|
||||
/usr/local/sbin/pkg install -y swig
|
||||
/usr/local/sbin/pkg install -y swig
|
||||
}
|
||||
|
||||
install_freebsd_git_deps() {
|
||||
if [ "$CPU_VENDOR_ID_L" = "AuthenticAMD" -a $CPU_ARCH_L = "x86_64" ]; then
|
||||
local ARCH="amd64"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "x86_64" ]; then
|
||||
if [ $CPU_ARCH_L = "amd64" ]; then
|
||||
local ARCH="x86:64"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "i386" ]; then
|
||||
local ARCH="i386"
|
||||
elif [ "$CPU_VENDOR_ID_L" = "GenuineIntel" -a $CPU_ARCH_L = "i686" ]; then
|
||||
elif [ $CPU_ARCH_L = "x86_64" ]; then
|
||||
local ARCH="x86:64"
|
||||
elif [ $CPU_ARCH_L = "i386" ]; then
|
||||
local ARCH="x86:32"
|
||||
elif [ $CPU_ARCH_L = "i686" ]; then
|
||||
local ARCH="x86:32"
|
||||
else
|
||||
local ARCH=$CPU_ARCH
|
||||
fi
|
||||
|
||||
portsnap fetch extract update
|
||||
cd /usr/ports/ports-mgmt/pkg
|
||||
make install clean
|
||||
cd
|
||||
fetch http://pkgbeta.freebsd.org/freebsd:9:${ARCH}/latest/Latest/pkg.txz
|
||||
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
|
||||
./pkg-static add ./pkg.txz
|
||||
/usr/local/sbin/pkg2ng
|
||||
echo "PACKAGESITE: http://pkgbeta.freebsd.org/freebsd-9-${ARCH}/latest" > /usr/local/etc/pkg.conf
|
||||
echo "PACKAGESITE: http://pkgbeta.freebsd.org/freebsd:9:${ARCH}/latest" > /usr/local/etc/pkg.conf
|
||||
|
||||
/usr/local/sbin/pkg install -y swig
|
||||
/usr/local/sbin/pkg install -y swig
|
||||
}
|
||||
|
||||
install_freebsd_90_stable() {
|
||||
|
|
Loading…
Add table
Reference in a new issue