2011-07-25 23:39:48 +00:00
|
|
|
<%page args="root, basearch, libdir, configdir"/>
|
2011-05-05 22:24:58 +00:00
|
|
|
<%
|
|
|
|
KEYMAP_OVERRIDE = "usr/share/anaconda/keymaps-override-%s" % arch.basearch
|
|
|
|
SCREENFONT = "usr/share/anaconda/screenfont-%s.gz" % arch.basearch
|
2011-05-27 22:51:55 +00:00
|
|
|
PYTHONDIR = glob("usr/"+arch.libdir+"/python?.?")[0]
|
2011-07-06 17:55:39 +00:00
|
|
|
stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop")
|
2011-05-05 22:24:58 +00:00
|
|
|
%>
|
|
|
|
|
|
|
|
## create_keymaps(arch.basearch)
|
|
|
|
%if arch.basearch not in ("s390", "s390x"):
|
|
|
|
%if exists(KEYMAP_OVERRIDE):
|
|
|
|
move ${KEYMAP_OVERRIDE} etc/keymaps.gz
|
|
|
|
%else:
|
|
|
|
runcmd ${root}/usr/libexec/anaconda/getkeymaps ${arch.basearch} ${root}/etc/keymaps.gz ${root}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
## create_screenfont()
|
|
|
|
moveif usr/share/anaconda/screenfont-${arch.basearch}.gz etc/screenfont.gz
|
|
|
|
|
|
|
|
## move_stubs()
|
|
|
|
move usr/share/anaconda/restart-anaconda usr/bin
|
|
|
|
move ${PYTHONDIR}/site-packages/pyanaconda/sitecustomize.py ${PYTHONDIR}/site-packages
|
|
|
|
%for stub in stubs:
|
|
|
|
moveif usr/share/anaconda/${stub}-stub usr/bin/${stub}
|
|
|
|
%endfor
|
|
|
|
|
|
|
|
## move_repos()
|
|
|
|
move etc/yum.repos.d etc/anaconda.repos.d
|
|
|
|
|
|
|
|
## misc_tree_modifications()
|
2011-07-06 21:12:42 +00:00
|
|
|
%if int(product.version) > 15:
|
2011-07-06 17:03:03 +00:00
|
|
|
## Configure systemd to start anaconda
|
|
|
|
remove etc/systemd/system/default.target
|
|
|
|
symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
|
|
|
|
append bin/login "#!/bin/bash"
|
|
|
|
append bin/login "exec -l /bin/bash"
|
|
|
|
%else:
|
|
|
|
## Set up loader as init
|
2011-07-06 23:10:48 +00:00
|
|
|
remove sbin/init
|
2011-07-06 17:03:03 +00:00
|
|
|
copy usr/${libdir}/anaconda/init sbin/init
|
|
|
|
symlink init sbin/halt
|
|
|
|
symlink init sbin/poweroff
|
|
|
|
symlink init sbin/reboot
|
2011-07-07 22:38:55 +00:00
|
|
|
remove sbin/runlevel sbin/telinit
|
2011-07-07 23:26:03 +00:00
|
|
|
## dracut does stuff to /run so these links won't work..
|
2011-07-07 22:38:55 +00:00
|
|
|
remove var/run
|
2011-07-07 23:26:03 +00:00
|
|
|
remove var/lock
|
|
|
|
move run var/run
|
|
|
|
symlink run/lock var/lock
|
|
|
|
## Since systemd won't be setting up sockets in /run for us..
|
2011-07-07 22:38:55 +00:00
|
|
|
mkdir var/run/dbus
|
2011-07-06 17:03:03 +00:00
|
|
|
%endif
|
2011-07-06 23:10:48 +00:00
|
|
|
symlink /sbin/init init
|
2011-06-24 22:19:34 +00:00
|
|
|
install ${configdir}/network etc/sysconfig
|
2011-05-05 22:24:58 +00:00
|
|
|
append etc/resolv.conf ""
|
2011-07-06 23:33:38 +00:00
|
|
|
copy usr/share/anaconda/lang-table etc
|
2011-05-05 22:24:58 +00:00
|
|
|
|
|
|
|
## get_config_files(configdir)
|
|
|
|
## gconf stuff
|
|
|
|
gconfset /apps/metacity/general/button_layout string :
|
|
|
|
gconfset /apps/metacity/general/action_right_click_titlebar string none
|
|
|
|
gconfset /apps/metacity/general/num_workspaces int 1
|
|
|
|
gconfset /apps/metacity/window_keybindings/close string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/run_command_window_screenshot string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/run_command_screenshot string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/switch_to_workspace_up string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/switch_to_workspace_down string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/switch_to_workspace_left string disabled
|
|
|
|
gconfset /apps/metacity/global_keybindings/switch_to_workspace_right string disabled
|
|
|
|
gconfset /desktop/gnome/interface/accessibility bool true
|
|
|
|
gconfset /desktop/gnome/interface/at-spi-corba bool true
|
|
|
|
## install files from configdir
|
|
|
|
install ${configdir}/rsyslog.conf etc
|
|
|
|
install ${configdir}/.bash_history root
|
|
|
|
install ${configdir}/.profile root
|
|
|
|
install ${configdir}/libuser.conf etc
|
|
|
|
%if exists(root+"/etc/selinux/targeted"):
|
|
|
|
install ${configdir}/selinux.config etc/selinux/config
|
|
|
|
%endif
|
|
|
|
|
|
|
|
## setup_sshd(configdir)
|
|
|
|
install ${configdir}/sshd_config.anaconda etc/ssh
|
|
|
|
install ${configdir}/pam.sshd etc/pam.d/sshd
|
|
|
|
install ${configdir}/pam.sshd etc/pam.d/login
|
|
|
|
install ${configdir}/pam.sshd etc/pam.d/remote
|
|
|
|
append etc/passwd "sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin"
|
|
|
|
append etc/passwd "install:x:0:0:root:/root:/sbin/loader"
|
|
|
|
append etc/shadow "root::14438:0:99999:7:::"
|
|
|
|
append etc/shadow "install::14438:0:99999:7:::"
|
|
|
|
chmod etc/shadow 400
|
|
|
|
|
|
|
|
%if arch.basearch in ("s390", "s390x"):
|
|
|
|
## misc_s390_modifications()
|
|
|
|
remove sbin/init
|
|
|
|
move usr/share/anaconda/linuxrc.s390 sbin/init
|
2011-05-27 15:03:38 +00:00
|
|
|
## generate ssh keys
|
|
|
|
runcmd ssh-keygen -q -C "" -N "" -t rsa1 -f ${root}/etc/ssh/ssh_host_key
|
|
|
|
runcmd ssh-keygen -q -C "" -N "" -t rsa -f ${root}/etc/ssh/ssh_host_rsa_key
|
|
|
|
runcmd ssh-keygen -q -C "" -N "" -t dsa -f ${root}/etc/ssh/ssh_host_dsa_key
|
|
|
|
chmod etc/ssh/ssh_host*_key 600
|
|
|
|
chmod etc/ssh/ssh_host*_key.pub 644
|
2011-05-05 22:24:58 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
## get_anaconda_portions()
|
|
|
|
move usr/${libdir}/anaconda/loader sbin
|
|
|
|
move usr/share/anaconda/loader.tr etc
|
|
|
|
move usr/libexec/anaconda/auditd sbin
|
|
|
|
|
2011-05-14 07:25:44 +00:00
|
|
|
## move_modules()
|
|
|
|
move lib/modules modules
|
|
|
|
move lib/firmware firmware
|
|
|
|
symlink ../modules lib/modules
|
|
|
|
symlink ../firmware lib/firmware
|
|
|
|
|
2011-05-27 15:03:38 +00:00
|
|
|
## create_depmod_conf()
|
|
|
|
append etc/depmod.d/dd.conf "search updates built-in"
|
2011-06-30 20:05:43 +00:00
|
|
|
|
|
|
|
## TODO: we could run prelink here if we wanted?
|