[Frugalware-darcs] setup-current: 0.2.6

VMiklos mamajom at axelero.hu
Thu Mar 16 18:04:04 CET 2006


[0.2.6
VMiklos <mamajom at axelero.hu>**20050401231935] {
hunk ./setup 32
+
+# keyboard section
+kbdbacktitle="$kbdconf - Frugalware $osver $setup"
+
hunk ./setup 89
-		--title "$welcome Frugalware $osver" --aspect 20 \
+		--title "$welcome" --aspect 20 \
hunk ./setup 93
+# keyboard section
+function ask_map()
+{
+	selmap=`mktemp /tmp/tmp.XXXXXX`
+	selmapf=`mktemp /tmp/tmp.XXXXXX`
+	chmod +x $selmap
+	echo "dialog --aspect 20 --backtitle \"$kbdbacktitle\" --title \"$selmapt\" \\">$selmap
+	echo "--default-item \"`find /usr/share/kbd/keymaps/i386/* -name *map.gz|grep -v include|sed 's|^/usr/share/kbd/keymaps/i386/||'|grep $language|sed -n '1 p'`\" \\">>$selmap
+	echo "--menu \"$selmapd\" 0 0 0 \\">>$selmap
+	for i in `find /usr/share/kbd/keymaps/i386/* -name *map.gz|grep -v include|sed 's|^/usr/share/kbd/keymaps/i386/||'`
+	do
+		echo "\"$i\" \"   \" \\">>$selmap
+	done
+	echo "2>$selmapf">>$selmap
+	$selmap || return 1
+	rm $selmap
+	mapfile=/usr/share/kbd/keymaps/i386/`cat $selmapf`
+	rm $selmapf
+	map=`echo $mapfile|sed 's|^.*/\(.*\).map.gz$|\1|'`
+}
+
+function set_keymap()
+{
+	if ! ask_map; then
+		mapfile=/usr/share/kbd/keymaps/i386/qwerty/us.map.gz
+		map=us
+	fi
+	loadkeys $mapfile &>$logdev
+	cat << EOF > /tmp/keymap
+# /etc/sysconfig/keymap
+
+# sepecify the keyboard map, maps are in /usr/share/kbd/keymaps
+
+keymap=$map
+EOF
+}
+
hunk ./setup 622
+
+# keyboard section
+set_keymap # set keyboard map && creates /tmp/keymap
+
hunk ./setup 640
-[ -d $target/etc/profile.d ] || mkdir -p $target/etc/profile.d
+[ -d $target/etc/profile.d ] || mkdir -p $target/etc/{profile.d,sysconfig}
hunk ./setup 643
+mv -f /tmp/keymap $target/etc/sysconfig/keymap
hunk ./setup.en 1
+# (c) 2003-2004 Vajna Miklos <mamajom at axelero.hu>
+# (c)           Patrick J. Volkerding, <volkerdi at slackware.com>
+
hunk ./setup.en 16
-welcome="Welcome to"
+welcome="Welcome to Frugalware $osver"
hunk ./setup.en 20
+
+# keyboard section
+kbdconf="Configuring the keyboard"
+selmapt="Keyboard map selection"
+selmapd="You may select one of the following keyboard maps.  If you do not select a keyboard map, 'qwerty/us.map.gz' (the US keyboard map) is the default.  Usethe UP/DOWN arrow keys and PageUp/PageDown to scroll through the whole list of choices."
hunk ./setup.hu 2
-welcome="Üdvözli a"
+welcome="Üdvözli a Frugalware $osver"
}


More information about the Frugalware-darcs mailing list