Commit 7455659778eef091743842cce1d5c318e0c27365

Authored by Silvan Calarco
1 parent 007cfe7864
Exists in master and in 1 other branch milestone2

installer: install file in /etc/sudoers.d and modify to run as user and use sudo…

… for external programs

Showing 5 changed files with 18 additions and 5 deletions Side-by-side Diff

... ... @@ -64,6 +64,7 @@
64 64 @$(INSTALL_DIR) $(DESTDIR)$(installerdatadir)
65 65 @$(INSTALL_DIR) $(DESTDIR)$(SYSTEM_MENU_DIR)
66 66 @$(INSTALL_DIR) $(DESTDIR)/home/liveuser/
  67 + @$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/
67 68  
68 69 install-icons:
69 70 @for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
... ... @@ -80,6 +81,7 @@
80 81 $(INSTALL_DATA) gpl-es.html $(DESTDIR)$(installerdatadir)/gpl-es.html
81 82 $(INSTALL_PROGRAM) installer/installer.kmdr $(DESTDIR)$(installerdatadir)
82 83 $(INSTALL_PROGRAM) installer/*.sh $(DESTDIR)$(installerdatadir)
  84 + $(INSTALL_PROGRAM) installer/installer-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/installer
83 85 $(INSTALL_DATA) installer/openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
84 86 cp -a liveuser/.kde4 $(DESTDIR)/home/liveuser/
85 87  
1   -VERSION=2.4.96
  1 +VERSION=2.4.97
installer/installer-sudoers
  1 +# openmamba-installer sudoers.d file.
  2 +#
  3 +# This file MUST be edited with the 'visudo' command as root.
  4 +#
  5 +# See the sudoers man page for the details on how to write a sudoers file.
  6 +#
  7 +
  8 +# Cmnd alias specification
  9 +Cmnd_Alias INSTALLER = /usr/sbin/gparted, /usr/share/openmamba/installer/installer.sh, /usr/bin/udisks
  10 +
  11 +%sysadmin ALL = NOPASSWD: INSTALLER
installer/installer.kmdr
... ... @@ -1525,7 +1525,7 @@
1525 1525 for v in $volumes; do
1526 1526 native_path=`get_udisks_key $v native-path`
1527 1527 [ ! -e $native_path/partition ] || continue
1528   - udisks --unmount $v
  1528 + sudo udisks --unmount $v
1529 1529 done
1530 1530 @execEnd
1531 1531 @PartitionBox.setEnabled(false)
... ... @@ -1538,7 +1538,7 @@
1538 1538 </ul>
1539 1539 @i18n("Press OK to launch the disk partitioning tool.")
1540 1540 ",@i18n("Hint for partitioning"))
1541   -@exec(/usr/sbin/gparted)
  1541 +@exec(sudo /usr/sbin/gparted)
1542 1542 @scanDevices.execute()
1543 1543 @exec("dcop kded kded loadModule medianotifier")
1544 1544 @PartitionBox.setEnabled(true)
... ... @@ -3352,7 +3352,7 @@
3352 3352 @if (@confirmBox.checked); then
3353 3353 @dcop(@dcopid, KommanderIf, setEnabled(QString,bool), back, false)
3354 3354 @exec("/usr/bin/xset -dpms")
3355   - @exec("/usr/share/openmamba/installer/installer.sh -y @dcopid &> ~/.installer.log &")
  3355 + @exec("sudo /usr/share/openmamba/installer/installer.sh -y @dcopid &> ~/.installer.log &")
3356 3356 @exec("dcop kdesktop KScreensaverIface quit")
3357 3357 @endif
3358 3358  
installer/openmamba-installer.desktop
... ... @@ -4,7 +4,7 @@
4 4 GenericName=openmamba installation
5 5 GenericName[it]=Installazione di openmamba
6 6 Comment=openmamba installer
7   -Exec=kdesudo kmdr-executor /usr/share/openmamba/installer/installer.kmdr
  7 +Exec=kmdr-executor /usr/share/openmamba/installer/installer.kmdr
8 8 Icon=installer
9 9 Terminal=0
10 10 Type=Application