2011-08-09 21:37:43 +00:00
|
|
|
## runtime-postinstall.tmpl
|
|
|
|
## post-install setup required to make the system work.
|
|
|
|
|
2011-07-25 23:39:48 +00:00
|
|
|
<%page args="root, basearch, libdir, configdir"/>
|
2011-05-05 22:24:58 +00:00
|
|
|
<%
|
2011-07-25 23:44:14 +00:00
|
|
|
PYTHONDIR = glob("usr/"+libdir+"/python?.?")[0]
|
2011-07-06 17:55:39 +00:00
|
|
|
stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop")
|
2011-10-21 20:12:12 +00:00
|
|
|
configdir = configdir + "/common"
|
2011-05-05 22:24:58 +00:00
|
|
|
%>
|
|
|
|
|
|
|
|
## move_stubs()
|
|
|
|
move usr/share/anaconda/restart-anaconda usr/bin
|
|
|
|
move ${PYTHONDIR}/site-packages/pyanaconda/sitecustomize.py ${PYTHONDIR}/site-packages
|
|
|
|
%for stub in stubs:
|
2011-10-26 17:06:05 +00:00
|
|
|
-move usr/share/anaconda/${stub}-stub usr/bin/${stub}
|
2011-05-05 22:24:58 +00:00
|
|
|
%endfor
|
|
|
|
|
|
|
|
## move_repos()
|
|
|
|
move etc/yum.repos.d etc/anaconda.repos.d
|
|
|
|
|
2011-09-08 00:36:22 +00:00
|
|
|
## Configure systemd to start anaconda
|
|
|
|
remove etc/systemd/system/default.target
|
|
|
|
remove etc/systemd/system/default.target.wants/*
|
|
|
|
symlink /lib/systemd/system/anaconda.target etc/systemd/system/default.target
|
2012-03-16 20:53:52 +00:00
|
|
|
## remove/disable unwanted systemd services
|
2011-08-09 21:39:07 +00:00
|
|
|
removefrom systemd-units /lib/systemd/system/kexec*
|
|
|
|
removefrom systemd-units /lib/systemd/system/local-fs.target.wants/media.mount
|
|
|
|
removefrom systemd-units /lib/systemd/system/media.mount
|
|
|
|
removefrom systemd-units /lib/systemd/system/*plymouth*
|
|
|
|
removefrom systemd-units /lib/systemd/system/quota*.service
|
|
|
|
removefrom systemd-units /lib/systemd/system/systemd-remount-api-vfs.service
|
|
|
|
removefrom ConsoleKit /lib/systemd/system/*
|
2012-03-16 20:53:52 +00:00
|
|
|
removefrom initscripts /lib/systemd/system/local-fs.target.wants/fedora-storage* /lib/systemd/system/basic.target.wants/*
|
2011-08-09 21:39:07 +00:00
|
|
|
removefrom lvm2 /lib/systemd/system/*
|
|
|
|
removefrom mdadm /lib/systemd/system/*
|
2011-08-09 21:37:43 +00:00
|
|
|
|
|
|
|
## install some basic configuration files
|
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-10-31 14:55:15 +00:00
|
|
|
install ${configdir}/i18n etc/sysconfig
|
2011-05-05 22:24:58 +00:00
|
|
|
install ${configdir}/rsyslog.conf etc
|
2011-10-21 20:12:12 +00:00
|
|
|
install ${configdir}/bash_history root/.bash_history
|
|
|
|
install ${configdir}/profile root/.profile
|
2011-05-05 22:24:58 +00:00
|
|
|
install ${configdir}/libuser.conf etc
|
2012-04-25 20:21:27 +00:00
|
|
|
install ${configdir}/sysctl.conf etc/sysctl.d/anaconda.conf
|
2011-05-05 22:24:58 +00:00
|
|
|
%if exists(root+"/etc/selinux/targeted"):
|
|
|
|
install ${configdir}/selinux.config etc/selinux/config
|
|
|
|
%endif
|
|
|
|
|
2011-08-09 21:37:43 +00:00
|
|
|
## set up sshd
|
2011-05-05 22:24:58 +00:00
|
|
|
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
|
2011-11-02 18:48:13 +00:00
|
|
|
|
|
|
|
## set up "install" user account
|
2012-02-14 21:56:51 +00:00
|
|
|
append etc/passwd "install:x:0:0:root:/root:/sbin/anaconda"
|
2011-05-05 22:24:58 +00:00
|
|
|
append etc/shadow "install::14438:0:99999:7:::"
|
2011-11-02 18:48:13 +00:00
|
|
|
## remove root password
|
2011-11-07 15:58:51 +00:00
|
|
|
replace "root:\*:" "root::" etc/shadow
|
2011-05-05 22:24:58 +00:00
|
|
|
|
2011-08-09 21:37:43 +00:00
|
|
|
## s390-specific setup
|
2011-07-25 23:44:14 +00:00
|
|
|
%if basearch in ("s390", "s390x"):
|
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
|
|
|
|
|
2011-08-09 21:37:43 +00:00
|
|
|
## gconf settings
|
|
|
|
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
|
|
|
|
|
2011-05-05 22:24:58 +00:00
|
|
|
move usr/libexec/anaconda/auditd sbin
|
|
|
|
|
2011-10-18 20:31:50 +00:00
|
|
|
## for compatibility with Ancient Anaconda Traditions
|
2011-10-26 17:57:46 +00:00
|
|
|
symlink lib/modules /modules
|
|
|
|
symlink lib/firmware /firmware
|
2012-03-19 18:22:52 +00:00
|
|
|
symlink ../run/install mnt/install
|
2011-05-14 07:25:44 +00:00
|
|
|
|
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?
|