1 LOCAL_VERSION=rsbac-daz
2 KERNEL_VERSION=2.6.30-rsbac-daz
4 ADMIN_VERSION=$(pacman -Q rsbac-admin 2> /dev/null | sed 's/.*[ ]\(.*\)-.*/\1/')
7 echo -n ":: Checking rsbac-admin... "
8 if [ -z "$ADMIN_VERSION" ]; then
10 echo "==> You should install rsbac-admin ($RSBAC_VERSION)"
11 elif [ "$ADMIN_VERSION" != "$RSBAC_VERSION" ]; then
13 echo "==> You need to upgrade to rsbac-admin ($RSBAC_VERSION)"
16 echo -e "\n ------------------------------------------------------------"
18 echo " Read the following steps carefully and follow them exactly."
19 echo " A reboot is involved, so write down the steps if necessary."
20 echo " ------------------------------------------------------------"
21 echo -e "\n CONFIGURATION:"
22 echo " 1. Add this paramater to the RSBAC kernel's GRUB/LILO entry:"
23 echo " rsbac_softmode"
24 echo " 2. Reboot to the Softmode RSBAC kernel."
25 echo " 3. Login as the secoff user."
26 echo " 4. Run the configuration script:"
27 echo -n " $ ./config "
28 [ "$RSBAC_VERSION" == "kernel26rsbac-daz" ] && echo "daz" || echo "rsbac"
29 echo " 5. Remove the 'rsbac_softmode' kernel parameter."
30 echo -ne "\n You should now have "
31 [ "$RSBAC_VERSION" == "kernel26rsbac-daz" ] && \
32 echo -n "a Dazuko interface " || echo -n "an RSBAC framework "
33 echo "upon rebooting."
38 # Update module dependencies
39 echo ">>> Updating module dependencies. Please wait..."
40 depmod -v $KERNEL_VERSION &> /dev/null
42 # Generate init ramdisks
43 echo ">>> MKINITCPIO SETUP"
44 echo ">>> ----------------"
45 echo ">>> If you use LVM2, encrypted root, or software RAID,"
46 echo ">>> ensure you enable support in the /etc/mkinitcpio.conf file."
47 echo ">>> More information about mkinitcpio setup can be found here:"
48 echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
50 echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
51 /sbin/mkinitcpio -p kernel26$LOCAL_VERSION
58 pacman -Q grub &> /dev/null
60 pacman -Q lilo &> /dev/null
64 if [ $haslilo -eq 0 ]; then
66 if [ $hasgrub -eq 0 ]; then
67 echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
69 echo ">>> You appear to be using the LILO bootloader. You should run"
70 echo ">>> 'lilo' before rebooting."
74 if grep "/boot" /etc/fstab 2>&1 >/dev/null; then
75 if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
76 echo "WARNING: /boot appears to be a separate partition but is not mounted."
77 echo " This is most likely not what you want. Please mount your /boot"
78 echo " partition and reinstall the kernel, unless you are sure this is OK."
82 # Important upgrade notice
83 if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
85 echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
86 echo ">>> -------------------------------"
87 echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
88 echo ">>> If you still use DevFS, please make the transition to uDev before"
89 echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
90 echo ">>> then you can manually downgrade to an older version:"
92 echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
94 echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
95 echo ">>> IgnorePkg list in the /etc/pacman.conf file."
97 echo ">>> (NOTE: The following portion applies to uDev users as well!)"
99 echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
100 echo ">>> be able to boot! Change your root= parameter to use the classic"
101 echo ">>> naming scheme."
104 echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
105 echo ">>> - change root=/dev/md/0 to root=/dev/md0"
108 if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
109 echo ">>> --------------------------------------------------------------"
110 echo ">>> | WARNING: |"
111 echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
112 echo ">>> | Please change to mkinitcpio setup. |"
113 echo ">>> --------------------------------------------------------------"
117 # Update module dependencies
118 echo ">>> Updating module dependencies. Please wait ..."
119 depmod -v $KERNEL_VERSION &> /dev/null
121 # Generate init ramdisks
122 echo ">>> MKINITCPIO SETUP"
123 echo ">>> ----------------"
124 if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
125 echo ">>> Please change your bootloader config files:"
126 echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
127 echo "---------------------------------------------------------"
128 echo "| - initrd26.img to kernel26$LOCAL_VERSION.img |"
129 echo "| - initrd26-full.img to kernel26$LOCAL_VERSION-fallback.img |"
130 echo "---------------------------------------------------------"
132 if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
134 echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
135 echo ">>> ----------"
136 echo ">>> To use the new pata drivers, change the 'ide' hook "
137 echo ">>> to 'pata' in the /etc/mkinitcpio.conf HOOKS= line."
138 echo ">>> The new system changes: /dev/hd? to /dev/sd?"
139 echo ">>> Don't forget to modify GRUB, LILO, and /etc/fstab to the"
140 echo ">>> new naming system."
141 echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
143 echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
145 echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf,"
146 echo ">>> the 'ata_piix' module will be used."
147 echo ">>> This may cause your devices to shift names, eg:"
148 echo ">>> - IDE: devices from hd? to sd?"
149 echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
150 echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix."
153 echo ">>> If you use LVM2, encrypted root, or software RAID,"
154 echo ">>> ensure you enable support in the /etc/mkinitcpio.conf file."
155 echo ">>> More information about mkinitcpio setup can be found here:"
156 echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
158 echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
159 if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
160 /sbin/mkinitcpio -p kernel26$LOCAL_VERSION -m "ATTENTION:
161 If you get a kernel panic below and are using an Intel chipset,
162 append 'earlymodules=piix' to the kernel commandline."
164 /sbin/mkinitcpio -p kernel26$LOCAL_VERSION
168 if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
170 echo "Important ACPI Information:"
171 echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
172 echo ">>> The modules are located at:"
173 echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
174 echo ">>> For more information about ACPI modules check this wiki page:"
175 echo ">>> http://wiki.archlinux.org/index.php/ACPI_modules"
178 # Check admin version