mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-22 06:00:40 +01:00
integrate-distro.sh: Ongoing improvements
- Add ahci to initrd modules (will hopefully enable SATA-hotplut) - Beautify usage message - Fix detection of mounted directories - Fix set_sysconf_value with values containing slashes - Warn about non-existent files taken from the host - Create dhcpd.conf.d from scratch - Remove -s 853x480 mkinitrd parameter since it is now made illegal
This commit is contained in:
parent
db104ff490
commit
89ca484a66
1 changed files with 22 additions and 10 deletions
|
|
@ -5,8 +5,10 @@
|
||||||
arch=`uname -m`
|
arch=`uname -m`
|
||||||
o_name=suse-11.4
|
o_name=suse-11.4
|
||||||
cmd=install
|
cmd=install
|
||||||
initrd_modules="aufs via-rhine e1000 e1000e myri10ge forcedeth usbcore ohci-hcd ehci-hcd uhci-hcd hid usbhid"
|
initrd_modules="aufs via-rhine e1000 e1000e myri10ge forcedeth usbcore ohci-hcd ehci-hcd uhci-hcd hid usbhid ahci"
|
||||||
|
# ata_piix (as opposed to ahci) doesn't seem to support sata-hotplugging
|
||||||
kernel_version=2.6.37.4
|
kernel_version=2.6.37.4
|
||||||
|
#kernel_version=2.6.37.6-jng135-4
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
unused_pkgs="
|
unused_pkgs="
|
||||||
|
|
@ -106,7 +108,6 @@ payload_pkgs="
|
||||||
unclutter
|
unclutter
|
||||||
|
|
||||||
xterm
|
xterm
|
||||||
fetchmsttfonts
|
|
||||||
|
|
||||||
man
|
man
|
||||||
findutils-locate
|
findutils-locate
|
||||||
|
|
@ -139,13 +140,23 @@ payload_pkgs="
|
||||||
snmp-manager-run
|
snmp-manager-run
|
||||||
ftp-server-run
|
ftp-server-run
|
||||||
bprof-run
|
bprof-run
|
||||||
|
|
||||||
|
fetchmsttfonts
|
||||||
"
|
"
|
||||||
|
|
||||||
# -- functions
|
# -- functions
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
usage: $myname -h
|
usage: $myname -h
|
||||||
$myname [-d target-device] [-n target-name] [-p file with root password] [install|mount|unmount]
|
$myname [options] [install|mount|unmount]
|
||||||
|
|
||||||
|
options:
|
||||||
|
-d target-device
|
||||||
|
-n target-name
|
||||||
|
-p file with root password
|
||||||
|
-a architecture
|
||||||
"
|
"
|
||||||
[ "$1" ] && exit $1
|
[ "$1" ] && exit $1
|
||||||
}
|
}
|
||||||
|
|
@ -301,7 +312,7 @@ check_mount()
|
||||||
{
|
{
|
||||||
local canonicalized=`canonicalize $root/$1`
|
local canonicalized=`canonicalize $root/$1`
|
||||||
[ ! "$canonicalized" ] && return 1
|
[ ! "$canonicalized" ] && return 1
|
||||||
grep -q $canonicalized /proc/mounts || return 1
|
grep -q " $canonicalized " /proc/mounts || return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -632,8 +643,9 @@ setup_boot_loader_net()
|
||||||
-i /boot/initrd-netboot-$kernel_version \
|
-i /boot/initrd-netboot-$kernel_version \
|
||||||
-M /boot/System.map-$kernel_version \
|
-M /boot/System.map-$kernel_version \
|
||||||
-m "$initrd_modules" \
|
-m "$initrd_modules" \
|
||||||
-d jan://blub/dings \
|
-d jan://blub/dings
|
||||||
-s "853x480"
|
|
||||||
|
# -s "853x480" is illegal in newer mkinitrd (as of SuSE 11.4)
|
||||||
|
|
||||||
(cd $root/boot; ln -sf initrd-netboot-$kernel_version initrd-netboot)
|
(cd $root/boot; ln -sf initrd-netboot-$kernel_version initrd-netboot)
|
||||||
}
|
}
|
||||||
|
|
@ -723,8 +735,8 @@ set_sysconf_value()
|
||||||
{
|
{
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local key="$2"
|
local key="$2"
|
||||||
local value="$3"
|
local value="`echo $3 | sed 's%/%\\\\/%g'`"
|
||||||
sed "s/^ *$key *=.*/$key=$value/" $root/$file > $root/$file.tmp
|
sed "s/^ *$key *=.*/$key=\"$value\"/" $root/$file > $root/$file.tmp
|
||||||
mv $root/$file.tmp $root/$file
|
mv $root/$file.tmp $root/$file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -754,12 +766,12 @@ cmd_install()
|
||||||
/etc/sysconfig/clock \
|
/etc/sysconfig/clock \
|
||||||
/etc/openldap/schema/authldap.schema \
|
/etc/openldap/schema/authldap.schema \
|
||||||
/etc/opt/bprof/bprof.secret \
|
/etc/opt/bprof/bprof.secret \
|
||||||
/etc/dhcpd.conf.d \
|
|
||||||
; do
|
; do
|
||||||
install -d -m 755 `dirname $root$c`
|
install -d -m 755 `dirname $root$c`
|
||||||
cp -rp $c $root$c
|
cp -rp $c $root$c || die "failed to copy $c to $root $c"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
install -d -m 755 $root/etc/dhcpd.conf.d
|
||||||
make_netboot_etc_ldap_conf > $root/etc/ldap.conf.netboot
|
make_netboot_etc_ldap_conf > $root/etc/ldap.conf.netboot
|
||||||
make_netboot_etc_openldap_ldap_conf > $root/etc/openldap/ldap.conf.netboot
|
make_netboot_etc_openldap_ldap_conf > $root/etc/openldap/ldap.conf.netboot
|
||||||
make_netboot_etc_hosts > $root/etc/hosts.netboot
|
make_netboot_etc_hosts > $root/etc/hosts.netboot
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue