From 0da632078889e1aa7fac0a431ff82d8bf1f1afea Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 2 May 2014 22:11:43 +0200 Subject: Fixing unity panel issues ... --- src/initramfs/distro-specs/ubuntu/functions-14.04 | 44 +++++++++++++++++++++++ src/initramfs/scripts/bin/hwautocfg | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/initramfs/distro-specs/ubuntu/functions-14.04 b/src/initramfs/distro-specs/ubuntu/functions-14.04 index f2e4e495..aa50b310 100644 --- a/src/initramfs/distro-specs/ubuntu/functions-14.04 +++ b/src/initramfs/distro-specs/ubuntu/functions-14.04 @@ -25,3 +25,47 @@ if [ "x$start_dreshal" = "xyes" ]; then done fi } + +# distro specific function called from servconfig script +config_distro () { + # runlevel system changed significantly compared to pre 9.10 sys-v-init + # clean up nevertheless + for dir in rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d ; do + rm -rf /mnt/etc/${dir}/* + done + # remove unneeded init scripts (stuff handled in stage3 which would + # interface with already existing setup) + # copy all event scripts to a special directory + testmkd /mnt/etc/init.inactive + echo -e "# This directory was created in OpenSLX stage3 and contains all \ +disabled\n# upstart scripts. They are moved by servconfig to init if this is \ +required." >/mnt/etc/init.inactive/README + mv /mnt/etc/init/* /mnt/etc/init.inactive + # remove plymouth component from *dm.conf (not needed with splashy) + sed "/# Check kernel c/,/done/d" -i /mnt/etc/init.inactive/*dm.conf + # copy initial upstart scripts back + for file in alsa-mixer-save control-alt-delete console-setup dbus \ + container-detect console-font \ + dmesg hwclock hwclock-save irqbalance module-init-tools \ + mountall mounted* networking procps rc* tty* udev* \ + upstart-socket-bridge upstart-udev-bridge ; do + mv /mnt/etc/init.inactive/${file}.conf /mnt/etc/init >/dev/null 2>&1 + done + + # for screen sessions + testmkd /mnt/var/run/screen root:utmp 0777 + + # apt stuff + testmkd /mnt/var/cache/apt/archives/partial + + # Gnome/Unity panel stuff + echo -e "[D-BUS Service]\nName=com.canonical.Unity.Panel.Service\n\ +Exec=/usr/lib/unity/unity-panel-service" >/usr/share/dbus-1/services/com.canonical.Unity.Panel.Service.service + echo -e "[Desktop Entry]\nType=Application\nName=Unity Panel Service\n\ +Exec=/usr/lib/unity/unity-panel-service\nOnlyShowIn=Unity;\n\ +NoDisplay=true" >/etc/xdg/autostart/unity-panel-service.desktop + + # add the slx specific path (/var/opt/openslx/bin) to the PATH variable + echo -e "# stuff generated by $0 (out of InitRamFS written $date)\n\ +export PATH=\"\$PATH:/var/opt/openslx/bin\"" >>/mnt/etc/profile +} diff --git a/src/initramfs/scripts/bin/hwautocfg b/src/initramfs/scripts/bin/hwautocfg index f015f6fc..4ec42c4a 100755 --- a/src/initramfs/scripts/bin/hwautocfg +++ b/src/initramfs/scripts/bin/hwautocfg @@ -28,7 +28,7 @@ done echo "0 0 0 0" >/proc/sys/kernel/printk echo "/sbin/mdev" >/proc/sys/kernel/hotplug echo -e "(control[A-Z])([0-9]) 0:0 660 =snd/\n(pcm[A-Z][0-9][A-Z][0-9][cp]) 0:0 660 =snd/\n\ -(hw[A-Z0-9]*) 0:0 660 =snd/\ncard[0-9] 0:0 660 =dri/\nevent[0-9] 0:0 640 =input/\n\ +(hw[A-Z0-9]*) 0:0 660 =snd/\ncard[0-9] 0:0 660 =dri/\n(event|mouse)[0-9] 0:0 640 =input/\n\ (control[A-Z])([0-9]+) 0:0 660 =dri/\n" >>/etc/mdev.conf modprobe -a ${MODPRV} usbhid hid-bright hid-generic 2>/dev/null & # check from vga= that the traditional framebuffer is needed e.g. for splashy -- cgit v1.2.3-55-g7522