summaryrefslogtreecommitdiff
path: root/upgrade/update-init.sh
blob: d27697e2ad9dd8c382b5e8d2c262aa6b430f0f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# RW update initialize script
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
OWNER_HOME=/opt/usr/home/owner

USER_DISK=`ls /dev/disk/by-partlabel/ | grep -i user`
USER_MNT=/opt/usr

# Mount user partition (specific to lazy mount)
mount | grep "$USER_MNT" > /dev/null

if [ $? != "0" ]
then
	/usr/bin/mount PARTLABEL=$USER_DISK $USER_MNT
fi

# Create home directory
test ! -e /opt/usr/home && mkdir -p /opt/usr/home
cp -af /usr/share/upgrade/data/home/owner /opt/usr/home

# Copy 3.0 rpm db
rm -rf /var/lib/rpm/*
cp -af /usr/share/upgrade/data/rpm/* /var/lib/rpm

# Disable cynara-check
buxton2ctl security-disable

####### filesystem update #######
rm -rf /var/lock
ln -snf /run/lock /var/lock

# Directory for compatibility
chown root:root /opt/usr/media
chsmack -a '_' -T /opt/usr/media
# The operation done by generic-base.post
chown root:root /opt/var/log
chsmack -a '*' -t /opt/var/log