installer: install file in /etc/sudoers.d and modify to run as user and use sudo for external programs
This commit is contained in:
parent
007cfe7864
commit
7455659778
2
Makefile
2
Makefile
@ -64,6 +64,7 @@ install-dirs:
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(installerdatadir)
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(SYSTEM_MENU_DIR)
|
||||
@$(INSTALL_DIR) $(DESTDIR)/home/liveuser/
|
||||
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/
|
||||
|
||||
install-icons:
|
||||
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
|
||||
@ -80,6 +81,7 @@ install: install-dirs install-locales install-icons
|
||||
$(INSTALL_DATA) gpl-es.html $(DESTDIR)$(installerdatadir)/gpl-es.html
|
||||
$(INSTALL_PROGRAM) installer/installer.kmdr $(DESTDIR)$(installerdatadir)
|
||||
$(INSTALL_PROGRAM) installer/*.sh $(DESTDIR)$(installerdatadir)
|
||||
$(INSTALL_PROGRAM) installer/installer-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/installer
|
||||
$(INSTALL_DATA) installer/openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
|
||||
cp -a liveuser/.kde4 $(DESTDIR)/home/liveuser/
|
||||
|
||||
|
11
installer/installer-sudoers
Normal file
11
installer/installer-sudoers
Normal file
@ -0,0 +1,11 @@
|
||||
# openmamba-installer sudoers.d file.
|
||||
#
|
||||
# This file MUST be edited with the 'visudo' command as root.
|
||||
#
|
||||
# See the sudoers man page for the details on how to write a sudoers file.
|
||||
#
|
||||
|
||||
# Cmnd alias specification
|
||||
Cmnd_Alias INSTALLER = /usr/sbin/gparted, /usr/share/openmamba/installer/installer.sh, /usr/bin/udisks
|
||||
|
||||
%sysadmin ALL = NOPASSWD: INSTALLER
|
@ -1525,7 +1525,7 @@ volumes=`udisks --enumerate-device-files | grep -v /dev/disk`
|
||||
for v in $volumes; do
|
||||
native_path=`get_udisks_key $v native-path`
|
||||
[ ! -e $native_path/partition ] || continue
|
||||
udisks --unmount $v
|
||||
sudo udisks --unmount $v
|
||||
done
|
||||
@execEnd
|
||||
@PartitionBox.setEnabled(false)
|
||||
@ -1538,7 +1538,7 @@ done
|
||||
</ul>
|
||||
@i18n("Press OK to launch the disk partitioning tool.")
|
||||
",@i18n("Hint for partitioning"))
|
||||
@exec(/usr/sbin/gparted)
|
||||
@exec(sudo /usr/sbin/gparted)
|
||||
@scanDevices.execute()
|
||||
@exec("dcop kded kded loadModule medianotifier")
|
||||
@PartitionBox.setEnabled(true)
|
||||
@ -3352,7 +3352,7 @@ fi
|
||||
@if (@confirmBox.checked); then
|
||||
@dcop(@dcopid, KommanderIf, setEnabled(QString,bool), back, false)
|
||||
@exec("/usr/bin/xset -dpms")
|
||||
@exec("/usr/share/openmamba/installer/installer.sh -y @dcopid &> ~/.installer.log &")
|
||||
@exec("sudo /usr/share/openmamba/installer/installer.sh -y @dcopid &> ~/.installer.log &")
|
||||
@exec("dcop kdesktop KScreensaverIface quit")
|
||||
@endif
|
||||
|
||||
|
@ -4,7 +4,7 @@ Name[it]=Installa
|
||||
GenericName=openmamba installation
|
||||
GenericName[it]=Installazione di openmamba
|
||||
Comment=openmamba installer
|
||||
Exec=kdesudo kmdr-executor /usr/share/openmamba/installer/installer.kmdr
|
||||
Exec=kmdr-executor /usr/share/openmamba/installer/installer.kmdr
|
||||
Icon=installer
|
||||
Terminal=0
|
||||
Type=Application
|
||||
|
Loading…
Reference in New Issue
Block a user